Skip to content
Source
Sign inSign up
pingdotgg/t3code

fix(desktop): skip auxiliary macOS snapshot windows #12978

MergedYoruSamaOG(GitHub profile, opens in a new tab)merged 8 commits intomain fromrefs/pull/12978/headmerged by juliusmarminge View on GitHub

Showing 2 changed files with 128 additions and 13 deletions (loading 1).

x
0 of 2 viewed, 2 left
128 additions and 13 deletionsapps/desktop/src/snapShot/ActiveWindow.test.tsModified
View file
@@ -28,19 +28,34 @@
);
​
+function macLookup(
+ windows: ReadonlyArray<{
+ id: number;
+ title: string;
+ bounds: { x: number; y: number; width: number; height: number };
+ alpha?: number;
+ }>,
+) {
+ return JSON.stringify({
+ owner: {
+ name: "Editor",
+ processId: 123,
+ path: "/Applications/Editor.app",
+ bundleId: "com.example.editor",
+ },
+ windows: windows.map((window) => ({ ...window, alpha: window.alpha ?? 1 })),
+ });
+}
+​
it("parses the frontmost macOS window from the osascript lookup", async () => {
stubMacLookup(
- JSON.stringify({
- id: 42,
- title: "main.ts",
- bounds: { x: 10, y: 20, width: 800, height: 600 },
- owner: {