[gimp] Bug 688305 - drag and drop for guides broken if 'gtk-enable-tooltips = 0' is set



commit 85a099f988ef007348c905b2f8780e032735cdea
Author: Michael Natterer <mitch gimp org>
Date:   Sun Nov 18 20:02:51 2012 +0100

    Bug 688305 - drag and drop for guides broken if 'gtk-enable-tooltips = 0' is set
    
    Fix GimpSpinScale too: add the needed events ourselves, and handle
    motion hints (which the parent classes add) in motion().

 app/widgets/gimpspinscale.c |    9 +++++++++
 1 files changed, 9 insertions(+), 0 deletions(-)
---
diff --git a/app/widgets/gimpspinscale.c b/app/widgets/gimpspinscale.c
index acc5ac6..169c83e 100644
--- a/app/widgets/gimpspinscale.c
+++ b/app/widgets/gimpspinscale.c
@@ -139,6 +139,13 @@ gimp_spin_scale_init (GimpSpinScale *scale)
 {
   GimpSpinScalePrivate *private = GET_PRIVATE (scale);
 
+  gtk_widget_add_events (GTK_WIDGET (scale),
+                         GDK_BUTTON_PRESS_MASK   |
+                         GDK_BUTTON_RELEASE_MASK |
+                         GDK_POINTER_MOTION_MASK |
+                         GDK_BUTTON1_MOTION_MASK |
+                         GDK_LEAVE_NOTIFY_MASK);
+
   gtk_entry_set_alignment (GTK_ENTRY (scale), 1.0);
   gtk_entry_set_has_frame (GTK_ENTRY (scale), FALSE);
   gtk_spin_button_set_numeric (GTK_SPIN_BUTTON (scale), TRUE);
@@ -540,6 +547,8 @@ gimp_spin_scale_motion_notify (GtkWidget      *widget,
 {
   GimpSpinScalePrivate *private = GET_PRIVATE (widget);
 
+  gdk_event_request_motions (event);
+
   if (private->changing_value)
     {
       gimp_spin_scale_change_value (widget, event->x);



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