[gtk+] scrolledwindow: Don't hover the scrollbars while a button is being pressed
- From: Carlos Garnacho <carlosg src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk+] scrolledwindow: Don't hover the scrollbars while a button is being pressed
- Date: Thu, 5 Feb 2015 16:24:43 +0000 (UTC)
commit 6b82ad48f65add2ae10392c65c431975dc969a69
Author: Carlos Garnacho <carlosg gnome org>
Date: Thu Feb 5 17:16:21 2015 +0100
scrolledwindow: Don't hover the scrollbars while a button is being pressed
This avoids showing the scrollbars if we are positive the child widget
is being manipulated, regardless of the pointer being close to any of these.
On the next motion event after finishing the operation, the scrollbar will
be shown if necessary.
https://bugzilla.gnome.org/show_bug.cgi?id=743894
gtk/gtkscrolledwindow.c | 8 +++++++-
1 files changed, 7 insertions(+), 1 deletions(-)
---
diff --git a/gtk/gtkscrolledwindow.c b/gtk/gtkscrolledwindow.c
index d469668..84fa957 100644
--- a/gtk/gtkscrolledwindow.c
+++ b/gtk/gtkscrolledwindow.c
@@ -1090,7 +1090,13 @@ captured_event_cb (GtkWidget *widget,
indicator_start_fade (&priv->hindicator, 1.0);
indicator_start_fade (&priv->vindicator, 1.0);
- if (strstr (gdk_device_get_name (source_device), "TrackPoint"))
+ if ((event->motion.state &
+ (GDK_BUTTON1_MASK | GDK_BUTTON2_MASK | GDK_BUTTON3_MASK)) != 0)
+ {
+ indicator_set_over (&priv->hindicator, FALSE);
+ indicator_set_over (&priv->vindicator, FALSE);
+ }
+ else if (strstr (gdk_device_get_name (source_device), "TrackPoint"))
{
indicator_set_over (&priv->hindicator, TRUE);
indicator_set_over (&priv->vindicator, TRUE);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]