-
Notifications
You must be signed in to change notification settings - Fork 590
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
Using xmodmap prevent awesome from receiving (at least) mod4-combinations for about a second per event #1494
Comments
Just since no one said so yet: I cannot reproduce this. For the backtrace: Awesome is handling the event telling it that the keymap changed and now seems to be querying the new keymap from the server ( |
I can reproduce. Here's my (messy) Xmodmap file (setxkbmap us) +
|
Now, that is extremely useful. The following can be used to reproduce this:
The above results for me in:
So... would telling people not to use The issue at hand seems to be that awesome gets a "keyboard config changed" event for every
I don't understand. The first part says "setxkbmap does not cause this problem" while the second part says "setxkbmap also causes this problem". |
I'm bitten by the bug, using Xmodmap, anything to workaround it ? |
As far as I know: Do not use obsolete tools like |
When the keyboard layout is modified via xmodmap, each single "change" (line of input to xmodmap) causes an "the keyboard configuration changed"-event to be sent. Awesome reacted to each of these events by reloading the keyboard layout. Thus, awesome reloaded the keyboard layout a lot and appeared to freeze. Fix this by asynchronously update the keyboard state: When such an event comes in, instead of reloading things immediately, we set a flag which makes us update the state at the end of the main loop iteration. This means that many events still cause only a single (or at least few) re-quering of the layout. Thus, a lot of time is saved. This commit removes the argument to the (undocumented!) signal xkb::group_changed. Previously, the argument was the active group number. Since this argument was unused and I'm lazy, I just removed it. The alternative would be that it might be visible to Lua that some "the active group changed"-events are dropped. Fixes: awesomeWM#1494 Signed-off-by: Uli Schlachter <psychon@znc.in>
When the keyboard layout is modified via xmodmap, each single "change" (line of input to xmodmap) causes an "the keyboard configuration changed"-event to be sent. Awesome reacted to each of these events by reloading the keyboard layout. Thus, awesome reloaded the keyboard layout a lot and appeared to freeze. Fix this by asynchronously update the keyboard state: When such an event comes in, instead of reloading things immediately, we set a flag which makes us update the state at the end of the main loop iteration. This means that many events still cause only a single (or at least few) re-quering of the layout. Thus, a lot of time is saved. This commit removes the argument to the (undocumented!) signal xkb::group_changed. Previously, the argument was the active group number. Since this argument was unused and I'm lazy, I just removed it. The alternative would be that it might be visible to Lua that some "the active group changed"-events are dropped. Fixes: awesomeWM#1494 Signed-off-by: Uli Schlachter <psychon@znc.in>
When the keyboard layout is modified via xmodmap, each single "change" (line of input to xmodmap) causes an "the keyboard configuration changed"-event to be sent. Awesome reacted to each of these events by reloading the keyboard layout. Thus, awesome reloaded the keyboard layout a lot and appeared to freeze. Fix this by asynchronously update the keyboard state: When such an event comes in, instead of reloading things immediately, we set a flag which makes us update the state at the end of the main loop iteration. This means that many events still cause only a single (or at least few) re-quering of the layout. Thus, a lot of time is saved. This commit removes the argument to the (undocumented!) signal xkb::group_changed. Previously, the argument was the active group number. Since this argument was unused and I'm lazy, I just removed it. The alternative would be that it might be visible to Lua that some "the active group changed"-events are dropped. Fixes: awesomeWM#1494 Signed-off-by: Uli Schlachter <psychon@znc.in>
Output of
awesome --version
:awesome v4.0 (Harder, Better, Faster, Stronger)
• Compiled against Lua 5.3.3 (running with Lua 5.3)
• D-Bus support: ✔
• execinfo support: ✔
• RandR 1.5 support: ✔
• LGI version: 0.9.1
How to reproduce the issue:
Run an xmodmap command, e.g.
$ xmodmap -e "keycode 49 = grave asciitilde dead_tilde dead_caron"
Actual result:
xmodmap returns immediately. For a bit less than a second awesome does not receive (at least) commands sent with mod4, such as mod4+number to switch workspace. The delay increases linearly with the number of events run.
There is a backtrace available.
Expected result:
awesome should receive commands all the time.
The text was updated successfully, but these errors were encountered: