[gtk+] gtkwindow: Resort to regular event bubbling by all means on non-toplevels
- From: Carlos Garnacho <carlosg src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk+] gtkwindow: Resort to regular event bubbling by all means on non-toplevels
- Date: Tue, 4 Nov 2014 18:10:10 +0000 (UTC)
commit d9a433daf74852c0e9eabf8a12c4890c32b5890b
Author: Carlos Garnacho <carlosg gnome org>
Date: Tue Nov 4 17:08:49 2014 +0100
gtkwindow: Resort to regular event bubbling by all means on non-toplevels
If the multipress gesture is not created (ie. not a toplevel GtkWindow),
also avoid possibly calling gtk_widget_event() on the events gotten here.
gtk/gtkwindow.c | 6 ++++++
1 files changed, 6 insertions(+), 0 deletions(-)
---
diff --git a/gtk/gtkwindow.c b/gtk/gtkwindow.c
index ac3b5c0..76b59de 100644
--- a/gtk/gtkwindow.c
+++ b/gtk/gtkwindow.c
@@ -7735,6 +7735,7 @@ gtk_window_handle_wm_event (GtkWindow *window,
gboolean
_gtk_window_check_handle_wm_event (GdkEvent *event)
{
+ GtkWindowPrivate *priv;
GtkWidget *widget;
widget = gtk_get_event_widget (event);
@@ -7742,6 +7743,11 @@ _gtk_window_check_handle_wm_event (GdkEvent *event)
if (!GTK_IS_WINDOW (widget))
return GDK_EVENT_PROPAGATE;
+ priv = GTK_WINDOW (widget)->priv;
+
+ if (!priv->multipress_gesture)
+ 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)
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]