After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 699603 - Message list scrolls to cursor on style change
Message list scrolls to cursor on style change
Status: RESOLVED FIXED
Product: evolution
Classification: Applications
Component: Mailer
3.8.x (obsolete)
Other Linux
: Normal normal
: ---
Assigned To: evolution-mail-maintainers
Evolution QA team
: 705284 (view as bug list)
Depends on:
Blocks:
 
 
Reported: 2013-05-03 16:40 UTC by Adam Jackson
Modified: 2013-08-16 18:24 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
evo patch (3.20 KB, patch)
2013-08-01 15:38 UTC, Milan Crha
committed Details | Review

Description Adam Jackson 2013-05-03 16:40:07 UTC
Using evolution-3.8.1-1+git20130430.fc19.x86_64

Select a folder in the mail view.  Select a message to show it in the preview pane.  Scroll the message pane (using the scrollbar) such that the selected message is no longer visible, then click away to any other window.  Note how the message pane resets so that the selected message is in view again.

Please don't warp scroll views for no reason.
Comment 1 Matthew Barnes 2013-05-03 16:57:37 UTC
Hmm, I can only reproduce that when I switch to another mail folder and back.  For me the scrollbar stays where I left it when switching to other windows and also after minimizing/unminimizing.

This is with GTK+ 3.8.0.
Comment 2 Adam Jackson 2013-05-06 12:51:44 UTC
gtk3-3.8.1-1.fc19.x86_64 here.  I feel like I've been seeing this for a while though, I want to say for most of the F19 cycle but obviously that's just an anecdote at this point.
Comment 3 Matthew Barnes 2013-05-06 17:17:03 UTC
Finally reproduced this, but can only do so in GNOME Shell and Cinnamon environments.  Cannot reproduce it on XFCE, MATE or KDE using the same gtk3 and evolution packages.  Perhaps it's a feature of the window manager?
Comment 4 Matthew Barnes 2013-05-07 02:50:22 UTC
I don't fully understand what's going on, but here's what I've observed:

- The scrolling is triggered by a "focus-out-event" signal, which in turn
  triggers a "style-set" signal.

- Deep inside ETable, there's a function to determine whether the selection
  is on screen, and if it is, scroll to the selection.  This is executing in
  response to the "style-set" signal.  It uses the scrolled window's vertical
  adjustment (GtkAdjustment) to help make this determination.

- If I pick a large folder, select a message at the top and then scroll all
  the way down to the bottom, I see the following difference when making the
  on-screen calculation in various environments:

     XFCE / MATE / KDE:

          The GtkAdjustment value is approx 2000, which is about what I
          would expect since I've scrolled to the bottom of the folder.
          ETable correctly determines the selection is NOT on screen.

     GNOME Shell / Cinnamon:

          GtkAdjustment lies.  It reports a value of 70, which is approx
          the vertical offset of the selected message.  ETable mistakenly
          believes the selected message is on screen and scrolls to it.

Why GtkAdjustment is behaving differently in different desktop environments is beyond me.  I guess I could try to bisect GTK+ to figure out where this went screwy.

Adam, maybe you have some insight here?
Comment 5 Matthew Barnes 2013-08-01 12:31:43 UTC
*** Bug 705284 has been marked as a duplicate of this bug. ***
Comment 6 Milan Crha 2013-08-01 15:38:19 UTC
Created attachment 250637 [details] [review]
evo patch

for evolution;

The problem is gnome-shell, as Matthew also found, and its style change.
The message list tries to keep cursor on screen even after the style changed, which is a good thing, if the cursor was on the screen before. The problem in evolution was that the cursor visibility was "never" recomputed, especially not after the scrolling position changed, thus the ETableItem thought that the cursor is still on the screen, while it wasn't.
Comment 7 Milan Crha 2013-08-01 15:49:47 UTC
Created commit 098b065 in evo master (3.9.90+)
Created commit ba0b889 in evo gnome-3-8 (3.8.5+)
Comment 8 Matthew Barnes 2013-08-14 17:06:11 UTC
*** Bug 706008 has been marked as a duplicate of this bug. ***
Comment 9 Fabien Tassin 2013-08-16 18:24:37 UTC
please undupe 706008, it's still there despite Milan's patch.