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

yabai accumulate multiple empty windows for keynote #2566

Open
quarkquartet opened this issue Feb 28, 2025 · 1 comment
Open

yabai accumulate multiple empty windows for keynote #2566

quarkquartet opened this issue Feb 28, 2025 · 1 comment

Comments

@quarkquartet
Copy link

I found a weird thing when I use keynote.

When I start, everything behaves pretty good. But after I using keynote and made some slides, yabai -m query gives me many empty windows of keynote.

{
  "id": 3220,
  "pid": 5057,
  "app": "Keynote",
  "title": "DSNB-resonance-McGill.key",
  "scratchpad": "",
  "frame": {
    "x": 0,
    "y": 38,
    "w": 1728,
    "h": 1079
  },
  "role": "AXWindow",
  "subrole": "AXStandardWindow",
  "root-window": true,
  "display": 1,
  "space": 4,
  "level": 0,
  "sub-level": 0,
  "layer": "normal",
  "sub-layer": "normal",
  "opacity": 1,
  "split-type": "none",
  "split-child": "second_child",
  "stack-index": 2,
  "can-move": true,
  "can-resize": true,
  "has-focus": false,
  "has-shadow": true,
  "has-parent-zoom": false,
  "has-fullscreen-zoom": false,
  "has-ax-reference": true,
  "is-native-fullscreen": false,
  "is-visible": false,
  "is-minimized": false,
  "is-hidden": false,
  "is-floating": false,
  "is-sticky": false,
  "is-grabbed": false
}
{
  "id": 1759,
  "pid": 5057,
  "app": "Keynote",
  "title": "",
  "scratchpad": "",
  "frame": {
    "x": 664,
    "y": 413,
    "w": 400,
    "h": 328
  },
  "role": "",
  "subrole": "",
  "root-window": false,
  "display": 1,
  "space": 4,
  "level": 0,
  "sub-level": 0,
  "layer": "normal",
  "sub-layer": "normal",
  "opacity": 1,
  "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": true,
  "is-native-fullscreen": false,
  "is-visible": false,
  "is-minimized": false,
  "is-hidden": false,
  "is-floating": true,
  "is-sticky": false,
  "is-grabbed": false
}
{
  "id": 1768,
  "pid": 5057,
  "app": "Keynote",
  "title": "",
  "scratchpad": "",
  "frame": {
    "x": 664,
    "y": 413,
    "w": 400,
    "h": 328
  },
  "role": "",
  "subrole": "",
  "root-window": false,
  "display": 1,
  "space": 4,
  "level": 0,
  "sub-level": 0,
  "layer": "normal",
  "sub-layer": "normal",
  "opacity": 1,
  "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": true,
  "is-native-fullscreen": false,
  "is-visible": false,
  "is-minimized": false,
  "is-hidden": false,
  "is-floating": true,
  "is-sticky": false,
  "is-grabbed": false
}
{
  "id": 2588,
  "pid": 5057,
  "app": "Keynote",
  "title": "",
  "scratchpad": "",
  "frame": {
    "x": 664,
    "y": 413,
    "w": 400,
    "h": 328
  },
  "role": "",
  "subrole": "",
  "root-window": false,
  "display": 1,
  "space": 4,
  "level": 0,
  "sub-level": 0,
  "layer": "normal",
  "sub-layer": "normal",
  "opacity": 1,
  "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": true,
  "is-native-fullscreen": false,
  "is-visible": false,
  "is-minimized": false,
  "is-hidden": false,
  "is-floating": true,
  "is-sticky": false,
  "is-grabbed": false
}
{
  "id": 2594,
  "pid": 5057,
  "app": "Keynote",
  "title": "",
  "scratchpad": "",
  "frame": {
    "x": 664,
    "y": 413,
    "w": 400,
    "h": 328
  },
  "role": "",
  "subrole": "",
  "root-window": false,
  "display": 1,
  "space": 4,
  "level": 0,
  "sub-level": 0,
  "layer": "normal",
  "sub-layer": "normal",
  "opacity": 1,
  "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": true,
  "is-native-fullscreen": false,
  "is-visible": false,
  "is-minimized": false,
  "is-hidden": false,
  "is-floating": true,
  "is-sticky": false,
  "is-grabbed": false
}
{
  "id": 2598,
  "pid": 5057,
  "app": "Keynote",
  "title": "",
  "scratchpad": "",
  "frame": {
    "x": 664,
    "y": 413,
    "w": 400,
    "h": 328
  },
  "role": "",
  "subrole": "",
  "root-window": false,
  "display": 1,
  "space": 4,
  "level": 0,
  "sub-level": 0,
  "layer": "normal",
  "sub-layer": "normal",
  "opacity": 1,
  "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": true,
  "is-native-fullscreen": false,
  "is-visible": false,
  "is-minimized": false,
  "is-hidden": false,
  "is-floating": true,
  "is-sticky": false,
  "is-grabbed": false
}
{
  "id": 2652,
  "pid": 5057,
  "app": "Keynote",
  "title": "",
  "scratchpad": "",
  "frame": {
    "x": 664,
    "y": 413,
    "w": 400,
    "h": 328
  },
  "role": "",
  "subrole": "",
  "root-window": false,
  "display": 1,
  "space": 4,
  "level": 0,
  "sub-level": 0,
  "layer": "normal",
  "sub-layer": "normal",
  "opacity": 1,
  "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": true,
  "is-native-fullscreen": false,
  "is-visible": false,
  "is-minimized": false,
  "is-hidden": false,
  "is-floating": true,
  "is-sticky": false,
  "is-grabbed": false
}

Only the first one is real. I have no idea where the others come from. If I work on keynote for a really long time, the first one may disappear from this query, and yabai loses control of keynote. Restarting keynote will clean all these windows.

@Bellavene
Copy link

Bellavene commented Mar 1, 2025

Try this?

yabai -m rule --add \
         app="Keynote" \
         sub-layer=below \
         manage=off

yabai -m rule --add \
         app="Keynote" \
         role="AXWindow" \
         subrole="AXStandardWindow" \
         sub-layer=normal \
         manage=on

Or this

yabai -m rule --add \
         app="Keynote" \
         role="" \
         subrole="" \
         sub-layer=below \
         manage=off

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

No branches or pull requests

2 participants