diff options
author | Matthias Clasen <mclasen@redhat.com> | 2005-06-26 06:39:19 +0000 |
---|---|---|
committer | Matthias Clasen <matthiasc@src.gnome.org> | 2005-06-26 06:39:19 +0000 |
commit | 5fb7f69dd8c324df2dfb8969e6c6b3fb5edd36d8 (patch) | |
tree | 79e63f12dbf564e87d63d38e3fc56ee21984627d /gtk | |
parent | d45263d5facd21ef43a2e75c8b525a4cf101450b (diff) | |
download | gdk-pixbuf-5fb7f69dd8c324df2dfb8969e6c6b3fb5edd36d8.tar.gz |
Stop the drag if the grab is broken.
2005-06-26 Matthias Clasen <mclasen@redhat.com>
* gtk/gtkhsv.c (gtk_hsv_grab_broken): Stop the drag if
the grab is broken.
Diffstat (limited to 'gtk')
-rw-r--r-- | gtk/gtkhsv.c | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/gtk/gtkhsv.c b/gtk/gtkhsv.c index 58ea87922..e8dbc19c5 100644 --- a/gtk/gtkhsv.c +++ b/gtk/gtkhsv.c @@ -106,6 +106,8 @@ static gint gtk_hsv_motion (GtkWidget *widget, GdkEventMotion *event); static gint gtk_hsv_expose (GtkWidget *widget, GdkEventExpose *event); +static gboolean gtk_hsv_grab_broken (GtkWidget *widget, + GdkEventGrabBroken *event); static gboolean gtk_hsv_focus (GtkWidget *widget, GtkDirectionType direction); static void gtk_hsv_move (GtkHSV *hsv, @@ -177,6 +179,7 @@ gtk_hsv_class_init (GtkHSVClass *class) widget_class->motion_notify_event = gtk_hsv_motion; widget_class->expose_event = gtk_hsv_expose; widget_class->focus = gtk_hsv_focus; + widget_class->grab_broken_event = gtk_hsv_grab_broken; hsv_class->move = gtk_hsv_move; @@ -773,6 +776,20 @@ set_cross_grab (GtkHSV *hsv, gdk_cursor_unref (cursor); } +static gboolean +gtk_hsv_grab_broken (GtkWidget *widget, + GdkEventGrabBroken *event) +{ + GtkHSV *hsv = GTK_HSV (widget); + HSVPrivate *priv; + + priv = hsv->priv; + + priv->mode = DRAG_NONE; + + return TRUE; +} + /* Button_press_event handler for the HSV color selector */ static gint gtk_hsv_button_press (GtkWidget *widget, |