mirror of
https://github.com/labwc/labwc.git
synced 2025-10-29 05:40:24 -04:00
cursor: prevent Drag mousebinds from running without button press
For `Drag` mousebinds, `pressed_in_context` is set by `cursor_process_button_press()` and cleared by `cursor_process_motion()` which runs actions bound to them. However, when `cursor_process_motion()` is called while interactive move/resize, it doesn't clear `pressed_in_context` due to the early-return and the `Drag` mousebinds are unexpectedly executed on another call to `cursor_process_motion()` after the interactive move/resize is finished by button release, even when the button is not pressed. So this commit fixes it by always clearing `pressed_in_context` on button releases.
This commit is contained in:
parent
452f45cd3d
commit
1557cb774f
3 changed files with 14 additions and 14 deletions
|
|
@ -142,7 +142,7 @@ bool cursor_process_button_release(struct seat *seat, uint32_t button, uint32_t
|
|||
* Finishes cursor button release. The return value indicates if an interactive
|
||||
* move/resize had been finished. Should be called after notifying a client.
|
||||
*/
|
||||
bool cursor_finish_button_release(struct seat *seat);
|
||||
bool cursor_finish_button_release(struct seat *seat, uint32_t button);
|
||||
|
||||
void cursor_init(struct seat *seat);
|
||||
void cursor_reload(struct seat *seat);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue