summaryrefslogtreecommitdiff
path: root/platform
diff options
context:
space:
mode:
authorRémi Verschelde <rverschelde@gmail.com>2022-11-03 12:07:59 +0100
committerRémi Verschelde <rverschelde@gmail.com>2022-11-03 12:07:59 +0100
commit90d290f5f551724e1f22627c872a0b03dc72ac5e (patch)
tree3b2455ad1e30aa1030a9f2c41b2711e6e90c6f36 /platform
parenta68ea12c5b7bdceaad889142fe8852ce65b025af (diff)
parent8fb4b5998ec23f5041d8d9b7d275e4976c1f53a9 (diff)
Merge pull request #67820 from Sauermann/fix-popup-closing-on-mousemove
Fix unwanted popup closing by mouse-move while holding mouse-button down
Diffstat (limited to 'platform')
-rw-r--r--platform/linuxbsd/x11/display_server_x11.cpp3
-rw-r--r--platform/linuxbsd/x11/display_server_x11.h1
2 files changed, 1 insertions, 3 deletions
diff --git a/platform/linuxbsd/x11/display_server_x11.cpp b/platform/linuxbsd/x11/display_server_x11.cpp
index 88c6500e10..7fd0eb7d0c 100644
--- a/platform/linuxbsd/x11/display_server_x11.cpp
+++ b/platform/linuxbsd/x11/display_server_x11.cpp
@@ -3414,7 +3414,7 @@ bool DisplayServerX11::mouse_process_popups() {
XWindowAttributes root_attrs;
XGetWindowAttributes(x11_display, root, &root_attrs);
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))) {
List<WindowID>::Element *C = nullptr;
List<WindowID>::Element *E = popup_list.back();
@@ -3440,7 +3440,6 @@ bool DisplayServerX11::mouse_process_popups() {
}
}
last_mouse_monitor_mask = mask;
- last_mouse_monitor_pos = pos;
}
}
return closed;
diff --git a/platform/linuxbsd/x11/display_server_x11.h b/platform/linuxbsd/x11/display_server_x11.h
index 861eced88b..4be8c3a534 100644
--- a/platform/linuxbsd/x11/display_server_x11.h
+++ b/platform/linuxbsd/x11/display_server_x11.h
@@ -169,7 +169,6 @@ class DisplayServerX11 : public DisplayServer {
HashMap<WindowID, WindowData> windows;
unsigned int last_mouse_monitor_mask = 0;
- Vector2i last_mouse_monitor_pos;
uint64_t time_since_popup = 0;
List<WindowID> popup_list;