[gtk+/xi2: 138/148] Enable GdkWindow multidevice awareness on GTK_MULTIDEVICE.



commit 9146bcc6dc1e73e4f8a841987e1566de13bd8aae
Author: Carlos Garnacho <carlos gnome org>
Date:   Mon Dec 7 21:18:01 2009 +0100

    Enable GdkWindow multidevice awareness on GTK_MULTIDEVICE.
    
    When such flag is set, gdk_window_set_support_multidevice() is called on
    widget->window.

 gtk/gtkwidget.c |    6 ++++++
 1 files changed, 6 insertions(+), 0 deletions(-)
---
diff --git a/gtk/gtkwidget.c b/gtk/gtkwidget.c
index 7d55fb0..922b9bb 100644
--- a/gtk/gtkwidget.c
+++ b/gtk/gtkwidget.c
@@ -3371,6 +3371,9 @@ gtk_widget_realize (GtkWidget *widget)
       mode = gtk_widget_get_extension_events (widget);
       if (mode != GDK_EXTENSION_EVENTS_NONE)
         gtk_widget_set_extension_events_internal (widget, mode, NULL);
+
+      if ((GTK_WIDGET_FLAGS (widget) & GTK_MULTIDEVICE) != 0)
+        gdk_window_set_support_multidevice (widget->window, TRUE);
     }
 }
 
@@ -11142,6 +11145,9 @@ gtk_widget_set_support_multidevice (GtkWidget *widget,
       GTK_WIDGET_UNSET_FLAGS (widget, GTK_MULTIDEVICE);
       gtk_widget_set_extension_events (widget, GDK_EXTENSION_EVENTS_NONE);
     }
+
+  if (GTK_WIDGET_REALIZED (widget))
+    gdk_window_set_support_multidevice (widget->window, support_multidevice);
 }
 
 static GdkEventMotion *



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]