interactive: clear cursor focus at the start of move/resize

Sending button release event at the end of interactive move/resize may
trigger unexpected actions by applications (e.g. Firefox PiP sending
`show_window_menu`). Let's clear the cursor focus at the start of
move/resize, which follows what KWin and Mutter do.
This commit is contained in:
tokyo4j 2024-09-24 03:14:48 +09:00
parent 04a145f89a
commit 2f92c2be63
2 changed files with 2 additions and 4 deletions

View file

@ -1109,10 +1109,6 @@ cursor_process_button_release(struct seat *seat, uint32_t button,
}
if (server->input_mode != LAB_INPUT_STATE_PASSTHROUGH) {
if (pressed_surface) {
/* Ensure CSD clients see the release event */
return true;
}
return false;
}

View file

@ -153,6 +153,8 @@ interactive_begin(struct view *view, enum input_mode mode, uint32_t edges)
view_restore_to(view, natural_geo);
}
wlr_seat_pointer_notify_clear_focus(seat->seat);
if (rc.resize_indicator) {
resize_indicator_show(view);
}