lbonn / rofi

Rofi: A window switcher, run dialog and dmenu replacement - fork with wayland support
Other
876 stars 35 forks source link

[BUG] Setting rofi to be triggered by Alt+tab, then repeatedly pressing tab to attempt to step through the icons causes rofi to lock up and block all keyboard input #107

Open winteriscariot opened 7 months ago

winteriscariot commented 7 months ago

Rofi version (rofi -v or git commit in case of build issue)

Version: 1.7.5+wayland2

Configuration

https://gist.githubusercontent.com/winteriscariot/342f950a91f05fbb52f2d0cfa33822d2/raw/eb62dd9b9cfcf4797da765db5a82e81ec6d0ae01/gistfile1.txt

Theme

https://gist.githubusercontent.com/winteriscariot/342f950a91f05fbb52f2d0cfa33822d2/raw/eb62dd9b9cfcf4797da765db5a82e81ec6d0ae01/gistfile1.txt

Timing report

No response

Launch command

rofi -show window \ -icon-theme "Zafiro-Icons-Dark-Black-f" -show-icons \ -hover-select \ -me-select-entry '' \ -me-accept-entry 'MousePrimary' \ -monitor 1 \ -click-to-exit \ -window-format {c:35} \ -eh 2 \ -kb-accept-entry '!Alt+Tab,!Alt+Alt_L,MousePrimary' \ -kb-row-right 'Alt+Tab' \ -kb-row-left '' \ -selected-row 1 \ -theme-str "window { width:$WIDTH%; padding: 17 17 25 17; border: 0;}" \ -theme-str "listview { columns: $ALLWINDOWS; lines: 1; spacing: 15px; border: 2px 0px 0px; padding: 2px 0px 0px; fixed-height: 10;}" \ -theme-str "message { enabled: false; }" \ -theme-str "element-text { enabled: false; }" \ -theme-str "button {width: 500px;}" \ -theme-str 'button selected { border-color: #333; }' \ -theme-str 'element { orientation: vertical; border-radius: 10px; margin: 0; height: 200px; }' \ -theme-str 'element selected { background-color: #333; border: 2px; border-color: #333;}' \ -theme-str 'inputbar { enabled: false; }' \ -theme-str "element-icon { size: 4.65ch ; }" \ -theme-str 'element-icon selected { background-color: #333; }'

Step to reproduce

  1. put the rofi command above in a script (behavior is the same if I raw assign the rofi command)
  2. trigger the script using the Alt+Tab keyboard combo
  3. while holding down Alt, press tab again to attempt to step through the items in the rofi window (as indicated by the following option: -kb-row-right 'Alt+Tab')

Expected behavior

rofi should step its selection through the elements in the window

Actual behavior

rofi locks up and blocks all input on the desktop. this block appears to be temporary -- some sort of timeout? -- because after a few seconds I can once again type in my terminal in order to kill rofi

Additional information

i'm using this in the labwc compositor

Using wayland display server protocol

I've checked if the issue exists in the latest stable release

lbonn commented 6 months ago

@winteriscariot same comment as here basically https://github.com/lbonn/rofi/issues/106#issuecomment-1880067339

I don't know a good solution to support this alt-tab behavior unfortunately

See also this discussion https://lists.sr.ht/~tsdh/public-inbox/%3CCAKDzfnqk1%3DoJtbO19XqOiL%3DL7%3Dofyc_uBkSeqmZ_QbsynV8x8g%40mail.gmail.com%3E

lbonn commented 4 months ago

@winteriscariot actually, this may work with the new option usings the keyboard inhibitor protocol (if labwc supports it).

You can try to add the -global-kb option (on a recent git build) to your rofi invocations and it will try to take over bindings from the compositor.