xwayland: Fix crashes when there is no pointer
When running with a weston session without a pointer device (thus with the wl_seat not having a pointer) xwayland pointer warping and pointer confining should simply be ignored to avoid crashes. Signed-off-by: Sjoerd Simons <sjoerd@collabora.com>
This commit is contained in:
parent
73480f172a
commit
d35f68336b
|
@ -2806,6 +2806,9 @@ xwl_seat_can_emulate_pointer_warp(struct xwl_seat *xwl_seat)
|
||||||
{
|
{
|
||||||
struct xwl_screen *xwl_screen = xwl_seat->xwl_screen;
|
struct xwl_screen *xwl_screen = xwl_seat->xwl_screen;
|
||||||
|
|
||||||
|
if (!xwl_seat->pointer)
|
||||||
|
return FALSE;
|
||||||
|
|
||||||
if (!xwl_screen->relative_pointer_manager)
|
if (!xwl_screen->relative_pointer_manager)
|
||||||
return FALSE;
|
return FALSE;
|
||||||
|
|
||||||
|
@ -2900,6 +2903,9 @@ xwl_seat_confine_pointer(struct xwl_seat *xwl_seat,
|
||||||
if (!pointer_constraints)
|
if (!pointer_constraints)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
|
if (!xwl_seat->wl_pointer)
|
||||||
|
return;
|
||||||
|
|
||||||
if (xwl_seat->cursor_confinement_window == xwl_window &&
|
if (xwl_seat->cursor_confinement_window == xwl_window &&
|
||||||
xwl_seat->confined_pointer)
|
xwl_seat->confined_pointer)
|
||||||
return;
|
return;
|
||||||
|
|
Loading…
Reference in New Issue