# HG changeset patch # User Sascha Hlusiak # Date 1201257250 -3600 # Node ID b2a2ca9fceda12ca9cd7949d942158cfbd6d1648 # Parent a9f52daf13ba8457f1dfac3de4081c14a6924b61 Hotkey: Setup event filter on all screens as well to grab all key events. Should fix bug #119 now. diff -r a9f52daf13ba -r b2a2ca9fceda src/hotkey/grab.c --- a/src/hotkey/grab.c Thu Jan 24 18:57:40 2008 +0100 +++ b/src/hotkey/grab.c Fri Jan 25 11:34:10 2008 +0100 @@ -191,16 +191,13 @@ void grab_keys ( ) { - GdkDisplay* display; Display* xdisplay; - GdkWindow *root_window; - int i; + int screen; PluginConfig* plugin_cfg = get_config(); HotkeyConfiguration *hotkey; XErrorHandler old_handler = 0; - display = gdk_display_get_default(); - xdisplay = GDK_DISPLAY_XDISPLAY(display); + xdisplay = GDK_DISPLAY_XDISPLAY(gdk_display_get_default()); if (grabbed) return; @@ -212,10 +209,9 @@ hotkey = &(plugin_cfg->first); while (hotkey) { - for (i=0;inext; } @@ -295,16 +291,13 @@ void ungrab_keys ( ) { - GdkDisplay* display; Display* xdisplay; - GdkWindow *root_window; - int i; + int screen; PluginConfig* plugin_cfg = get_config(); HotkeyConfiguration *hotkey; XErrorHandler old_handler = 0; - display = gdk_display_get_default(); - xdisplay = GDK_DISPLAY_XDISPLAY(display); + xdisplay = GDK_DISPLAY_XDISPLAY(gdk_display_get_default()); if (!grabbed) return; if (!xdisplay) return; @@ -317,10 +310,9 @@ hotkey = &(plugin_cfg->first); while (hotkey) { - for (i=0;inext; } @@ -387,16 +379,32 @@ gboolean setup_filter() { - gdk_window_add_filter(gdk_get_default_root_window(), - gdk_filter, - NULL); + GdkDisplay *display; + int screen; + + display = gdk_display_get_default(); + + for (screen = 0; screen