Open pyinto opened 5 months ago
I am also experiencing this from time to time. Seemed to happen after my machine went to sleep. When it started up again, commands like this stopped working only for some windows:
➜ ~ yabai -m window --focus $(yabai -m query --windows | jq '[.[] | select(.app == "Safari")] | sort_by(.display) | reverse | .[0].id ')
could not locate window with the specified id '2885'.
Here's the output of the query:
➜ ~ yabai -m query --windows | jq '[.[] | select(.app == "Safari")]'
[
{
"id": 2885,
"pid": 1189,
"app": "Safari",
"title": "",
"scratchpad": "",
"frame": {
"x": 1728.0000,
"y": 0.0000,
"w": 1920.0000,
"h": 1080.0000
},
"role": "",
"subrole": "",
"root-window": true,
"display": 2,
"space": 9,
"level": 0,
"sub-level": 0,
"layer": "normal",
"sub-layer": "normal",
"opacity": 1.0000,
"split-type": "none",
"split-child": "none",
"stack-index": 0,
"can-move": false,
"can-resize": false,
"has-focus": false,
"has-shadow": true,
"has-parent-zoom": false,
"has-fullscreen-zoom": false,
"has-ax-reference": false,
"is-native-fullscreen": true,
"is-visible": false,
"is-minimized": false,
"is-hidden": false,
"is-floating": false,
"is-sticky": false,
"is-grabbed": false
},
{
"id": 106,
"pid": 1189,
"app": "Safari",
"title": "\"could not locate window with the specified id\" or \"could not locate the window to act on!\" · Issue #2320 · koekeishiya/yabai",
"scratchpad": "",
"frame": {
"x": 0.0000,
"y": 37.0000,
"w": 1728.0000,
"h": 1080.0000
},
"role": "AXWindow",
"subrole": "AXStandardWindow",
"root-window": true,
"display": 1,
"space": 5,
"level": 0,
"sub-level": 0,
"layer": "normal",
"sub-layer": "normal",
"opacity": 1.0000,
"split-type": "none",
"split-child": "none",
"stack-index": 0,
"can-move": false,
"can-resize": true,
"has-focus": false,
"has-shadow": true,
"has-parent-zoom": false,
"has-fullscreen-zoom": false,
"has-ax-reference": true,
"is-native-fullscreen": true,
"is-visible": false,
"is-minimized": false,
"is-hidden": false,
"is-floating": false,
"is-sticky": false,
"is-grabbed": false
}
]
In this case, it is able to select the second window (106), but not the first (2885), I.e. the command works when JQ doesn't reverse the list.
My OS info is:
14.4.1 (23E224) on Apple M2 Max
Some window properties are only accessible when yabai has a valid AX-reference for that window. This AX-reference can only be retrieved when the space that the window is visible on, is active. If windows are already opened on inactive spaces when yabai is launched, yabai can detect those windows and retrieve a limited amount of information about them. In addition, yabai window commands will NOT WORK for these windows. These windows can be identified by looking at the has-ax-reference property. Once the space that the window belongs to becomes active, yabai will automatically create an AX-reference. The queries will from that point forwards contain complete information, and the window can be used with yabai window commands.
https://github.com/koekeishiya/yabai/blob/master/doc/yabai.asciidoc#query
Hello anyone find a solution to this ?
Having some issues when I try to focus specific app by it's ID, it was hard to debug because I don't have any concrete steps to reproduce this behavior, and list of the apps affected differs too. Recently I cough one of such examples when my debug logs was open, here how it looked like:
Then I try to switch to it and next thing happens:
or
The app is the only visible app in space 5 (when I am at space 6 if that matters) on my second display. I didn't restart it, nor did I restart Yabai, and suddenly it's working again. Here is a query response for that window after it started to work again:
As you can see both
role
andsubrole
were messed up, but again, it was perfectly fine window that was working as usual, I did nothing to fix and it works. It's not about this specific app, it happens rarely and randomly with a list of apps.Any ideas what's going on or how I can fix it? I also sometimes experience issues when my queries are taking much more time to respond, but I guess that's not related. Would be great to hear your thoughts or propositions on how to further investigate it. Thanks!
Mac OS: 14.5 (23F79)
yabai-v7.1.1
No scripting additions installed.