diff options
Diffstat (limited to 'platform/linuxbsd/x11')
13 files changed, 38 insertions, 26 deletions
diff --git a/platform/linuxbsd/x11/display_server_x11.cpp b/platform/linuxbsd/x11/display_server_x11.cpp index 1c5c8b2d19..57f125a754 100644 --- a/platform/linuxbsd/x11/display_server_x11.cpp +++ b/platform/linuxbsd/x11/display_server_x11.cpp @@ -3985,29 +3985,41 @@ void DisplayServerX11::process_events() { } else { DEBUG_LOG_X11("[%u] ButtonRelease window=%lu (%u), button_index=%u \n", frame, event.xbutton.window, window_id, mb->get_button_index()); - if (!wd.focused) { + WindowID window_id_other = INVALID_WINDOW_ID; + Window wd_other_x11_window; + if (wd.focused) { + // Handle cases where an unfocused popup is open that needs to receive button-up events. + WindowID popup_id = _get_focused_window_or_popup(); + if (popup_id != INVALID_WINDOW_ID && popup_id != window_id) { + window_id_other = popup_id; + wd_other_x11_window = windows[popup_id].x11_window; + } + } else { // Propagate the event to the focused window, // because it's received only on the topmost window. // Note: This is needed for drag & drop to work between windows, // because the engine expects events to keep being processed // on the same window dragging started. for (const KeyValue<WindowID, WindowData> &E : windows) { - const WindowData &wd_other = E.value; - WindowID window_id_other = E.key; - if (wd_other.focused) { - if (window_id_other != window_id) { - int x, y; - Window child; - XTranslateCoordinates(x11_display, wd.x11_window, wd_other.x11_window, event.xbutton.x, event.xbutton.y, &x, &y, &child); - - mb->set_window_id(window_id_other); - mb->set_position(Vector2(x, y)); - mb->set_global_position(mb->get_position()); + if (E.value.focused) { + if (E.key != window_id) { + window_id_other = E.key; + wd_other_x11_window = E.value.x11_window; } break; } } } + + if (window_id_other != INVALID_WINDOW_ID) { + int x, y; + Window child; + XTranslateCoordinates(x11_display, wd.x11_window, wd_other_x11_window, event.xbutton.x, event.xbutton.y, &x, &y, &child); + + mb->set_window_id(window_id_other); + mb->set_position(Vector2(x, y)); + mb->set_global_position(mb->get_position()); + } } Input::get_singleton()->parse_input_event(mb); diff --git a/platform/linuxbsd/x11/dynwrappers/xcursor-so_wrap.c b/platform/linuxbsd/x11/dynwrappers/xcursor-so_wrap.c index d689ff1aa8..7042a60d47 100644 --- a/platform/linuxbsd/x11/dynwrappers/xcursor-so_wrap.c +++ b/platform/linuxbsd/x11/dynwrappers/xcursor-so_wrap.c @@ -5,7 +5,7 @@ // // NOTE: Generated from Xcursor 1.2.0. // This has been handpatched to workaround some issues with the generator that -// will be eventually fixed. In this case, non-existant symbols inherited from +// will be eventually fixed. In this case, non-existent symbols inherited from // libX11, but absent in libXcursor.so.1, were removed. #include <stdint.h> diff --git a/platform/linuxbsd/x11/dynwrappers/xcursor-so_wrap.h b/platform/linuxbsd/x11/dynwrappers/xcursor-so_wrap.h index 43bbcf62c5..d00fccffda 100644 --- a/platform/linuxbsd/x11/dynwrappers/xcursor-so_wrap.h +++ b/platform/linuxbsd/x11/dynwrappers/xcursor-so_wrap.h @@ -7,7 +7,7 @@ // // NOTE: Generated from Xcursor 1.2.0. // This has been handpatched to workaround some issues with the generator that -// will be eventually fixed. In this case, non-existant symbols inherited from +// will be eventually fixed. In this case, non-existent symbols inherited from // libX11, but absent in libXcursor.so.1, were removed. #include <stdint.h> diff --git a/platform/linuxbsd/x11/dynwrappers/xext-so_wrap.c b/platform/linuxbsd/x11/dynwrappers/xext-so_wrap.c index 711dd3fa5e..c8e87a6b85 100644 --- a/platform/linuxbsd/x11/dynwrappers/xext-so_wrap.c +++ b/platform/linuxbsd/x11/dynwrappers/xext-so_wrap.c @@ -5,10 +5,10 @@ // // NOTE: Generated from Xext 1.3.5. // This has been handpatched to workaround some issues with the generator that -// will be eventually fixed. In this case, non-existant symbols inherited from +// will be eventually fixed. In this case, non-existent symbols inherited from // libX11, but absent in libXext.so.6, were removed and an include needed for // proper parsing was added (this had also to be temporarily added to the -// original header, as dynload-wrapper would complain otherwsise) +// original header, as dynload-wrapper would complain otherwise) #include <stdint.h> // HANDPATCH: Needed for a successful compilation. diff --git a/platform/linuxbsd/x11/dynwrappers/xext-so_wrap.h b/platform/linuxbsd/x11/dynwrappers/xext-so_wrap.h index 991d07b405..aee92b593e 100644 --- a/platform/linuxbsd/x11/dynwrappers/xext-so_wrap.h +++ b/platform/linuxbsd/x11/dynwrappers/xext-so_wrap.h @@ -7,10 +7,10 @@ // // NOTE: Generated from Xext 1.3.5. // This has been handpatched to workaround some issues with the generator that -// will be eventually fixed. In this case, non-existant symbols inherited from +// will be eventually fixed. In this case, non-existent symbols inherited from // libX11, but absent in libXext.so.6, were removed and an include needed for // proper parsing was added (this had also to be temporarily added to the -// original header, as dynload-wrapper would complain otherwsise) +// original header, as dynload-wrapper would complain otherwise) #include <stdint.h> // HANDPATCH: Needed for a successful compilation. diff --git a/platform/linuxbsd/x11/dynwrappers/xinerama-so_wrap.c b/platform/linuxbsd/x11/dynwrappers/xinerama-so_wrap.c index 42af983345..85ac80e3f2 100644 --- a/platform/linuxbsd/x11/dynwrappers/xinerama-so_wrap.c +++ b/platform/linuxbsd/x11/dynwrappers/xinerama-so_wrap.c @@ -5,7 +5,7 @@ // // NOTE: Generated from Xinerama 1.1.4. // This has been handpatched to workaround some issues with the generator that -// will be eventually fixed. In this case, non-existant symbols inherited from +// will be eventually fixed. In this case, non-existent symbols inherited from // libX11, but absent in libXinerama.so.1, were removed. #include <stdint.h> diff --git a/platform/linuxbsd/x11/dynwrappers/xinerama-so_wrap.h b/platform/linuxbsd/x11/dynwrappers/xinerama-so_wrap.h index 891d9f21fd..9139421cd6 100644 --- a/platform/linuxbsd/x11/dynwrappers/xinerama-so_wrap.h +++ b/platform/linuxbsd/x11/dynwrappers/xinerama-so_wrap.h @@ -7,7 +7,7 @@ // // NOTE: Generated from Xinerama 1.1.4. // This has been handpatched to workaround some issues with the generator that -// will be eventually fixed. In this case, non-existant symbols inherited from +// will be eventually fixed. In this case, non-existent symbols inherited from // libX11, but absent in libXinerama.so.1, were removed. #include <stdint.h> diff --git a/platform/linuxbsd/x11/dynwrappers/xinput2-so_wrap.c b/platform/linuxbsd/x11/dynwrappers/xinput2-so_wrap.c index 5e1f0999fc..5f16bc6111 100644 --- a/platform/linuxbsd/x11/dynwrappers/xinput2-so_wrap.c +++ b/platform/linuxbsd/x11/dynwrappers/xinput2-so_wrap.c @@ -5,7 +5,7 @@ // // NOTE: Generated from Xi 1.7.10. // This has been handpatched to workaround some issues with the generator that -// will be eventually fixed. In this case, non-existant symbols inherited from +// will be eventually fixed. In this case, non-existent symbols inherited from // libX11, liXext and libXfixes, but absent in libXi.so.6, were removed. #include <stdint.h> diff --git a/platform/linuxbsd/x11/dynwrappers/xinput2-so_wrap.h b/platform/linuxbsd/x11/dynwrappers/xinput2-so_wrap.h index 95740cee58..ecb7aa5048 100644 --- a/platform/linuxbsd/x11/dynwrappers/xinput2-so_wrap.h +++ b/platform/linuxbsd/x11/dynwrappers/xinput2-so_wrap.h @@ -7,7 +7,7 @@ // // NOTE: Generated from Xi 1.7.10. // This has been handpatched to workaround some issues with the generator that -// will be eventually fixed. In this case, non-existant symbols inherited from +// will be eventually fixed. In this case, non-existent symbols inherited from // libX11, liXext and libXfixes, but absent in libXi.so.6, were removed. #include <stdint.h> diff --git a/platform/linuxbsd/x11/dynwrappers/xrandr-so_wrap.c b/platform/linuxbsd/x11/dynwrappers/xrandr-so_wrap.c index eb0f9abf15..f37f3a9db0 100644 --- a/platform/linuxbsd/x11/dynwrappers/xrandr-so_wrap.c +++ b/platform/linuxbsd/x11/dynwrappers/xrandr-so_wrap.c @@ -5,7 +5,7 @@ // // NOTE: Generated from Xrandr 1.5.2. // This has been handpatched to workaround some issues with the generator that -// will be eventually fixed. In this case, non-existant symbols inherited from +// will be eventually fixed. In this case, non-existent symbols inherited from // libX11 and libXrender, but absent in libXrandr.so.2, were removed. #include <stdint.h> diff --git a/platform/linuxbsd/x11/dynwrappers/xrandr-so_wrap.h b/platform/linuxbsd/x11/dynwrappers/xrandr-so_wrap.h index f1ca9f94a5..046d4c7de3 100644 --- a/platform/linuxbsd/x11/dynwrappers/xrandr-so_wrap.h +++ b/platform/linuxbsd/x11/dynwrappers/xrandr-so_wrap.h @@ -7,7 +7,7 @@ // // NOTE: Generated from Xrandr 1.5.2. // This has been handpatched to workaround some issues with the generator that -// will be eventually fixed. In this case, non-existant symbols inherited from +// will be eventually fixed. In this case, non-existent symbols inherited from // libX11 and libXrender, but absent in libXrandr.so.2, were removed. #include <stdint.h> diff --git a/platform/linuxbsd/x11/dynwrappers/xrender-so_wrap.c b/platform/linuxbsd/x11/dynwrappers/xrender-so_wrap.c index b63a1eca8d..2d3847e584 100644 --- a/platform/linuxbsd/x11/dynwrappers/xrender-so_wrap.c +++ b/platform/linuxbsd/x11/dynwrappers/xrender-so_wrap.c @@ -5,7 +5,7 @@ // // NOTE: Generated from Xrender 0.9.10. // This has been handpatched to workaround some issues with the generator that -// will be eventually fixed. In this case, non-existant symbols inherited from +// will be eventually fixed. In this case, non-existent symbols inherited from // libX11, but absent in libXrender.so.1, were removed. #include <stdint.h> diff --git a/platform/linuxbsd/x11/dynwrappers/xrender-so_wrap.h b/platform/linuxbsd/x11/dynwrappers/xrender-so_wrap.h index d3862ed459..e873448ec5 100644 --- a/platform/linuxbsd/x11/dynwrappers/xrender-so_wrap.h +++ b/platform/linuxbsd/x11/dynwrappers/xrender-so_wrap.h @@ -7,7 +7,7 @@ // // NOTE: Generated from Xrender 0.9.10. // This has been handpatched to workaround some issues with the generator that -// will be eventually fixed. In this case, non-existant symbols inherited from +// will be eventually fixed. In this case, non-existent symbols inherited from // libX11, but absent in libXrender.so.1, were removed. #include <stdint.h> |