Bug 1495520

Summary: Right click on a scroll bar scrolls slowly instead of paging
Product: Red Hat Enterprise Linux 7 Reporter: Dmitry Zhukovski <dzhukous>
Component: gtk3Assignee: Benjamin Otte <otte>
Status: CLOSED WONTFIX QA Contact: Desktop QE <desktop-qa-list>
Severity: high Docs Contact:
Priority: high    
Version: 7.4CC: debarshir, egmont, vbudikov
Target Milestone: rc   
Target Release: ---   
Hardware: x86_64   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2017-11-07 13:18:05 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Dmitry Zhukovski 2017-09-26 08:56:40 UTC
Description of problem:
Right click on a scroll bar in gnome-terminal does not make page up or down but rather scrolling smooth. Customer is asking to return the old behaviour or describe some settings that will mimic the behaviour from rhel 7.3

Version-Release number of selected component (if applicable):
gnome-terminal 3.22.1-2.el7

How reproducible:
Any time

Steps to Reproduce:
1. open gnome terminal. cat some long file so it makes several pages
2. right mouse click in empty area above scroll bar
3.

Actual results:
it moves up by 1/4-1/2 line on single click. If you keep pressing mouse then it smoothly moving up


Expected results:
in rhel7.3 it was jumping on one page up(or down depends where you click - above or below scroll bar)


Additional info:
It looks like this change was implemented in 3.21[1]:
-------------
    window: Support animated and touch scrolling
    
    Add back code to conditionally compile TerminalScreenContainer
    to use a GtkScrolledWindow instead of creating our own GtkScrollbar.
    When used, this gives us animated and touch scrolling for free.
    We can mimic the existing behaviour by creating a GtkScrolledWindow
    that never scrolls horizontally, but always vertically. We can
    use the new EXTERNAL policy to hide the vertical scrollbar widget
    depending on the setting.
    
    However, GtkScrolledWindow doesn't work with
    GTK_SIZE_REQUEST_CONSTANT_SIZE children, so this code will only
    exist for development purposes until gtk+ fixes this.
    
    Also install custom CSS to hide GtkScrolledWindow over/underscroll
    animations.
    
    Also reverts commit 41eb2ec73653adc5fd36fa73cebdc8a6169f8516
    
    https://bugzilla.gnome.org/show_bug.cgi?id=733210
--------------------




[1] https://ftp.gnome.org/pub/gnome/sources/gnome-terminal/3.21/gnome-terminal-3.21.90.changes

Comment 2 Egmont Koblinger 2017-09-26 09:10:17 UTC
Also somewhat relevant: https://git.gnome.org/browse/vte/commit/?id=a9b0b4c and https://bugzilla.gnome.org/show_bug.cgi?id=786778. For the time being, Ctrl+Shift+Up/Down can be used to snap the view to aligned lines (and later, scroll by a line).

As I understand, you're mostly worried about the huge difference between scrolling by a complete page (as Shift+PageUp/PageDown also does) and a partial line; and even if it scrolled by 1 entire line you would have filed this bug, correct? So scrolling by partial lines is not your primary concern if I understand you correctly.

Comment 3 Dmitry Zhukovski 2017-09-26 09:16:57 UTC
Exactly. Customer(and me too) prefers old behaviour when right click makes full page scrolled. So - yes - it's not a matter of partial or full line scroll but rather full page.

Comment 4 Egmont Koblinger 2017-09-26 09:24:34 UTC
I see, thanks. Unfortunately I cannot comment on the technical side of that story.

One possibility is for you to revert that change, if it indeed fixes (or rather: works around) the problem.

I've noticed however that Gedit and Files (nautilus) also scrolls by a tiny amount, probably many other apps. So it looks to me the core problem is somewhere in Gtk+'s scrollbar (GtkScrolledWindow) and ideally should be fixed there.

Maybe there is a way to change the behavior from a config file, I don't know.

I personally completely agree with you and your curstomer that the old behavior is much more useful.

Comment 5 Christian Persch 2017-09-26 11:06:26 UTC
It's also reproducible in the vte test app, so this has nothing to do with the change mentioned in gnome-terminal, or with GtkScrolledWindow. Since it's also reproducible in other apps (tried gedit), it's probably a gtk+ bug, likely introduced in porting it to gestures.

Please upstream this on bugzilla.gnome.org, for gtk+.

Comment 8 Debarshi Ray 2017-10-20 16:25:48 UTC
(In reply to Dmitry Zhukovski from comment #0)
> It looks like this change was implemented in 3.21[1]:
> -------------
>     window: Support animated and touch scrolling
>     
>     Add back code to conditionally compile TerminalScreenContainer
>     to use a GtkScrolledWindow instead of creating our own GtkScrollbar.
>     When used, this gives us animated and touch scrolling for free.
>     We can mimic the existing behaviour by creating a GtkScrolledWindow
>     that never scrolls horizontally, but always vertically. We can
>     use the new EXTERNAL policy to hide the vertical scrollbar widget
>     depending on the setting.
>     
>     However, GtkScrolledWindow doesn't work with
>     GTK_SIZE_REQUEST_CONSTANT_SIZE children, so this code will only
>     exist for development purposes until gtk+ fixes this.
>     
>     Also install custom CSS to hide GtkScrolledWindow over/underscroll
>     animations.
>     
>     Also reverts commit 41eb2ec73653adc5fd36fa73cebdc8a6169f8516
>     
>     https://bugzilla.gnome.org/show_bug.cgi?id=733210

For the record, no that's not it. That code is under #ifdef USE_SCROLLED_WINDOW guards and we don't enable those paths.

Comment 9 Debarshi Ray 2017-10-23 15:43:17 UTC
Turns out that this behaviour is intentional. In fact the speed at which it smooth scrolls varies depending on the distance of the pointer from the scrollbar's trough. If you move the pointer away, while keeping the secondary mouse button pressed, it will speed. Bring it back and it will slow down.

It is the variable speed variant of smooth scrolling.

The behaviour that you are looking for, can be achieved by shift + primary-click. You can swap the behaviour of primary-click and shift + primary-click using the gtk-primary-button-warps-slider setting.

Comment 10 Dmitry Zhukovski 2017-10-26 10:40:36 UTC
I know that paging effect can be archived by Shift - Primary button. But customer is asking where is gone 7.3's right button paging effect.

Comment 11 Debarshi Ray 2017-10-30 17:56:01 UTC
(In reply to Dmitry Zhukovski from comment #10)
> I know that paging effect can be archived by Shift - Primary button. But
> customer is asking where is gone 7.3's right button paging effect.

As I said in comment 9, it was taken up to implement yet another variant of scrolling.

Comment 12 Dmitry Zhukovski 2017-11-07 07:59:32 UTC
Debarshi - you can close this BZ. Customer has agreed with close-to-okey Shift-Primary button solution.

Comment 13 Debarshi Ray 2017-11-07 13:17:59 UTC
(In reply to Dmitry Zhukovski from comment #12)
> Debarshi - you can close this BZ. Customer has agreed with close-to-okey
> Shift-Primary button solution.

Ok. Thanks for the feedback!

Comment 14 Red Hat Bugzilla Rules Engine 2017-11-07 13:18:05 UTC
Development Management has reviewed and declined this request. You may appeal this decision by reopening this request.