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

space(i).moveWindows([x]) seems to no longer work under Sonoma 14.5 #348

Closed
l00sed opened this issue May 15, 2024 · 12 comments · Fixed by #350
Closed

space(i).moveWindows([x]) seems to no longer work under Sonoma 14.5 #348

l00sed opened this issue May 15, 2024 · 12 comments · Fixed by #350
Assignees
Labels
Milestone

Comments

@l00sed
Copy link

l00sed commented May 15, 2024

  • Version: 4.0.0
  • macOS: Sonoma 14.5

Example:
space(i).moveWindows([ACTIVE_WINDOW])

I think Sonoma 14.5 had some big GUI engine updates, so it's likely related to this upgrade.
Not seeing any errors in the Phoenix logs. It finds the active window and the space.

I am seeing:

2024-05-15 12:02:04.787165-0400 0x238d7    Default     0x0                  26641  0    Phoenix: Info: Could not get value for attribute “AXWindow” from element <AXUIElement 0x60000167afa0> {pid=33874}. (-25205)
2024-05-15 12:02:04.868653-0400 0x238d7    Default     0x0                  26641  0    Phoenix: Info: Could not get value for attribute “AXWindow” from element <AXUIElement 0x60000167b2a0> {pid=33874}. (-25205)
2024-05-15 12:02:04.914860-0400 0x238d7    Default     0x0                  26641  0    Phoenix: Info: Could not get value for attribute “AXWindow” from element <AXUIElement 0x60000165b000> {pid=33874}. (-25205)
2024-05-15 12:02:06.312426-0400 0x238d7    Default     0x0                  26641  0    Phoenix: Info: Could not get value for attribute “AXWindow” from element <AXUIElement 0x600001653c60> {pid=33874}. (-25205)
2024-05-15 12:02:19.402839-0400 0x238d7    Default     0x0                  26641  0    Phoenix: Info: Could not get value for attribute “AXWindow” from element <AXUIElement 0x60000165a940> {pid=33874}. (-25205)
2024-05-15 12:02:19.464484-0400 0x238d7    Default     0x0                  26641  0    Phoenix: Info: Could not get value for attribute “AXWindow” from element <AXUIElement 0x60000167f840> {pid=33874}. (-25205)
2024-05-15 12:02:19.507296-0400 0x238d7    Default     0x0                  26641  0    Phoenix: Info: Could not get value for attribute “AXWindow” from element <AXUIElement 0x600001604060> {pid=33874}. (-25205)
2024-05-15 12:02:21.153676-0400 0x238d7    Default     0x0                  26641  0    Phoenix: Info: Could not get value for attribute “AXWindow” from element <AXUIElement 0x600001679da0> {pid=33874}. (-25205)

... which may be related to the problem?

@disperse
Copy link

disperse commented May 17, 2024

Having the same issue, also with Sonoma 14.5. (throwing windows to spaces with Amethyst also broke in the same timeframe so this may be related) I have a few more warnings in my Phoenix log:

2024-05-17 11:45:45.313390-0400 0x4844f2   Default     0x0                  92379  0    Phoenix: Info: Could not remove notification “AXWindowCreated” for element <AXUIElement Application 0x60000365c2a0> {pid=94360}. (-25204)
2024-05-17 11:43:13.720438-0400 0x4844f2   Default     0x0                  92379  0    Phoenix: Info: Could not add notification “AXUIElementDestroyed” for element <AXUIElement Application 0x60000369a850> {pid=92180}. (-25204)
2024-05-17 11:43:13.720749-0400 0x4844f2   Default     0x0                  92379  0    Phoenix: Info: Could not add notification “AXFocusedWindowChanged” for element <AXUIElement Application 0x60000369a850> {pid=92180}. (-25204)
2024-05-17 11:43:13.721051-0400 0x4844f2   Default     0x0                  92379  0    Phoenix: Info: Could not add notification “AXWindowMoved” for element <AXUIElement Application 0x60000369a850> {pid=92180}. (-25204)
2024-05-17 11:43:13.721370-0400 0x4844f2   Default     0x0                  92379  0    Phoenix: Info: Could not add notification “AXWindowResized” for element <AXUIElement Application 0x60000369a850> {pid=92180}. (-25204)
2024-05-17 11:43:13.721641-0400 0x4844f2   Default     0x0                  92379  0    Phoenix: Info: Could not add notification “AXWindowMiniaturized” for element <AXUIElement Application 0x60000369a850> {pid=92180}. (-25204)
2024-05-17 11:43:13.722088-0400 0x4844f2   Default     0x0                  92379  0    Phoenix: Info: Could not add notification “AXWindowDeminiaturized” for element <AXUIElement Application 0x60000369a850> {pid=92180}. (-25204)

@kasper
Copy link
Owner

kasper commented May 17, 2024

Hey! Thanks for the report. I guess I need to start digging what private API changes have caused this.

@kasper kasper added the bug label May 17, 2024
@kasper kasper added this to the 4.0.1 milestone May 17, 2024
@kasper kasper self-assigned this May 17, 2024
@rohm1
Copy link

rohm1 commented May 26, 2024

Issue does not seem specific to phoenix, yabai released a fix, maybe this helps: koekeishiya/yabai#2240

@kasper
Copy link
Owner

kasper commented May 27, 2024

Also being discussed here: ianyh/Amethyst#1643. Unfortunately, I’m not sure how long we will be able to keep the Spaces support if Apple is starting to protect these private APIs.

@l00sed
Copy link
Author

l00sed commented Jun 1, 2024

Kudos to you and other OSS contributors for keeping it up. This is definitely distressing. If I knew anything about Mac development I'd try to help. Maybe some day.

Would be super sad if Apple made that restricted, especially for people on company laptops who can't disable SIP to get additional access.

@metakirby5
Copy link
Contributor

This interfered with my daily workflow enough that I adopted the fix from yabai and Amethyst myself 😅 And it seems to work!

#350

@purag
Copy link

purag commented Jun 5, 2024

This is for sure one of my most used features, would love if we could merge @metakirby5's fix!

@kasper
Copy link
Owner

kasper commented Jun 7, 2024

@metakirby5 Awesome, thanks! Added some comments to the PR.

@kasper
Copy link
Owner

kasper commented Jun 10, 2024

Hey everyone! The fix is now released in 4.0.1.

@purag
Copy link

purag commented Jun 10, 2024

Fantastic, it's working again! Thanks @metakirby5 and @kasper!

@dan-phantom
Copy link

This PR doesn't fully work, in my case it moves the window offscreen instead of to the right screen (if it needs to change the screens)
As for spaces it doesn't move the window to the right space anymore (if the window should stay on the same screen but a different space)

Thanks for making this utility ❤️

@kasper
Copy link
Owner

kasper commented Jul 7, 2024

@dan-phantom #351 for the multi-monitor regression.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

7 participants