mirror of
https://gitlab.gnome.org/GNOME/gtk.git
synced 2024-12-28 22:41:43 +00:00
gtkwindowhandle: Avoid gdk_device_get_associated_device()
Query the seat for that.
This commit is contained in:
parent
fb9db7fede
commit
6e83d1f54e
@ -157,6 +157,7 @@ do_popup_fallback (GtkWindowHandle *self,
|
||||
{
|
||||
GdkRectangle rect = { 0, 0, 1, 1 };
|
||||
GdkDevice *device;
|
||||
GdkSeat *seat;
|
||||
GtkWidget *box, *menuitem;
|
||||
GtkWindow *window;
|
||||
gboolean maximized, resizable, deletable;
|
||||
@ -186,9 +187,10 @@ do_popup_fallback (GtkWindowHandle *self,
|
||||
|
||||
|
||||
device = gdk_event_get_device (event);
|
||||
seat = gdk_event_get_seat (event);
|
||||
|
||||
if (device && gdk_device_get_source (device) == GDK_SOURCE_KEYBOARD)
|
||||
device = gdk_device_get_associated_device (device);
|
||||
if (device == gdk_seat_get_keyboard (seat))
|
||||
device = gdk_seat_get_pointer (seat);
|
||||
|
||||
if (device)
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user