gdkwindow: don't use last_slave for the source device if it is NULL

Some backends do not have slave devices, which means last_slave may be
NULL. Use the current device as the source device if last_slave is NULL
when synthesizing a crossing event.

https://bugzilla.gnome.org/show_bug.cgi?id=692411
This commit is contained in:
Thomas Wood 2013-02-07 11:59:31 +00:00
parent a8862727c9
commit 8568d66a73

View File

@ -9164,10 +9164,17 @@ do_synthesize_crossing_event (gpointer data)
serial);
if (new_window_under_pointer != pointer_info->window_under_pointer)
{
GdkDevice *source_device;
if (pointer_info->last_slave)
source_device = pointer_info->last_slave;
else
source_device = device;
_gdk_synthesize_crossing_events (display,
pointer_info->window_under_pointer,
new_window_under_pointer,
device, pointer_info->last_slave,
device, source_device,
GDK_CROSSING_NORMAL,
pointer_info->toplevel_x,
pointer_info->toplevel_y,