Bug 54654 - Pointer screen crossings broken in Xorg server 1.13.0 (regression)
Pointer screen crossings broken in Xorg server 1.13.0 (regression)
Status: RESOLVED FIXED
Product: xorg
Classification: Unclassified
Component: Server/Input/Core
git
Other All
: medium normal
Assigned To: Peter Hutterer
Xorg Project Team
:
: 55993 (view as bug list)
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2012-09-07 20:53 UTC by Nick Bowler
Modified: 2012-11-29 02:41 UTC (History)
7 users (show)

See Also:


Attachments
0001-dix-fix-zaphod-screen-scrossing-54654.patch (1.37 KB, patch)
2012-10-18 05:19 UTC, Peter Hutterer
no flags Details | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
Description Nick Bowler 2012-09-07 20:53:13 UTC
After upgrading from xserver 1.12.99.905 (the very last 1.13 RC) to xserver
1.13.0, screen crossings have ceased to work correctly, in a 2-screen Zaphod
setup.  The pointer starts on the left screen (0); when attempting to move it
rightwards across the boundary to the right screen (1), instead of actually
changing screens, the pointer teleports all the way to the left of the screen
it's already on.

Bisection pinpoints the following:

bafbd99080be49a17be97d2cc758fbe623369945 is the first bad commit
commit bafbd99080be49a17be97d2cc758fbe623369945
Author: Peter Hutterer <peter.hutterer@who-t.net>
Date:   Wed Aug 8 11:34:32 2012 +1000

    dix: work around scaling issues during WarpPointer (#53037)
    
    In WarpPointer calls, we get input in screen coordinates. They must be
    scaled to device coordinates, and then back to screen coordinates for screen
    crossing and root coordinates in events.
    
    The rounding errors introduced (and clipping in core/XI 1.x events) can lead
    to the actual position being different to the requested input coordinates.
    e.g. 200 scales to 199.9999, truncated to 199 in the event.
    
    Avoid this by simply overwriting the scaled screen coordinates with the
    input coordinates for the POINTER_SCREEN case.
    
    X.Org Bug 53037 <http://bugs.freedesktop.org/show_bug.cgi?id=53037>
    
    Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
    Reviewed-by: Keith Packard <keithp@keithp.com>

:040000 040000 f187f7ca2569a510c2f614cc75f9d5e3f4b09b85 394c22bc56781077b7384804648db21c6354eca8 M	dix

Reverting this commit on top of 1.13.0 resolves the issue.
Comment 1 Till Matthiesen 2012-10-13 21:29:34 UTC
Hi,

Arch (stable) upgraded xorg-server to 1.13.
I use a similar Zaphod configuration as described above and
I'm facing the same annoying bug now.

Any news on this issue?

With best regards,
Till
Comment 2 James Le Cuirot 2012-10-13 21:32:58 UTC
In the meantime, you can still revert the commit without any other problems but that's probably a little easier to do on Gentoo (my distro) than it is on Arch. ;)
Comment 3 Till Matthiesen 2012-10-14 19:16:18 UTC
I guess my comment was a bit misleading... :)

While it would be possible to revert the commit (thanks to Nick), I just wanted to ask if the issue will be addressed in 1.13.1. The status is still set to NEW.

Shouldn't the "Component" be changed to "Input/*"?
Not sure if Peter Hutterer knows about this regression.

Unfortunately, I'm not familiar with the inner workings of X to provide a patch.

~Till
Comment 4 Nick Bowler 2012-10-15 16:02:29 UTC
(In reply to comment #3)
> While it would be possible to revert the commit (thanks to Nick), I just
> wanted to ask if the issue will be addressed in 1.13.1. The status is still
> set to NEW.

Yes, it would be nice to have some feedback about this 11th-hour regression.

What's the point in testing the release candidates if regressions are going to
be introduced (and apparently reports ignored) right before release anyway?

> Shouldn't the "Component" be changed to "Input/*"?

That's what I thought at first, but all the Input/ components seem to be for
specific drivers.  This issue isn't driver-specific, it's a problem with the
server.

That being said, this bugtracker has waaaaaaaaay too many components.
Comment 5 Thomas Kuther 2012-10-17 11:45:58 UTC
*** Bug 55993 has been marked as a duplicate of this bug. ***
Comment 6 Till Matthiesen 2012-10-17 12:46:48 UTC
Wouldn't it make sense to assign this bug report to Peter Hutterer?
Comment 7 Peter Hutterer 2012-10-18 05:19:40 UTC
Created attachment 68748 [details] [review]
0001-dix-fix-zaphod-screen-scrossing-54654.patch

adding the offset of the new screen should be enough, can you please test this? thanks
Comment 8 Nick Bowler 2012-10-18 14:25:59 UTC
(In reply to comment #7)
> Created attachment 68748 [details] [review] [review]
> 0001-dix-fix-zaphod-screen-scrossing-54654.patch
> 
> adding the offset of the new screen should be enough, can you please test
> this? thanks

Seems to work, thanks!
Comment 9 Till Matthiesen 2012-10-19 02:22:09 UTC
Thanks. I can also confirm this patch to work on two different zaphod setups.
Comment 10 Ilija Hadzic 2012-10-19 22:01:17 UTC
FWIW, it fixes the problem for me too. Is this going to be merged at some point? I don't see it in git yet.
Comment 11 James Le Cuirot 2012-10-24 20:14:27 UTC
Looking good here, thanks Peter.
Comment 12 Peter Hutterer 2012-11-29 02:41:45 UTC
commit e7cd5cce740e653000fb1192b600268dcf77dde2
Author: Peter Hutterer <peter.hutterer@who-t.net>
Date:   Thu Oct 18 15:11:31 2012 +1000

    dix: fix zaphod screen scrossing (#54654)