src/cursor.c: Keep sending motion events for out-of-layer-surface

Previously, motion events for a cursor which had been pressed on a surface
and then moved out of the surface were only sent for XDG and X11 surfaces.

This patch includes layer surfaces as well.

Fixes #483
This commit is contained in:
Consolatis 2022-08-14 14:40:56 +02:00 committed by Johan Malm
parent 8e6d37772e
commit 921c877f79
3 changed files with 36 additions and 21 deletions

View file

@ -95,8 +95,8 @@ struct seat {
struct wlr_layer_surface_v1 *focused_layer;
/**
* pressed view/surface will usually be NULL and is only set on button
* press while the mouse is over a view surface and reset to NULL on
* pressed view/surface/node will usually be NULL and is only set on
* button press while the mouse is over a surface and reset to NULL on
* button release.
* It is used to send cursor motion events to a surface even though
* the cursor has left the surface in the meantime.
@ -106,6 +106,7 @@ struct seat {
*/
struct {
struct view *view;
struct wlr_scene_node *node;
struct wlr_surface *surface;
} pressed;