]> Pileus Git - ~andy/gtk/commitdiff
Revert "x11: Avoid spurious focus events on grabs"
authorMatthias Clasen <mclasen@redhat.com>
Thu, 22 Dec 2011 15:44:28 +0000 (15:44 +0000)
committerMatthias Clasen <mclasen@redhat.com>
Thu, 22 Dec 2011 16:03:56 +0000 (16:03 +0000)
This reverts commit db4a6040afd3d1cabbb306037e811f37d62e2e76.

This is causing bad focus confusion e.g. in gnome-terminal.

gdk/x11/gdkdevicemanager-core-x11.c
gdk/x11/gdkdevicemanager-xi2.c
gdk/x11/gdkdevicemanagerprivate-core.h

index 503ad5489c4cc187b8cfb35ef5722735e35f4a18..156ba8bfd8c163c12546a475f7822dd8667e2161 100644 (file)
@@ -665,7 +665,6 @@ gdk_x11_device_manager_core_translate_event (GdkEventTranslator *translator,
     case FocusIn:
     case FocusOut:
       _gdk_device_manager_core_handle_focus (window,
-                                             xevent->xfocus.window,
                                              device_manager->core_keyboard,
                                              NULL,
                                              xevent->type == FocusIn,
@@ -796,7 +795,6 @@ _gdk_x11_event_translate_keyboard_string (GdkEventKey *event)
  */
 void
 _gdk_device_manager_core_handle_focus (GdkWindow *window,
-                                       Window     original,
                                        GdkDevice *device,
                                        GdkDevice *source_device,
                                        gboolean   focus_in,
@@ -821,9 +819,6 @@ _gdk_device_manager_core_handle_focus (GdkWindow *window,
   if (!toplevel)
     return;
 
-  if (toplevel->focus_window == original)
-    return;
-
   had_focus = HAS_FOCUS (toplevel);
 
   switch (detail)
index f9e4d110f023eb305b7b13a967b9837d2dc3003d..273ca7dfb920e429caca47c98fe5118662e78a32 100644 (file)
@@ -1228,7 +1228,6 @@ gdk_x11_device_manager_xi2_translate_event (GdkEventTranslator *translator,
                                              GUINT_TO_POINTER (xev->sourceid));
 
         _gdk_device_manager_core_handle_focus (window,
-                                               xev->event,
                                                device,
                                                source_device,
                                                (ev->evtype == XI_FocusIn) ? TRUE : FALSE,
index 54463bb2fa89eaff4aaf90b48145b33dfd1cccb0..428b34fdd1c56d0c6ae5d2d2f02b69c581b624dc 100644 (file)
@@ -20,8 +20,6 @@
 #ifndef __GDK_DEVICE_MANAGER_PRIVATE_CORE_H__
 #define __GDK_DEVICE_MANAGER_PRIVATE_CORE_H__
 
-#include <X11/Xlib.h>
-
 #include "gdkx11devicemanager-core.h"
 #include "gdkdevicemanagerprivate.h"
 
@@ -40,7 +38,6 @@ struct _GdkX11DeviceManagerCoreClass
 };
 
 void            _gdk_device_manager_core_handle_focus           (GdkWindow   *window,
-                                                                 Window       original,
                                                                  GdkDevice   *device,
                                                                  GdkDevice   *source_device,
                                                                  gboolean     focus_in,