]> code.delx.au - gnu-emacs/commitdiff
* src/xterm.c (x_term_init): Move call to gdk_window_add_filter before
authorJan Djärv <jan.h.d@swipnet.se>
Sat, 10 Dec 2011 22:53:28 +0000 (23:53 +0100)
committerJan Djärv <jan.h.d@swipnet.se>
Sat, 10 Dec 2011 22:53:28 +0000 (23:53 +0100)
gtk_init.

Fixes: debbugs:10100
src/ChangeLog
src/xterm.c

index 94db6c686056b85030e309e3f88e829402fb3106..20fd021a3760a2ad620ef1f5f6192f6962a8b52a 100644 (file)
@@ -1,3 +1,8 @@
+2011-12-10  Jan Djärv  <jan.h.d@swipnet.se>
+
+       * xterm.c (x_term_init): Move call to gdk_window_add_filter before
+       gtk_init (Bug#10100).
+
 2011-12-10  Eli Zaretskii  <eliz@gnu.org>
 
        * xdisp.c (RECORD_MAX_MIN_POS): Use IT->cmp_it.charpos only if
index abe52238415ca91cd63cfe5164e71ffa09190a14..1f995b3c1a0f01aac476ce70bf28618fb09bee46 100644 (file)
@@ -9961,6 +9961,11 @@ x_term_init (Lisp_Object display_name, char *xrm_option, char *resource_name)
            https://bugzilla.gnome.org/show_bug.cgi?id=563627.  */
         id = g_log_set_handler ("GLib", G_LOG_LEVEL_WARNING | G_LOG_FLAG_FATAL
                                   | G_LOG_FLAG_RECURSION, my_log_handler, NULL);
+
+        /* NULL window -> events for all windows go to our function.
+           Call before gtk_init so Gtk+ event filters comes after our.  */
+        gdk_window_add_filter (NULL, event_handler_gdk, NULL);
+
         gtk_init (&argc, &argv2);
         g_log_remove_handler ("GLib", id);
 
@@ -9970,9 +9975,6 @@ x_term_init (Lisp_Object display_name, char *xrm_option, char *resource_name)
 
         dpy = DEFAULT_GDK_DISPLAY ();
 
-        /* NULL window -> events for all windows go to our function */
-        gdk_window_add_filter (NULL, event_handler_gdk, NULL);
-
 #if GTK_MAJOR_VERSION <= 2 && GTK_MINOR_VERSION <= 90
         /* Load our own gtkrc if it exists.  */
         {