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

[BUG] Rofi doesn't disappear after releasing the indicated keys #106

Open
2 tasks done
winteriscariot opened this issue Dec 13, 2023 · 4 comments
Open
2 tasks done
Labels

Comments

@winteriscariot
Copy link

winteriscariot commented Dec 13, 2023

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 -kb-accept-entry '!Alt+Tab,MousePrimary' -kb-row-right 'Alt-Tab'

Step to reproduce

launch rofi in wayland native with window mode using the alt-tab binding as set in labwc rc.xml

launch the command with the assigned keybinding

Expected behavior

The rofi window should disappear after I release alt-tab and focus the currently selected window

Actual behavior

Upon triggering the rofi command with the keybinding, the rofi window appears and stays. it does not disappear after I release 'alt tab'.

additionally, holding down alt and pressing tab repeatedly does not cycle through the rofi entries

Additional information

I'm basically using the same script on X11 and it works as expected.

I'm not sure if this is actually a bug or simply a limitation on the wayland native version of rofi

Using wayland display server protocol

  • Yes, I use rofi with wayland support

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

  • Yes, I have checked the problem exists in the latest stable version
@lbonn
Copy link
Owner

lbonn commented Jan 7, 2024

@winteriscariot maybe you bound Alt-Tab to launching rofi in your compositor and it is eating up your key-presses?

I have not tried to reproduce the familiar Alt-Tab from classic desktops with rofi, it is a bit tricky

@Tommimon
Copy link

The problem has been discussed on the original rofi repo in this issue.
Proposed solution: -kb-accept-entry "!Alt-Tab,!Alt+Alt_L"
This is the solution proposed by the maintainer and should accept the entry when releasing Alt key, but it is not working for me on rofi-wayland.

@lbonn
Copy link
Owner

lbonn commented Jul 16, 2024

@Tommimon Actually, I was playing with this a few months ago and it almost works with the -global-kb flag which was added in 1.7.5+wayland3. Full list of flags would be:

-kb-accept-entry '!Alt-Tab,!Alt+Alt_L,Return' -kb-row-down 'Alt+Tab,Down' -kb-row-up 'Alt+ISO_Left_Tab,Up' -global-kb

On sway, it still does not work with the first release of Alt sadly (eg. Alt-Tab-Release). But it works with subsequent Tab presses followed by release (Alt-Tab-Tab-Release).
Problem has been with getting the modifiers status when rofi is launched, I think it is a sway/wayland limitation but it might be something with rofi's keybindings logic.

@Tommimon
Copy link

Same limitation on Hyprland. This is something that happened also on X at the beginning but later they fixed this issue in the original rofi repo, maybe it is possible to do it also on wayland.

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

No branches or pull requests

3 participants