[gtk+] gdkwindow: Do not rely on a previous slave device when updating grab



commit 03d405e4849f698959675056607c56c6ca35d072
Author: Rob Bradford <rob linux intel com>
Date:   Wed Jan 23 16:55:59 2013 +0000

    gdkwindow: Do not rely on a previous slave device when updating grab
    
    _gdk_display_device_grab_update does not support passing in NULL for the
    source device. If we don't have a slave device (saved in the pointer info)
    then do not try and use that NULL pointer for the source_device.
    
    This bug appeared in the Wayland backend where we (currently) only have master
    devices exposed and as such no slave device is ever saved.
    
    Fixes: https://bugzilla.gnome.org/show_bug.cgi?id=692411

 gdk/gdkwindow.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
---
diff --git a/gdk/gdkwindow.c b/gdk/gdkwindow.c
index 7afcd96..1aa11f1 100644
--- a/gdk/gdkwindow.c
+++ b/gdk/gdkwindow.c
@@ -9911,7 +9911,7 @@ _gdk_windowing_got_event (GdkDisplay *display,
           if (source_device != pointer_info->last_slave &&
               gdk_device_get_device_type (source_device) == GDK_DEVICE_TYPE_SLAVE)
             pointer_info->last_slave = source_device;
-          else
+          else if (pointer_info->last_slave)
             source_device = pointer_info->last_slave;
         }
 



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]