GNOME Bugzilla – Bug 690275
scrolling on other windows is applied when coming back (gedit and evince at least)
Last modified: 2013-11-21 10:45:24 UTC
This is an annoying UI bug in Gedit 3.4.x. (Maybe in others.) It has been reported by someone else in the Lauchpad bug tracker: https://bugs.launchpad.net/ubuntu/+source/gedit/+bug/1046988 (reported 6th of September 2012; Linux Ubuntu 12.04, Gedit 3.4.1) ; but I think it belongs here in the Gnome bug tracker. Seen this bug on: Linux Fedora 17, GNOME Shell 3.4.1, Gedit 3.4.2 (up-to-date from official package repo). The bug is still present after having disabled every plugins. Step to reproduce: 1. Open a file in Gedit that is long (to allow scrolling, e.g. 500 lines); 2. Scroll to a position in file not too close from the top or the bottom; 3. Click to place to text cursor, so you know where you were; 4. Use Alt+Tab to switch to another opened window that allows scrolling (basically any application that has a scroll bar); 5. Scroll down or up in that window using the mouse wheel; 6. Use Alt+Tab to switch back to Gedit; 7. Scroll by one "notch" down or up using the mouse wheel, in Gedit. Expected result: The document should by scrolled by the usual ~4 lines. Actual result: The document is scrolled too much. I believe that the aforementioned bug reporter is right: the amount of over-scrolling is dependent of the amount of scrolling in the other window. I have set the severity to "major" because this is really annoying. It makes Gedit a pain to use, and made me switch to another editor. It's a shame because Gedit is a great text editor otherwise. NOTE: When you follow those steps using the GNOME Shell "Activity" overlay instead of Alt+Tag in order to switch between windows, then actual result changes: It is not scrolled too much, instead the first "notch" of the mouse wheel does not scroll anything. This is also not the expected result.
Yes this happens to me as well. I thought it was my crazy touchpad but if somebody else is able to reproduce it as well it means it is a problem in gtk+...
I can reproduce this 100%. The "jumps" are exactly the same as how much was scrolled in the other applications. Almost has if gedit somehow knows how much scrolling was done in the other applications, and applies that scrolling when coming back to gedit. It has also been reported on https://bugs.launchpad.net/ubuntu/+source/gedit/+bug/1089966 where it is mentioned that this only happens when gedit and the other application are on different workspaces but I can reproduce this even on the same workspace. I'm using gedit 3.4.2 on Debian testing (wheezy) and apparently the bug is also present on Ubuntu 12.04 which has gedit 3.4.1. I would agree that this is a major issue. For example, reading a long file trying to debug some code, googling some documentation. When comes back to the code, scroll and the code disappears.
Moving to gtk+.
Is this a side effect of the touch support that was introduced?
I can confirm that this bug is not limited to gedit and is at least also present in evince. To replicate: open a pdf in evince and leave the side pane open (the index or bookmark). Open a really long document so there is a scroll on the side pane. Then go to another other window (such as firefox) and scroll up or down. Go back to evince and try to make a small change on the side pane. it will jump the same ammount of scrolling done on firefox. This is exactly the same problem that gedit is displaying.
Created attachment 240059 [details] [review] wip patch This patch fixes the issue, although in platform independent code there's means to retrieve the current/last known slave device a master device has been dealt through, it feels better to do that on such slave device, although also means somehow exposing xi2 mishaps to upper layers, or getting that info in lower layers. In practical terms, this patch has no side effects whatsoever. The only thing it does is being more eager at resetting slave devices, although gdk would still reset the scroll valuators when the user switches to another physical device, so this patch would just be doing that preemptively. So maybe the patch is good as is and a bigger refactor can wait.
The patch was OK'ed by company on IRC and pushed to master <Company> am I allowed to say that XI2 is a POS? other than that, the patch looks right to me
From the bug report on launchpad at https://bugs.launchpad.net/ubuntu/+source/gtk+3.0/+bug/1046988 @Sebastien Bacher: it seems that due to this patch, the scroll is not so smooth that before. I just reinstalled the previous version (3.6.4-0ubuntu6) and the scroll is much better: no lag, just smooth :)
I'm not 100% sure why this patch is being retracted and the discussions is going on the launchpad. Anyway, here it is: Doug McMahon (mc3man) wrote on 2013-04-22: > @Matthieu Baerts (matttbe) or anyone else who feels this 'fix' has affected scrolling - eariler filed bug on just that > Bug https://bugs.launchpad.net/bugs/1171156 > > (also to note - the issue here does not exist here at all, can't dupe, maybe because I have a touchpad & for most part use smooth scroll. gedit was absolutely fine prior to this patch Sebastien Bacher (seb128) wrote on 2013-04-22: > shrug, we should just stop making changes, either way there is always to complain... Matthieu Baerts (matttbe) wrote 14 minutes ago: >The previous modifications have been reverted because it seems this patch causes other problems (LP: #1171156). > > I guess I can change the status to 'Confirmed' until a new patch is introduced (or until someone finds why there are some problems when using this patched version with Compiz).
> I'm not 100% sure why this patch is being retracted and the discussions is > going on the launchpad. As you can see on the bug 1171156 (https://bugs.launchpad.net/ubuntu/+source/gtk+3.0/+bug/1171156) up & down scrolling with a touchpad is a bit jerky when using the version with the previous patch. It seems it happens with Compiz but not with Mutter. It's maybe due to Compiz or something else but I guess this patch can be included in Ubuntu 13.04 without understanding why there is a problem when using Compiz. (maybe it causes more problems... it's a bit too late to add this patch for Ubuntu Raring)
*** Bug 679675 has been marked as a duplicate of this bug. ***