yabai icon indicating copy to clipboard operation
yabai copied to clipboard

layer=above hides text suggestions

Open TheMathGuyd opened this issue 2 years ago • 1 comments

Expected behavior: When typing into a textbox, sometimes there are suggestions that appear below the input. For example in System Preference, the user can search part of a word like Sec and opt to use the arrow keys to navigate the suggestions, such as Security & Privacy

Current behavior: When an app has layer=above rule in .yabairc then the window blocks the text suggestions, making them useless

My system: MacBook Pro (13-inch, 2016, Four Thunderbolt 3 Ports) 3.3 GHz Dual-Core Intel Core i7, 16 GB 2133 MHz LPDDR3 running macOS Monterey 12.4

To reproduce

Here is a line to add to your .yabairc

yabai -m rule --add app="^System Preferences$" sticky=on     layer=above

Open System Preferences and try searching. Observe the text suggestion box is (mostly) hidden, only allowing its right-most side to be visible because it extends beyond the window.


I am happy to hear of workarounds for this

TheMathGuyd avatar May 27 '22 19:05 TheMathGuyd

Hey, I've spent all day trying to find a workaround for similar issues, think I might've finally figured it out lol.

Instead of setting topmost or layer to on/above (creating the hidden popup/dialogue issue), try setting everything that's NOT meant to be on top/above to below. So in this case you'd put:

yabai -m rule --add app!="^System Preferences$" layer=below
yabai -m rule --add app="^System Preferences$"  sticky=on

(You can also apply it to multiple applications by using an array containing all their names, e.g.):

# applications with custom rules
applications="(Calendar|Mail|Reminders|Notes|Microsoft Outlook|Discord|Messages|Slack|Firefox|Chrome|Code|Microsoft Word|Preview|Terminal|iTerm2|QuickTime|Player|Spotify|Music)"

# NOTE: you need to set the settings for the applications in the 
#       list first, or else they don't apply properly and you can end up with
#       some weird border/float/window behaviours

# everything listed gets sent to below layer to prevent 
# them from covering floating applications/popup windows
yabai -m rule --add app="^${applications}$"    manage=on layer=below

# then any apps that aren't listed above get put to
# float e.g. system preferences, colour meter
yabai -m rule --add app!="^${applications}$"   manage=off border=off

irls-svg avatar Jul 02 '22 06:07 irls-svg

Thanx this works fine for me.

ucchiee avatar Sep 29 '22 12:09 ucchiee

Thank you so much for this! You saved my day.

An even worse issue when we have layer=above activated for System Settings is that neither TouchID nor the Password is accepted in the System Settings > Privacy & Security settings e.g. when changing Full Disk Access or allowing Screen Recording to an app.

Touch ID will do nothing and when entering the password macOS tells that the password is incorrect.

@koekeishiya I believe this is an important issue that should be mentioned in the FAQ (or in the installation instructions).

timhansinger avatar Apr 28 '23 10:04 timhansinger

Possibly related to https://github.com/koekeishiya/yabai/issues/694 I experience similar issues with text suggestions and selection dialogs when I have window_topmost on

brosasaki avatar Jun 22 '23 17:06 brosasaki

No longer necessary to use layer=above in v6.0.0. #1887

koekeishiya avatar Oct 10 '23 21:10 koekeishiya