GNOME Bugzilla – Bug 645476
Avoid scroll to cursor on folder change in message list
Last modified: 2014-01-23 20:24:37 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.
Still valid in 3.0.1.
Confirming, I noticed that too. I'm not sure how easy it will be to catch this, but I can give it a try.
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
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.
Created commit 45ecbcc in evo master (3.1.2+) Created commit 4e6ad44 in evo gnome-3-0 (3.0.2+)
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
yeah, i'm still seeing this in current f15 and f16.
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?
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.
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.
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.
Created commit 72d408c in evo master (3.1.5+) Created commit 8dab73a in evo gnome-3-0 (3.0.3+)
Hrm, still not fixed (git master), I see this with IMAP+, it might be something what it does triggering it.
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.
Created commit 4010ad1 in evo master (3.7.92+) Created commit 6025638 in evo gnome-3-6 (3.6.4+)
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).
Created commit 642eaed in evo master (3.7.92+) Created commit b31eb86 in evo gnome-3-6 (3.6.4+)
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.
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
*** Bug 671930 has been marked as a duplicate of this bug. ***