Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

iPhone Mirroring (macOS 15) app flickers on the corner when in another space #545

Open
3 tasks done
bmfurtado opened this issue Sep 30, 2024 · 8 comments
Open
3 tasks done
Labels
bug Something isn't working as expected triaged The issue makes sense to maintainers

Comments

@bmfurtado
Copy link

The new iPhone Mirroring app flickers on the corner of the screen when it's on another workspace.

Screen.Recording.2024-09-30.at.3.29.11.AM.mov

Not sure if it's relevant but here's the output of aerospace debug-windows:

com.apple.ScreenContinuity.window.1187 windowId: 1187
com.apple.ScreenContinuity.window.1187 workspace: 5
com.apple.ScreenContinuity.window.1187 treeNodeParent: Workspace(name: '5', isVisible: 'false', isEffectivelyEmpty: 'false', doKeepAlive: 'true')
com.apple.ScreenContinuity.window.1187 recognizedAsDialog: true
com.apple.ScreenContinuity.window.1187 AXTitle: Optional(iPhone Mirroring)
com.apple.ScreenContinuity.window.1187 AXRole: Optional(AXWindow)
com.apple.ScreenContinuity.window.1187 AXSubrole: Optional(AXStandardWindow)
com.apple.ScreenContinuity.window.1187 AXIdentifier: Optional(iphone-mirroring-main)
com.apple.ScreenContinuity.window.1187 AXFocused: Optional(0)
com.apple.ScreenContinuity.window.1187 AXFullScreen: Optional(0)
com.apple.ScreenContinuity.window.1187 AXFrame: Optional(<AXValue 0x60000379e600> {value = x:1784.000000 y:1008.000000 w:322.000000 h:718.000000 type = kAXValueCGRectType})
com.apple.ScreenContinuity.window.1187 AXPosition: Optional(<AXValue 0x600002c7d800> {value = x:1784.000000 y:1008.000000 type = kAXValueCGPointType})
com.apple.ScreenContinuity.window.1187 AXGrowArea: nil
com.apple.ScreenContinuity.window.1187 AXMinimizeButton: AXUIElement {
com.apple.ScreenContinuity.window.1187      AXRole: Optional(AXButton)
com.apple.ScreenContinuity.window.1187      AXTitle: nil
com.apple.ScreenContinuity.window.1187      AXSubrole: Optional(AXMinimizeButton)
com.apple.ScreenContinuity.window.1187      AXEnabled: Optional(1)
com.apple.ScreenContinuity.window.1187      AXParent: AXUIElement(windowId=1187, title=nil, role="AXGroup", subrole="AXHostingView")
com.apple.ScreenContinuity.window.1187      AXTopLevelUIElement: AXUIElement(windowId=1187, title="iPhone Mirroring", role="AXWindow", subrole="AXStandardWindow")
com.apple.ScreenContinuity.window.1187      AXWindow: AXUIElement(windowId=1187, title="iPhone Mirroring", role="AXWindow", subrole="AXStandardWindow")
com.apple.ScreenContinuity.window.1187      Ignored: AXFrame, AXSize, AXFocused, AXHelp, AXPosition, AXRoleDescription
com.apple.ScreenContinuity.window.1187 }
com.apple.ScreenContinuity.window.1187 AXDocument: nil
com.apple.ScreenContinuity.window.1187 AXSections: [
com.apple.ScreenContinuity.window.1187         Optional({
com.apple.ScreenContinuity.window.1187             SectionDescription = Content;
com.apple.ScreenContinuity.window.1187             SectionObject = "<AXUIElement 0x600002cd01e0> {pid=36760}";
com.apple.ScreenContinuity.window.1187             SectionUniqueID = AXContent;
com.apple.ScreenContinuity.window.1187         }),
com.apple.ScreenContinuity.window.1187         Optional({
com.apple.ScreenContinuity.window.1187             SectionObject = "<AXUIElement 0x600002cd0c30> {pid=36760}";
com.apple.ScreenContinuity.window.1187             SectionUniqueID = AXContainer;
com.apple.ScreenContinuity.window.1187         })
com.apple.ScreenContinuity.window.1187 ]
com.apple.ScreenContinuity.window.1187 AXCloseButton: AXUIElement {
com.apple.ScreenContinuity.window.1187      AXRole: Optional(AXButton)
com.apple.ScreenContinuity.window.1187      AXTitle: nil
com.apple.ScreenContinuity.window.1187      AXSubrole: Optional(AXCloseButton)
com.apple.ScreenContinuity.window.1187      AXEnabled: Optional(1)
com.apple.ScreenContinuity.window.1187      AXParent: AXUIElement(windowId=1187, title=nil, role="AXGroup", subrole="AXHostingView")
com.apple.ScreenContinuity.window.1187      AXTopLevelUIElement: AXUIElement(windowId=1187, title="iPhone Mirroring", role="AXWindow", subrole="AXStandardWindow")
com.apple.ScreenContinuity.window.1187      AXWindow: AXUIElement(windowId=1187, title="iPhone Mirroring", role="AXWindow", subrole="AXStandardWindow")
com.apple.ScreenContinuity.window.1187      Ignored: AXFrame, AXSize, AXFocused, AXHelp, AXPosition, AXRoleDescription, AXEdited
com.apple.ScreenContinuity.window.1187 }
com.apple.ScreenContinuity.window.1187 AXMain: Optional(1)
com.apple.ScreenContinuity.window.1187 AXActivationPoint: Optional(<AXValue 0x600002cd0a20> {value = x:1794.000000 y:1022.000000 type = kAXValueCGPointType})
com.apple.ScreenContinuity.window.1187 AXFullScreenButton: nil
com.apple.ScreenContinuity.window.1187 AXProxy: nil
com.apple.ScreenContinuity.window.1187 AXDefaultButton: nil
com.apple.ScreenContinuity.window.1187 AXMinimized: Optional(0)
com.apple.ScreenContinuity.window.1187 AXParent: Optional(<AXUIElement Application 0x600002cd0a20> {pid=36760})
com.apple.ScreenContinuity.window.1187 AXTitleUIElement: nil
com.apple.ScreenContinuity.window.1187 AXCancelButton: nil
com.apple.ScreenContinuity.window.1187 AXModal: Optional(0)
com.apple.ScreenContinuity.window.1187 AXZoomButton: AXUIElement {
com.apple.ScreenContinuity.window.1187      AXRole: Optional(AXButton)
com.apple.ScreenContinuity.window.1187      AXTitle: nil
com.apple.ScreenContinuity.window.1187      AXSubrole: Optional(AXZoomButton)
com.apple.ScreenContinuity.window.1187      AXEnabled: Optional(0)
com.apple.ScreenContinuity.window.1187      AXParent: AXUIElement(windowId=1187, title=nil, role="AXGroup", subrole="AXHostingView")
com.apple.ScreenContinuity.window.1187      AXTopLevelUIElement: AXUIElement(windowId=1187, title="iPhone Mirroring", role="AXWindow", subrole="AXStandardWindow")
com.apple.ScreenContinuity.window.1187      AXWindow: AXUIElement(windowId=1187, title="iPhone Mirroring", role="AXWindow", subrole="AXStandardWindow")
com.apple.ScreenContinuity.window.1187      Ignored: AXFrame, AXSize, AXFocused, AXChildren, AXHelp, AXPosition, AXRoleDescription
com.apple.ScreenContinuity.window.1187 }
com.apple.ScreenContinuity.window.1187 AXSize: Optional(<AXValue 0x600002cd0a20> {value = w:322.000000 h:718.000000 type = kAXValueCGSizeType})
com.apple.ScreenContinuity.window.1187 AXToolbarButton: nil
com.apple.ScreenContinuity.window.1187 Ignored: AXChildrenInNavigationOrder, AXChildren, AXRoleDescription
com.apple.ScreenContinuity             AXRole: Optional(AXApplication)
com.apple.ScreenContinuity             AXTitle: Optional(iPhone Mirroring)
com.apple.ScreenContinuity             AXFunctionRowTopLevelElements: [
com.apple.ScreenContinuity             ]
com.apple.ScreenContinuity             AXFrame: nil
com.apple.ScreenContinuity             AXFocusedUIElement: AXUIElement(windowId=1187, title=nil, role="AXGroup", subrole="AXHostingView")
com.apple.ScreenContinuity             AXFrontmost: Optional(1)
com.apple.ScreenContinuity             AXExtrasMenuBar: nil
com.apple.ScreenContinuity             AXMainWindow: AXUIElement(windowId=1187, title="iPhone Mirroring", role="AXWindow", subrole="AXStandardWindow")
com.apple.ScreenContinuity             AXFocusedWindow: AXUIElement(windowId=1187, title="iPhone Mirroring", role="AXWindow", subrole="AXStandardWindow")
com.apple.ScreenContinuity             AXMenuBar: Optional(<AXUIElement 0x600002cdf0f0> {pid=36760})
com.apple.ScreenContinuity             AXWindows: [
com.apple.ScreenContinuity                 AXUIElement(windowId=1187, title="iPhone Mirroring", role="AXWindow", subrole="AXStandardWindow")
com.apple.ScreenContinuity             ]
com.apple.ScreenContinuity             AXSize: nil
com.apple.ScreenContinuity             AXPosition: nil
com.apple.ScreenContinuity             Ignored: AXChildren, AXChildrenInNavigationOrder, AXEnhancedUserInterface, AXPreferredLanguage, AXRoleDescription, AXHidden

Checklist

aerospace CLI client version: 0.14.2-Beta 0cb8dbdfc5ee73b8cbc200f175f467ebead55201
AeroSpace.app server version: 0.14.2-Beta 0cb8dbdfc5ee73b8cbc200f175f467ebead55201
@nikitabobko nikitabobko added the bug Something isn't working as expected label Sep 30, 2024
@nikitabobko
Copy link
Owner

nikitabobko commented Oct 3, 2024

I'm in the EU, so I can't even open the "iPhone Mirroring" app to test it. Can you please try to run from sources with the following patch and report back?

diff --git a/Sources/AppBundle/tree/MacApp.swift b/Sources/AppBundle/tree/MacApp.swift
index 3e2f827f..78c17648 100644
--- a/Sources/AppBundle/tree/MacApp.swift
+++ b/Sources/AppBundle/tree/MacApp.swift
@@ -10,7 +10,7 @@ final class MacApp: AbstractApp {
     private init(_ nsApp: NSRunningApplication, _ axApp: AXUIElement) {
         self.nsApp = nsApp
         self.axApp = axApp
-        self.isZoom = nsApp.bundleIdentifier == "us.zoom.xos"
+        self.isZoom = nsApp.bundleIdentifier == "us.zoom.xos" || nsApp.bundleIdentifier == "com.apple.ScreenContinuity"
         super.init(pid: nsApp.processIdentifier, id: nsApp.bundleIdentifier)
     }

I expect the problem to be identical to #527

All you need to run from sources is Xcode installed and ./run-debug.sh in the repo root

@bmfurtado
Copy link
Author

I applied the patch and, while the behavior is different, I wouldn't say it's actually better :)

Screen.Recording.2024-10-08.at.12.45.28.AM.mov

Let me know if there's any information I can grab that would be useful to figure out what's going on.

@bmfurtado
Copy link
Author

bmfurtado commented Oct 8, 2024

One more, probably relevant, piece of information is that (with AeroSpace closed) if I try to "manually push" the window down that corner it moves itself up to a position (with the top border around 130px above the end of the screen) which seems similar to the behavior that's fighting AeroSpace in the video. It only seems to do this for the Y axis.

@jack-guo-dash
Copy link

jack-guo-dash commented Oct 23, 2024

I have the same problem:
macOS 15.0.1 24A348 arm64
Aerospace: nikitabobko/tap/aerospace 0.14.2-Beta

When the iPhone Mirroring app is displayed in one workspace, I switch to another workspace. The lower right corner of the current screen will keep flashing. But when I minimize iPhone Mirroring, this problem disappears.

by the way, also tested on zoom in 0.14.2-Beta, seam issue, so I upgrade to 0.15.2-Beta based on #527, Zoom issue fixed.
but iPhone Mirroring still same. anything I can do to help on it?

@nikitabobko nikitabobko added the triaged The issue makes sense to maintainers label Oct 27, 2024
@oschrenk
Copy link

This app shows similar flickering when opening.

https://apps.apple.com/nl/app/macrofactor-macro-tracker/id1553503471?l=en-GB

I can solve it by forcing to be floating

[[on-window-detected]]
if.app-id = 'com.sbs.diet'
run = 'layout floating'

@johnallen3d
Copy link

Do you think it has to do with this odd design choice?

CleanShot 2025-01-02 at 10 52 02

@nikitabobko
Copy link
Owner

Just an update on this issue: I plan to get rid of any accessibility calls to windows of invisible workspaces. As a side effect:

  1. It will make AeroSpace less aggressive on invisible workspaces windows position, and it will resolve this issue
  2. It will improve performance in general when a lot of windows are "hidden" in invisible workspaces

I didn't forget about this issue, but no ETA.

@aurexav
Copy link

aurexav commented Jan 31, 2025

Screen.Recording.2025-01-31.at.20.13.57.mov

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working as expected triaged The issue makes sense to maintainers
Projects
None yet
Development

No branches or pull requests

6 participants