mirror of
https://gitlab.gnome.org/GNOME/gtk.git
synced 2024-11-05 16:20:10 +00:00
gdk: do not fallback to event->xany.window in GdkEventTranslator
This is already done in gdk_event_source_get_filter_window(), and could lead to wrong event assignment if an event translator happens to return a window for an event it doesn't handle.
This commit is contained in:
parent
2c192cf998
commit
3285605c54
@ -94,17 +94,13 @@ _gdk_x11_event_translator_get_window (GdkEventTranslator *translator,
|
||||
XEvent *xevent)
|
||||
{
|
||||
GdkEventTranslatorIface *iface;
|
||||
GdkWindow *window = NULL;
|
||||
|
||||
g_return_val_if_fail (GDK_IS_EVENT_TRANSLATOR (translator), NULL);
|
||||
|
||||
iface = GDK_EVENT_TRANSLATOR_GET_IFACE (translator);
|
||||
|
||||
if (iface->get_window)
|
||||
window = iface->get_window (translator, xevent);
|
||||
return iface->get_window (translator, xevent);
|
||||
|
||||
if (!window)
|
||||
window = gdk_x11_window_lookup_for_display (display, xevent->xany.window);
|
||||
|
||||
return window;
|
||||
return NULL;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user