[Wayland-bugs] [Bug 104426] Xwayland: XWarpPointer does not move the pointer if src_w == root window

bugzilla-daemon at freedesktop.org bugzilla-daemon at freedesktop.org
Mon Jan 1 00:54:09 UTC 2018


https://bugs.freedesktop.org/show_bug.cgi?id=104426

            Bug ID: 104426
           Summary: Xwayland: XWarpPointer does not move the pointer if
                    src_w == root window
           Product: Wayland
           Version: unspecified
          Hardware: x86-64 (AMD64)
                OS: Linux (All)
            Status: NEW
          Severity: normal
          Priority: medium
         Component: XWayland
          Assignee: wayland-bugs at lists.freedesktop.org
          Reporter: lskrejci at gmail.com
        QA Contact: xorg-team at lists.x.org

Created attachment 136466
  --> https://bugs.freedesktop.org/attachment.cgi?id=136466&action=edit
pointer warp test program

Distribution: Arch Linux

xorg-server-xwayland 1.19.6-2
gnome-shell 3.26.2+9+ga3736d3a3-1
mutter 3.26.2+31+gbf91e2b4c-1
libxfixes 5.0.3-1
gcc 7.2.1-2

When XWarpPointer is called with the src_w parameter set to
DefaultRootWindow(display), like e.g. Wine calls it, the function does not move
the pointer to the desired position under rootless XWayland. This is because
PointInWindowIsVisible
(https://cgit.freedesktop.org/xorg/xserver/tree/dix/events.c?h=server-1.19-branch&id=ebfb06b11955a6c32500b7086be912ab96b753a7#n3578)
returns false due to the fact that the borderClip property of the root window
is initialized to RegionNull(&window->borderClip):

borderClip = {extents = {x1 = 0, y1 = 0, x2 = 0, y2 = 0}, data = 0x56386383b280
<RegionEmptyData>}
RegionEmptyData = {size = 0, numRects = 0}

How to reproduce:
1. Download the attached test program source
2. $ gcc -std=c11 -lX11 -lXfixes pointer_warp_test.c -o pointer_warp_test
3. start gnome-shell for Wayland
4. run the compiled binary $ ./pointer_warp_test
5. press tab while the pointer is inside the window
6. move the pointer and observe its behavior
- the smaller square represents the position of the real pointer as the
application sees it
- the larger square represents the application cursor
7. the test program exhibits the correct behavior if the application cursor
exactly follows mouse movements
   and the real cursor stays near the middle, as it is continually warped
there; the real cursor, however, does not stay
   in the middle because it is not warped at all

The issue can also be reproduced in the Windows version of OpenArena under
Wine. Wine has to have virtual desktop emulation disabled (winecfg -> Graphics
tab -> Emulate a virtual desktop) in order for the the issue to be present.

-- 
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/wayland-bugs/attachments/20180101/16f4c3f8/attachment.html>


More information about the wayland-bugs mailing list