[gtk+] range: Properly queue draws when doing a drag
- From: Benjamin Otte <otte src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk+] range: Properly queue draws when doing a drag
- Date: Sat, 29 Nov 2014 03:10:16 +0000 (UTC)
commit 95dc96901eb099d0edf4fd75eb30fa5fa8ad74e3
Author: Benjamin Otte <otte redhat com>
Date: Sat Nov 29 03:23:58 2014 +0100
range: Properly queue draws when doing a drag
The dragged area needs to be marked as :active during the drag.
gtk/gtkrange.c | 7 +++----
1 files changed, 3 insertions(+), 4 deletions(-)
---
diff --git a/gtk/gtkrange.c b/gtk/gtkrange.c
index 5a9fe0f..dee93e0 100644
--- a/gtk/gtkrange.c
+++ b/gtk/gtkrange.c
@@ -2247,6 +2247,7 @@ range_grab_add (GtkRange *range,
* is the only widget receiving the pointer events.
*/
priv->grab_location = location;
+ gtk_range_queue_draw_location (range, location);
gtk_style_context_add_class (context, "dragging");
}
@@ -2272,16 +2273,14 @@ static void
range_grab_remove (GtkRange *range)
{
GtkRangePrivate *priv = range->priv;
- MouseLocation location;
GtkStyleContext *context;
context = gtk_widget_get_style_context (GTK_WIDGET (range));
- location = priv->grab_location;
+ gtk_range_queue_draw_location (range, priv->grab_location);
priv->grab_location = MOUSE_OUTSIDE;
- if (gtk_range_update_mouse_location (range) ||
- location != MOUSE_OUTSIDE)
+ if (gtk_range_update_mouse_location (range))
gtk_widget_queue_draw (GTK_WIDGET (range));
update_zoom_state (range, FALSE);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]