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 645476 - Avoid scroll to cursor on folder change in message list
Avoid scroll to cursor on folder change in message list
Status: RESOLVED FIXED
Product: evolution
Classification: Applications
Component: Shell
3.8.x (obsolete)
Other Linux
: Normal normal
: ---
Assigned To: Evolution Shell Maintainers Team
Evolution QA team
: 671930 (view as bug list)
Depends on:
Blocks:
 
 
Reported: 2011-03-22 00:10 UTC by Adam Williamson
Modified: 2014-01-23 20:24 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
evo patch (4.54 KB, patch)
2011-05-12 07:15 UTC, Milan Crha
committed Details | Review
evo patch ][ (407 bytes, patch)
2011-08-11 17:11 UTC, Milan Crha
committed Details | Review
evo patch ]I[ (1.12 KB, patch)
2013-03-04 21:06 UTC, Milan Crha
committed Details | Review
evo patch IV (2.78 KB, patch)
2013-03-05 06:56 UTC, Milan Crha
none Details | Review

Description Adam Williamson 2011-03-22 00:10:45 UTC
I have Evo set to check for new mail every minute. If I select an email in a folder, and then scroll down or up through that folder looking at the descriptions of other mails, when Evo does a new mail check, the view suddenly jumps back to the selected email. It shouldn't do this.
Comment 1 Adam Williamson 2011-05-05 16:13:18 UTC
Still valid in 3.0.1.
Comment 2 Milan Crha 2011-05-11 15:41:35 UTC
Confirming, I noticed that too. I'm not sure how easy it will be to catch this, but I can give it a try.
Comment 3 Adam Williamson 2011-05-11 20:29:17 UTC
I'd appreciate it if you could, as this is actually kind of annoying to some of my workflows (like looking through the last week of messages to a mailing list to help write a newsletter, for e.g.)



-- 
Fedora Bugzappers volunteer triage team
https://fedoraproject.org/wiki/BugZappers
Comment 4 Milan Crha 2011-05-12 07:15:17 UTC
Created attachment 187679 [details] [review]
evo patch

for evolution;

This helped me. The behaviour is kept same as before for all but changed signal receive on a folder, where the force to scroll to the cursor is disabled.
Comment 5 Milan Crha 2011-05-12 07:20:32 UTC
Created commit 45ecbcc in evo master (3.1.2+)
Created commit 4e6ad44 in evo gnome-3-0 (3.0.2+)
Comment 6 Milan Crha 2011-08-08 06:13:08 UTC
Reopening due to a downstream bug report claiming it doesn't work in 3.0.2:
https://bugzilla.redhat.com/show_bug.cgi?id=728755
Comment 7 Adam Williamson 2011-08-08 15:55:24 UTC
yeah, i'm still seeing this in current f15 and f16.
Comment 8 Milan Crha 2011-08-11 08:49:24 UTC
Hrm, I miss good steps for a reproducer. I know I saw it, but I do not know how I did it. What I'm doing now is pretty simple:
a) select a folder and scroll away from the cursor
b) hit send&receive to fetch new messages from the server
c) if the message is there then the view is updated, but I'm still at
   the place I scrolled to
d) send myself a message which will end in this folder, keep scrolled
   out of the cursor
e) wait till it's fetched automatically
f) mail is fetched, but like at c) the view stands scrolled where it was

Do you have some detailed steps to reproduce, please?
Comment 9 Adam Williamson 2011-08-11 15:57:13 UTC
For me it's nothing that complicated.

Just select a message in a folder, any message near the top will do, then start scrolling down through the folder.

The next time the regular mail check kicks in (I have it set to check mail once a minute, so it's super annoying for me) the message list will be reset to put the message that's selected at the top.

Just testing it now, it doesn't seem to happen all the time, but it sure happens a lot. Thoughts: 

a) it may be only if the mail check actually finds any mail...
b) window focus may come into it

...ooh, more twiddling. Found a reliable reproducer of what looks like the same thing:

1. Select a message in Evo
2. Switch active windows to another one - I have Evo on my left monitor and Firefox on my right, so I just click on Firefox
3. Scroll the message list in Evo *while it's the inactive window*
4. Click on the title bar to make Evo the active window

That jumps the message list to the selected message every time, for me.
Comment 10 Milan Crha 2011-08-11 16:25:52 UTC
You are right with both things. The first, that the attached patch is in use only when there are newly received messages; the second, that what we see has something to do with focused widget. I consider the first thing fixed, but you led me to other occasion.

Simple steps:
a) select message list
b) scroll in it away
c1) press left button above window title - the message list scrolls back
c2) select the preview (I did by mouse) - the message list scrolls back

I think I know where to look, let's see.
Comment 11 Milan Crha 2011-08-11 17:11:21 UTC
Created attachment 193650 [details] [review]
evo patch ][

for evolution;

Interesting, I wouldn't expect this. When a focus changes, then new allocation is emitted to the message list (it has 1 pixel change in width), and the ETree was ensuring that the selected row will be shown in the message list. Thinking of it I believe it's not the best idea to scroll to selected row on size change, because, as an example, I scroll by mouse few lines above, then I realize that I do not see whole information I would like to, then I either change column size, or a window size. And changing window size meant that the view will scroll back to the selected row, which will make me unhappy. Thus I removed that scroll_to_cursor() call from an allocation change notification callback.
Comment 12 Milan Crha 2011-08-11 17:14:58 UTC
Created commit 72d408c in evo master (3.1.5+)
Created commit 8dab73a in evo gnome-3-0 (3.0.3+)
Comment 13 Milan Crha 2013-03-04 20:11:34 UTC
Hrm, still not fixed (git master), I see this with IMAP+, it might be something what it does triggering it.
Comment 14 Milan Crha 2013-03-04 21:06:24 UTC
Created attachment 238046 [details] [review]
evo patch ]I[

for evolution;

I hope this is the final change. It avoids cursor update after tree rebuild.

The IMAP+ does something wrong, though, it claims all messages in the folder changed, while they did not, but it doesn't seem to be related to this particular issue.
Comment 15 Milan Crha 2013-03-04 21:11:08 UTC
Created commit 4010ad1 in evo master (3.7.92+)
Created commit 6025638 in evo gnome-3-6 (3.6.4+)
Comment 16 Milan Crha 2013-03-05 06:56:27 UTC
Created attachment 238088 [details] [review]
evo patch IV

for evolution;

The take 3 has regression, evolution crashes when changing view, like when switching "Show Deleted messages". This effectively reverts the take 3 and propagates the same change further in the code (I didn't want to change API at this stage, thus it's kinda cumbersome).
Comment 17 Milan Crha 2013-03-05 07:02:34 UTC
Created commit 642eaed in evo master (3.7.92+)
Created commit b31eb86 in evo gnome-3-6 (3.6.4+)
Comment 18 Milan Crha 2013-03-27 07:52:32 UTC
Hrm, it seems that this broke message selection after deletion of multiple messages. I just cannot get this right :-/ I moved the possible regression under bug #446659, which seemed more related than this on the first look.
Comment 19 Milan Crha 2014-01-22 17:33:32 UTC
This is embarrassing, but there still was a case, where the view reset itself to the last position after 'folder-changed" signal. It might be fixed with [1].

Created commit a760291 in evo master (3.11.5+) [1]
Created commit cdc9dad in evo gnome-3-10 (3.10.4+)

[1] https://git.gnome.org/browse/evolution/commit/?id=a760291
Comment 20 Milan Crha 2014-01-23 20:24:37 UTC
*** Bug 671930 has been marked as a duplicate of this bug. ***