xwayland: import DMA-BUFs with GBM_BO_USE_RENDERING only
Drop GBM_BO_USE_SCANOUT from the GBM_BO_IMPORT_FD import, add
GBM_BO_USE_RENDERING to the GBM_BO_IMPORT_FD_MODIFIER import.
If the DMA-BUF cannot be scanned out, gbm_bo_import with
GBM_BO_USE_SCANOUT will fail. However Xwayland doesn't need to scan-out
the buffer and can work fine without scanout. Glamor only needs
GBM_BO_USE_RENDERING.
Signed-off-by: Simon Ser <email address hidden>
Reviewed-by: Michel Dänzer <email address hidden>
Reviewed-by: Daniel Stone <email address hidden>
xwayland: Improve checks for confined_to on InputOnly windows
In this pretty Wine/Proton specific kludge, we try to handle confining grabs
on InputOnly windows by trying to find the InputOutput window that the pointer
would get visually confined to.
The grabbing window and the visible window come from different clients, so
we used to simply resort to the pointer focus. This is troublesome though, as
the call may happen very soon at a time that the toplevel wasn't yet mapped by
the Wayland compositor, so the pointer focus may well be out of date soon.
In these situations, it does seem that even though the confining grab happens
too early to have the wayland surface mapped, the xserver view of the WindowPtr
does already reflect the size. Use this to find out the better window to
assign the confining grab to, one whose geometry fully contains the InputOnly
window's.
f486e2f...
by
Olivier Fourdan <email address hidden>
xwayland: Remove undeeded test
xwl_seat_maybe_lock_on_hidden_cursor() checks that the value of
cursor_confinement_window is not NULL, yet there is no code path
that could lead to this.
Remove the test for cursor_confinement_window being set, it's useless.
Signed-off-by: Olivier Fourdan <email address hidden>
Reviewed-by: Carlos Garnacho <email address hidden>
Reviewed-by: Peter Hutterer <email address hidden>
baa8d12...
by
Olivier Fourdan <email address hidden>
xwayland: Lock on entering surface if needed
When an X11 client issues a ConfinePointer wit ha hidden cursor,
Xwayland may translate that as a pointer lock.
However, if the pointer is located on another window at the time,
the request may be ignored, even if the pointer later enters the window.
To avoid that issue, check again if locking the pointer with a hidden
cursor is needed when pointer enters a surface.
Signed-off-by: Olivier Fourdan <email address hidden>
Reviewed-by: Carlos Garnacho <email address hidden>
Reviewed-by: Peter Hutterer <email address hidden>