wl_backend: fix cursor reverting to arrow during opaque window drag
This commit is contained in:
parent
da9a62bf23
commit
39ba8d6794
|
|
@ -6540,6 +6540,18 @@ wl_pointer_change_grab(unsigned int event_mask, int cursor_id,
|
|||
unsigned long timestamp)
|
||||
{
|
||||
(void)event_mask; (void)timestamp;
|
||||
/* If no grab is active, start a WM policy grab (type 3) so that
|
||||
* wl_update_pointer_focus doesn't reset the cursor on every motion
|
||||
* event when the pointer is over frame decorations.
|
||||
* This handles the opaque-move path where moveres.c calls
|
||||
* pointer_change_grab without first calling pointer_grab. */
|
||||
if (!wl_state.grab_type) {
|
||||
wl_state.grab_type = 3;
|
||||
wl_state.grab_view = NULL;
|
||||
if (wl_state.seat)
|
||||
wlr_seat_pointer_clear_focus(wl_state.seat);
|
||||
wwarning("wl_backend: grab established via pointer_change_grab");
|
||||
}
|
||||
/* Map WCUR_* cursor IDs to xcursor names */
|
||||
const char *name;
|
||||
switch (cursor_id) {
|
||||
|
|
|
|||
Loading…
Reference in New Issue