mirror of
https://gitlab.freedesktop.org/xorg/xserver.git
synced 2026-02-09 05:00:30 +01:00
xwayland: remove limits for wayland pointer
This change helps when an X11 window receives pointer events into the part of the window that is out of screen bounds. Example: 1. window is located at -50,-50 (root) 2. receives absolute pointer event at 10,10 (surface local), 3. it is then translated to -40,-40 (root coordinates) 4. then clamped to the screen geometry and becomes 0,0 5. 0,0 (root) is translated to window local: 50,50 This patch effectively removes those limits and the window will get the Enter/Motion events at 10,10(local) and -40,-40(root) as expected.
This commit is contained in:
parent
f83807647e
commit
aab8d228f7
1 changed files with 10 additions and 0 deletions
|
|
@ -861,6 +861,13 @@ xwl_screen_update_global_surface_scale(struct xwl_screen *xwl_screen)
|
|||
return (xwl_screen->global_surface_scale != old_scale);
|
||||
}
|
||||
|
||||
static void
|
||||
xwl_screen_cursor_no_limits(DeviceIntPtr pDev, ScreenPtr pScreen, CursorPtr pCursor,
|
||||
BoxPtr pHotBox, BoxPtr pTopLeftBox) {
|
||||
pTopLeftBox->x1 = pTopLeftBox->y1 = INT16_MIN;
|
||||
pTopLeftBox->x2 = pTopLeftBox->y2 = INT16_MAX;
|
||||
}
|
||||
|
||||
Bool
|
||||
xwl_screen_init(ScreenPtr pScreen, int argc, char **argv)
|
||||
{
|
||||
|
|
@ -1170,6 +1177,9 @@ xwl_screen_init(ScreenPtr pScreen, int argc, char **argv)
|
|||
pScreen->CursorWarpedTo = xwl_cursor_warped_to;
|
||||
pScreen->CursorConfinedTo = xwl_cursor_confined_to;
|
||||
|
||||
pScreen->CursorLimits = xwl_screen_cursor_no_limits;
|
||||
pScreen->ConstrainCursorHarder = NULL;
|
||||
|
||||
xwl_screen->allow_commits_prop = MakeAtom(allow_commits,
|
||||
strlen(allow_commits),
|
||||
TRUE);
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue