gdk: Drop source_device argument from _gdk_display_device_grab_update()

It's just passed around and used nowhere.
This commit is contained in:
Carlos Garnacho 2020-07-28 23:00:02 +02:00
parent 4a2bbed157
commit 25ea17a6fc
8 changed files with 8 additions and 20 deletions

View File

@ -280,7 +280,6 @@ _gdk_broadway_events_got_input (GdkDisplay *display,
case BROADWAY_EVENT_UNGRAB_NOTIFY:
_gdk_display_device_grab_update (display,
display_broadway->core_pointer,
display_broadway->pointer,
message->base.serial);
break;

View File

@ -603,7 +603,6 @@ get_current_toplevel (GdkDisplay *display,
static void
switch_to_pointer_grab (GdkDisplay *display,
GdkDevice *device,
GdkDevice *source_device,
GdkDeviceGrabInfo *grab,
GdkDeviceGrabInfo *last_grab,
guint32 time,
@ -680,7 +679,6 @@ _gdk_display_update_last_event (GdkDisplay *display,
void
_gdk_display_device_grab_update (GdkDisplay *display,
GdkDevice *device,
GdkDevice *source_device,
gulong current_serial)
{
GdkDeviceGrabInfo *current_grab, *next_grab;
@ -705,7 +703,7 @@ _gdk_display_device_grab_update (GdkDisplay *display,
if (!current_grab->activated)
{
if (gdk_device_get_source (device) != GDK_SOURCE_KEYBOARD)
switch_to_pointer_grab (display, device, source_device, current_grab, NULL, time, current_serial);
switch_to_pointer_grab (display, device, current_grab, NULL, time, current_serial);
}
break;
@ -733,7 +731,7 @@ _gdk_display_device_grab_update (GdkDisplay *display,
g_hash_table_insert (display->device_grabs, device, grabs);
if (gdk_device_get_source (device) != GDK_SOURCE_KEYBOARD)
switch_to_pointer_grab (display, device, source_device,
switch_to_pointer_grab (display, device,
next_grab, current_grab,
time, current_serial);

View File

@ -179,7 +179,6 @@ void _gdk_display_update_last_event (GdkDisplay *display,
GdkEvent *event);
void _gdk_display_device_grab_update (GdkDisplay *display,
GdkDevice *device,
GdkDevice *source_device,
gulong current_serial);
GdkDeviceGrabInfo * _gdk_display_get_last_device_grab (GdkDisplay *display,
GdkDevice *device);

View File

@ -2244,7 +2244,7 @@ _gdk_windowing_got_event (GdkDisplay *display,
source_device = pointer_info->last_physical_device;
}
_gdk_display_device_grab_update (display, device, source_device, serial);
_gdk_display_device_grab_update (display, device, serial);
}
event_surface = gdk_event_get_surface (event);
@ -2272,8 +2272,7 @@ _gdk_windowing_got_event (GdkDisplay *display,
serial,
gdk_event_get_time (event),
TRUE);
_gdk_display_device_grab_update (display, device,
source_device, serial);
_gdk_display_device_grab_update (display, device, serial);
}
}
else if (type == GDK_BUTTON_RELEASE ||
@ -2292,7 +2291,7 @@ _gdk_windowing_got_event (GdkDisplay *display,
{
button_release_grab->serial_end = serial;
button_release_grab->implicit_ungrab = FALSE;
_gdk_display_device_grab_update (display, device, source_device, serial);
_gdk_display_device_grab_update (display, device, serial);
}
}
}

View File

@ -123,7 +123,7 @@ gdk_macos_device_ungrab (GdkDevice *device,
if (grab != NULL)
grab->serial_end = 0;
_gdk_display_device_grab_update (display, device, device, 0);
_gdk_display_device_grab_update (display, device, 0);
}
static void

View File

@ -1515,7 +1515,6 @@ pointer_handle_leave (void *data,
display_serial, NULL, TRUE);
_gdk_display_device_grab_update (seat->display,
seat->logical_pointer,
seat->pointer,
display_serial);
}

View File

@ -151,7 +151,7 @@ gdk_device_virtual_ungrab (GdkDevice *device,
ReleaseCapture ();
}
_gdk_display_device_grab_update (display, device, device, 0);
_gdk_display_device_grab_update (display, device, 0);
}
static void

View File

@ -1760,15 +1760,9 @@ device_grab_update_callback (GdkDisplay *display,
gpointer data,
gulong serial)
{
GdkPointerSurfaceInfo *pointer_info;
GdkDevice *device = data;
pointer_info = _gdk_display_get_pointer_info (display, device);
_gdk_display_device_grab_update (display, device,
pointer_info->last_physical_device != NULL
? pointer_info->last_physical_device
: device,
serial);
_gdk_display_device_grab_update (display, device, serial);
}
#define XSERVER_TIME_IS_LATER(time1, time2) \