mirror of
https://github.com/RGBCube/serenity
synced 2025-07-27 22:57:44 +00:00
WindowServer: Don't start a drag and drop unless holding Primary mouse
Adds a member to record the last processed mouse buttons. If they do not include MouseButton::Primary, return early before creating a new drag and drop client. This fixes race conditions in which MouseUp events canceling or completing a drop could be swallowed by Overlay creation or postponed by an executing DragOperation, leaving the operation in limbo.
This commit is contained in:
parent
db058a22ae
commit
9bcd7dc0ce
4 changed files with 6 additions and 2 deletions
|
@ -48,7 +48,7 @@ public:
|
|||
bool is_key_event() const { return type() == KeyUp || type() == KeyDown; }
|
||||
};
|
||||
|
||||
enum class MouseButton : u8 {
|
||||
enum MouseButton : u8 {
|
||||
None = 0,
|
||||
Primary = 1,
|
||||
Secondary = 2,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue