<html>
    <head>
      <base href="https://bugs.freedesktop.org/">
    </head>
    <body><table border="1" cellspacing="0" cellpadding="8">
        <tr>
          <th>Bug ID</th>
          <td><a class="bz_bug_link 
          bz_status_NEW "
   title="NEW - Xwayland: XWarpPointer does not move the pointer if src_w == root window"
   href="https://bugs.freedesktop.org/show_bug.cgi?id=104426">104426</a>
          </td>
        </tr>

        <tr>
          <th>Summary</th>
          <td>Xwayland: XWarpPointer does not move the pointer if src_w == root window
          </td>
        </tr>

        <tr>
          <th>Product</th>
          <td>Wayland
          </td>
        </tr>

        <tr>
          <th>Version</th>
          <td>unspecified
          </td>
        </tr>

        <tr>
          <th>Hardware</th>
          <td>x86-64 (AMD64)
          </td>
        </tr>

        <tr>
          <th>OS</th>
          <td>Linux (All)
          </td>
        </tr>

        <tr>
          <th>Status</th>
          <td>NEW
          </td>
        </tr>

        <tr>
          <th>Severity</th>
          <td>normal
          </td>
        </tr>

        <tr>
          <th>Priority</th>
          <td>medium
          </td>
        </tr>

        <tr>
          <th>Component</th>
          <td>XWayland
          </td>
        </tr>

        <tr>
          <th>Assignee</th>
          <td>wayland-bugs@lists.freedesktop.org
          </td>
        </tr>

        <tr>
          <th>Reporter</th>
          <td>lskrejci@gmail.com
          </td>
        </tr>

        <tr>
          <th>QA Contact</th>
          <td>xorg-team@lists.x.org
          </td>
        </tr></table>
      <p>
        <div>
        <pre>Created <span class=""><a href="attachment.cgi?id=136466" name="attach_136466" title="pointer warp test program">attachment 136466</a> <a href="attachment.cgi?id=136466&action=edit" title="pointer warp test program">[details]</a></span>
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
(<a href="https://cgit.freedesktop.org/xorg/xserver/tree/dix/events.c?h=server-1.19-branch&id=ebfb06b11955a6c32500b7086be912ab96b753a7#n3578">https://cgit.freedesktop.org/xorg/xserver/tree/dix/events.c?h=server-1.19-branch&id=ebfb06b11955a6c32500b7086be912ab96b753a7#n3578</a>)
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.</pre>
        </div>
      </p>


      <hr>
      <span>You are receiving this mail because:</span>

      <ul>
          <li>You are the assignee for the bug.</li>
      </ul>
    </body>
</html>