Merge pull request #67820 from Sauermann/fix-popup-closing-on-mousemove
Fix unwanted popup closing by mouse-move while holding mouse-button down
This commit is contained in:
commit
90d290f5f5
2 changed files with 1 additions and 3 deletions
|
@ -3414,7 +3414,7 @@ bool DisplayServerX11::mouse_process_popups() {
|
||||||
XWindowAttributes root_attrs;
|
XWindowAttributes root_attrs;
|
||||||
XGetWindowAttributes(x11_display, root, &root_attrs);
|
XGetWindowAttributes(x11_display, root, &root_attrs);
|
||||||
Vector2i pos = Vector2i(root_attrs.x + root_x, root_attrs.y + root_y);
|
Vector2i pos = Vector2i(root_attrs.x + root_x, root_attrs.y + root_y);
|
||||||
if ((pos != last_mouse_monitor_pos) || (mask != last_mouse_monitor_mask)) {
|
if (mask != last_mouse_monitor_mask) {
|
||||||
if (((mask & Button1Mask) || (mask & Button2Mask) || (mask & Button3Mask) || (mask & Button4Mask) || (mask & Button5Mask))) {
|
if (((mask & Button1Mask) || (mask & Button2Mask) || (mask & Button3Mask) || (mask & Button4Mask) || (mask & Button5Mask))) {
|
||||||
List<WindowID>::Element *C = nullptr;
|
List<WindowID>::Element *C = nullptr;
|
||||||
List<WindowID>::Element *E = popup_list.back();
|
List<WindowID>::Element *E = popup_list.back();
|
||||||
|
@ -3440,7 +3440,6 @@ bool DisplayServerX11::mouse_process_popups() {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
last_mouse_monitor_mask = mask;
|
last_mouse_monitor_mask = mask;
|
||||||
last_mouse_monitor_pos = pos;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return closed;
|
return closed;
|
||||||
|
|
|
@ -169,7 +169,6 @@ class DisplayServerX11 : public DisplayServer {
|
||||||
HashMap<WindowID, WindowData> windows;
|
HashMap<WindowID, WindowData> windows;
|
||||||
|
|
||||||
unsigned int last_mouse_monitor_mask = 0;
|
unsigned int last_mouse_monitor_mask = 0;
|
||||||
Vector2i last_mouse_monitor_pos;
|
|
||||||
uint64_t time_since_popup = 0;
|
uint64_t time_since_popup = 0;
|
||||||
|
|
||||||
List<WindowID> popup_list;
|
List<WindowID> popup_list;
|
||||||
|
|
Loading…
Reference in a new issue