mirror of
https://github.com/awesomeWM/awesome
synced 2024-11-17 07:47:41 +01:00
[awesome-menu] Try harder to grab keyboard
Signed-off-by: Julien Danjou <julien@danjou.info>
This commit is contained in:
parent
b9c2d11d83
commit
5b7200daf2
1 changed files with 8 additions and 2 deletions
|
@ -620,8 +620,14 @@ main(int argc, char **argv)
|
|||
|
||||
compute_match();
|
||||
|
||||
if(XGrabKeyboard(disp, DefaultRootWindow(disp), True,
|
||||
GrabModeAsync, GrabModeAsync, CurrentTime) != GrabSuccess)
|
||||
for(opt = 1000; opt; opt--)
|
||||
{
|
||||
if(XGrabKeyboard(disp, DefaultRootWindow(disp), True,
|
||||
GrabModeAsync, GrabModeAsync, CurrentTime) == GrabSuccess)
|
||||
break;
|
||||
usleep(1000);
|
||||
}
|
||||
if(!opt)
|
||||
eprint("cannot grab keyboard");
|
||||
|
||||
redraw();
|
||||
|
|
Loading…
Reference in a new issue