forked from AuroraMiddleware/gtk
gtkwindow: run ::event and specific handlers for EWMH action triggering events
This gives an opportunity for implementations to handle these events differently, instead of hardcoding the WM-triggering behavior. gtk_window_event() only forwards events for WM management if the event widget is not the window (ie. caught when bubbling), so is safe to be called here without triggering gtk_window_handle_wm_event() twice. This commit is an adaption to master of https://bugzilla.gnome.org/show_bug.cgi?id=736702#c1 by Cosimo Cecchi.
This commit is contained in:
parent
f96437317b
commit
6b7b55f9b2
@ -7654,6 +7654,14 @@ _gtk_window_check_handle_wm_event (GdkEvent *event)
|
||||
if (!GTK_IS_WINDOW (widget))
|
||||
return GDK_EVENT_PROPAGATE;
|
||||
|
||||
if (event->type != GDK_BUTTON_PRESS && event->type != GDK_BUTTON_RELEASE &&
|
||||
event->type != GDK_MOTION_NOTIFY && event->type != GDK_TOUCH_BEGIN &&
|
||||
event->type != GDK_TOUCH_END && event->type != GDK_TOUCH_UPDATE)
|
||||
return GDK_EVENT_PROPAGATE;
|
||||
|
||||
if (gtk_widget_event (widget, event))
|
||||
return GDK_EVENT_STOP;
|
||||
|
||||
return gtk_window_handle_wm_event (GTK_WINDOW (widget), event);
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user