Skip to content
New issue

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

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

Already on GitHub? # to your account

Opacity affects dropdowns in active application #120

Closed
jessemillar opened this issue Jul 12, 2019 · 7 comments
Closed

Opacity affects dropdowns in active application #120

jessemillar opened this issue Jul 12, 2019 · 7 comments
Labels
bug Something isn't working

Comments

@jessemillar
Copy link

It appears that setting normal_window_opacity to a non-1 value causes dropdowns (e.g. URL suggestions in Firefox and non-styled HTML dropdowns on web pages) to be transparent. I couldn't find anything obvious in the docs about how to disable or modify this.

This is my .yabairc config and I'm running without SIP enabled and with the scripting-addition installed.

I'm not sure if this is somehow related to #33

@dominiklohmann
Copy link
Collaborator

Definitely not related to the linked issue. It's likely that Firefox spawns some windows that are recognised as non-focused windows, e.g. the URL dropdown. You can list all windows recognised by yabai on the focused space by running yabai -m query --windows --space | jq (get jq using brew install jq if you don't have it already). You will likely notice multiple Firefox entries while the Firefox URL dropdown is active.

@dominiklohmann
Copy link
Collaborator

dominiklohmann commented Jul 12, 2019

Installed Firefox and confirmed my suspicion. Notice how there's an additional Firefox window with a subrole of AXUnknown, which is the URL dropdown.

@koekeishiya Is there a specific reason not to ignore subrole=AXUnknown completely? Chrome has the same issue.

yabai -m query --windows --space | jq
[
  {
    "id": 80739,
    "pid": 97250,
    "app": "Firefox",
    "title": "",
    "frame": {
      "x": 20,
      "y": 116,
      "w": 810,
      "h": 355
    },
    "level": 0,
    "role": "AXWindow",
    "subrole": "AXUnknown",
    "movable": 1,
    "resizable": 0,
    "display": 1,
    "space": 2,
    "focused": 0,
    "split": "none",
    "floating": 1,
    "sticky": 0,
    "border": 0,
    "zoom-parent": 0,
    "zoom-fullscreen": 0,
    "native-fullscreen": 0
  },
  {
    "id": 80725,
    "pid": 97250,
    "app": "Firefox",
    "title": "",
    "frame": {
      "x": 20,
      "y": 42,
      "w": 810,
      "h": 988
    },
    "level": 0,
    "role": "AXWindow",
    "subrole": "AXStandardWindow",
    "movable": 1,
    "resizable": 1,
    "display": 1,
    "space": 2,
    "focused": 1,
    "split": "vertical",
    "floating": 0,
    "sticky": 0,
    "border": 0,
    "zoom-parent": 0,
    "zoom-fullscreen": 0,
    "native-fullscreen": 0
  },
  {
    "id": 80734,
    "pid": 96090,
    "app": "iTerm2",
    "title": "",
    "frame": {
      "x": 850,
      "y": 42,
      "w": 810,
      "h": 988
    },
    "level": 0,
    "role": "AXWindow",
    "subrole": "AXStandardWindow",
    "movable": 1,
    "resizable": 1,
    "display": 1,
    "space": 2,
    "focused": 0,
    "split": "vertical",
    "floating": 0,
    "sticky": 0,
    "border": 0,
    "zoom-parent": 0,
    "zoom-fullscreen": 0,
    "native-fullscreen": 0
  }
]

@koekeishiya
Copy link
Owner

I think it had something to do with how all windows had to be known, in the offchance that a window is made topmost - then all its child windows must also be made topmost, and so we have to know about them.

I suppose the opacity functionality could filter away all non-standard windows, if that feels more appropriate.

@dominiklohmann
Copy link
Collaborator

I think this applies to both opacity and also window queries.

@koekeishiya
Copy link
Owner

koekeishiya commented Jul 12, 2019

The reason they are a part of window queries is so that people can find windows that really should be managed and write appropriate rules, cough Emacs people cough

@dominiklohmann
Copy link
Collaborator

Alright, I'll better get used to writing map(select(.subrole != \"AXUnknown\")) then. 🤷‍♂

@koekeishiya
Copy link
Owner

Opacity will now only apply to windows that report a role of AXStandardWindow or AXDialog.

@koekeishiya koekeishiya added addressed on master; not released Fixed upstream, but not yet released bug Something isn't working labels Jul 13, 2019
@koekeishiya koekeishiya removed the addressed on master; not released Fixed upstream, but not yet released label Jul 13, 2019
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants