Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Disable GTK+ scrollbar zoom mode
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Documentation, Tips & Tricks
View previous topic :: View next topic  
Author Message
defer-
Tux's lil' helper
Tux's lil' helper


Joined: 11 Jun 2007
Posts: 132
Location: Finland

PostPosted: Wed Jun 25, 2014 10:57 am    Post subject: Disable GTK+ scrollbar zoom mode Reply with quote

GTK+ has this new feature called zoom mode. When you click-and-hold or long press on the slider it will put the scrollbar into zoom mode. Then the scrollbar moves very slowly. Only half the speed of the cursor. This feature really annoyed me and everybody told me it is impossible to disable it. So i figured out how to disable it on gentoo and thought i should share the solution.

Create patch to increase the GTK+ zoom mode delay:
/etc/portage/patches/x11-libs/gtk+-3.12.2/gtk+-3.12.2-zoom-mode-delay.patch
Code:
diff -upr gtk-upstream/gtk/gtkrange.c gtk+-3.12.2/gtk/gtkrange.c
--- gtk-upstream/gtk/gtkrange.c 2014-06-24 20:55:54.429790047 +0300
+++ gtk+-3.12.2/gtk/gtkrange.c  2014-06-24 20:56:40.589789587 +0300
@@ -64,7 +64,7 @@
 #define UPDATE_DELAY        300  /* Delay for queued update */
 #define TIMEOUT_INITIAL     500
 #define TIMEOUT_REPEAT      50
-#define ZOOM_HOLD_TIME      500
+#define ZOOM_HOLD_TIME      10000
 #define AUTOSCROLL_FACTOR   20
 #define SCROLL_EDGE_SIZE 15


Set portage to call epatch_user() for all ebuilds:
/etc/portage/bashrc
Code:
post_src_unpack() {
        if type epatch_user &> /dev/null ; then
                if [[ -d ${S} ]]; then
                        pushd "${S}" 2>/dev/null
                        epatch_user
                        popd 2>/dev/null
                else
                        epatch_user
                fi
        fi
}


Rebuild GTK+:
# emerge -1 gtk+
_________________
https://github.com/defer-
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Documentation, Tips & Tricks All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum