Skip to content

Commit

Permalink
Desperate attempt to fix input focus issues
Browse files Browse the repository at this point in the history
  • Loading branch information
Cass committed Aug 9, 2011
1 parent 092adbb commit 4951004
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion lualock.c
Original file line number Diff line number Diff line change
Expand Up @@ -262,7 +262,12 @@ void show_lock(void) {
init_hooks();
init_lua();
update_screen();
gdk_keyboard_grab(lualock.win, TRUE, GDK_CURRENT_TIME);
for (int i = 0; i < 1000; i++) {
if (gdk_keyboard_grab(lualock.win, TRUE, GDK_CURRENT_TIME) == GDK_GRAB_SUCCESS)
break;
usleep(1000);
}

gdk_pointer_grab(lualock.win, TRUE, GDK_BUTTON_PRESS_MASK
| GDK_BUTTON_RELEASE_MASK | GDK_POINTER_MOTION_MASK, NULL,
NULL, GDK_CURRENT_TIME);
Expand Down

0 comments on commit 4951004

Please sign in to comment.