[PATCH xwayland 1/7] dix: assume warping on the RootWindow always happens on visible coords

2016-11-12 Thread Carlos Garnacho
If the root window borderClip region is null, the PointInWindowIsVisible() check fails if pointer warping is attempted on the root window, making the warping operation bail out early. Assume coordinates always lay inside the root window for this case, the actual position will be clamped later

[PATCH xwayland 3/7] xwayland: "Accept" confineTo on InputOnly windows

2016-11-12 Thread Carlos Garnacho
Of sorts, actually make it confine to the pointer focus, as the InputOnly window is entirely invisible to xwayland accounting, we don't have a xwl_window for it. Signed-off-by: Carlos Garnacho --- hw/xwayland/xwayland.c | 4 1 file changed, 4 insertions(+) diff --git

[PATCH xwayland 7/7] xwayland: Remove two unused proc pointers.

2016-11-12 Thread Carlos Garnacho
Xwayland doesn't override these, so we don't need defining those in the xwl_screen struct. Signed-off-by: Carlos Garnacho --- hw/xwayland/xwayland.h | 2 -- 1 file changed, 2 deletions(-) diff --git a/hw/xwayland/xwayland.h b/hw/xwayland/xwayland.h index 5e5624b..51a7053

[PATCH xwayland 4/7] xwayland: Update root window size when desktop size changes

2016-11-12 Thread Carlos Garnacho
This fixes grabs on InputOnly windows whose parent is the root window failing with GrabNotViewable. This is due to window->borderSize/windowSize being computed as clipped by its parent, resulting in a null region. Setting up the right size on the root window makes the InputOnly size correct too,

[PATCH xwayland 0/7] Fixes for warp/confinement emulation on Wine games

2016-11-12 Thread Carlos Garnacho
Hey, Here's some assorted fixes to make Xwayland pointer locking/confinement emulation work on games run through Wine. Some specifics: - Wine pretty much forwards win32 parlance to X11 equivalents, if a game calls ClipCursor, Wine calls XGrabPointer with a confineTo. If a game calls

[PATCH xwayland 5/7] xwayland: Emit relative motion events on both warp/confinement situations

2016-11-12 Thread Carlos Garnacho
But just as long as the cursor is hidden. In the typical pattern in games of "hide cursor, grab with a confineTo, warp constantly the pointer to the middle of the window" the last warping step is actually rather optional. Some games may choose to just set up a grab with confineTo argument, and

[PATCH xwayland 2/7] xwayland: Allow pointer warp on the root window

2016-11-12 Thread Carlos Garnacho
Of sorts, as we can't honor pointer warping across the whole root window coordinates, peek the pointer focus in this case. Signed-off-by: Carlos Garnacho --- hw/xwayland/xwayland.c | 4 1 file changed, 4 insertions(+) diff --git a/hw/xwayland/xwayland.c