swaywm / sway

i3-compatible Wayland compositor
https://swaywm.org
MIT License
14.75k stars 1.11k forks source link

menu only opens on release of $mod+c, not on press as expected #4625

Open mielouk opened 5 years ago

mielouk commented 5 years ago

swaymsg -t get_version sway version 1.2 (Sep 26 2019, Arch Linux)

sway -d 2> ~/sway.log https://8n1.org/16060/57bc on IRC #sway the user emersion said the keypresses are not visible in the log, which he finds weird. He also suggested to include
libinput debug-events https://8n1.org/16061/df19

When calling the menu via $mod+c I've to be conscious about releasing $mod last, to let the menu appear. If I release 'c' last, I've to hit $mod again to let the menu appear. So it is each time a conscious effort to release $mod last to make it work the first time.

Is there a way to make it work on press rather than on release of $mod?

dinnymate commented 5 years ago

hmm. What menu is this? I'm using dmenu and it opens on press of c. It's the same with my terminal. When i press down the enter key it instantly opens.

RedSoxFan commented 5 years ago

Your debug log is using the wayland backend. What compositor are you running sway within? It looks like that is what's handling your binding.

mielouk commented 5 years ago

@dinnymate All other bindings work on first press as intended. This is bemenu, a menu for wayland, as dmenu is X only. ArchWiki Reddit

@RedSoxFan Not sure what you mean as

sway is an i3-compatible Wayland compositor SwayGitHub

and I didn't change the default.

Emantor commented 5 years ago

@mielouk You are not starting sway from within a virtual console, your sway session seems to be started in a session which is already running a wayland compositor. This way the outer wayland compositor may eat the keypresses, since sway is handed the keypresses by the outer compositor. Also note that running sway from a login manager is not supported.

mielouk commented 5 years ago

No, I start sway after logging in on TTY1. In the past I tried it with SDDM, but that lead to problems, as you suggest. I've been logging in via TTY1 and then typing 'sway' for many weeks. Could you point out what part of the log you are referring to? I'm not aware of any extra steps.

emersion commented 5 years ago
2019-10-11 12:09:39 - [backend/wayland/backend.c:189] Creating wayland backend
mielouk commented 5 years ago

Isn't this setup by BEMENU_BACKEND=wayland which I've put in my .zshrc?

You may need to set BEMENU_BACKEND environment variable to "wayland" if you choose not to disable XWayland. ArchWiki-Sway

emersion commented 5 years ago

No. This line is printed by Sway. It means you're starting Sway from within Sway.

mielouk commented 5 years ago

Here is my complete config There is no extra call for sway, neither is there one in my .zshrc. Why would bemenu be the only one affected?

mielouk commented 5 years ago

Here is a new log without sway being started from within sway no [backend/wayland/backend.c:189] Creating wayland backend in there. so the actions regarding the menu should be visible now. Sorry for my stupidity!