Merge pull request #92843 from anniryynanen/tooltip-in-popup

Stop color picker tooltip from stealing input events
This commit is contained in:
Rémi Verschelde 2024-06-10 16:11:52 +02:00
commit b80e591448
No known key found for this signature in database
GPG key ID: C3336907360768E1
3 changed files with 12 additions and 3 deletions

View file

@ -4184,8 +4184,11 @@ void DisplayServerX11::popup_open(WindowID p_window) {
}
}
// Detect tooltips and other similar popups that shouldn't block input to their parent.
bool ignores_input = window_get_flag(WINDOW_FLAG_NO_FOCUS, p_window) && window_get_flag(WINDOW_FLAG_MOUSE_PASSTHROUGH, p_window);
WindowData &wd = windows[p_window];
if (wd.is_popup || has_popup_ancestor) {
if (wd.is_popup || (has_popup_ancestor && !ignores_input)) {
// Find current popup parent, or root popup if new window is not transient.
List<WindowID>::Element *C = nullptr;
List<WindowID>::Element *E = popup_list.back();

View file

@ -3366,8 +3366,11 @@ void DisplayServerMacOS::popup_open(WindowID p_window) {
}
}
// Detect tooltips and other similar popups that shouldn't block input to their parent.
bool ignores_input = window_get_flag(WINDOW_FLAG_NO_FOCUS, p_window) && window_get_flag(WINDOW_FLAG_MOUSE_PASSTHROUGH, p_window);
WindowData &wd = windows[p_window];
if (wd.is_popup || has_popup_ancestor) {
if (wd.is_popup || (has_popup_ancestor && !ignores_input)) {
bool was_empty = popup_list.is_empty();
// Find current popup parent, or root popup if new window is not transient.
List<WindowID>::Element *C = nullptr;

View file

@ -3575,8 +3575,11 @@ void DisplayServerWindows::popup_open(WindowID p_window) {
}
}
// Detect tooltips and other similar popups that shouldn't block input to their parent.
bool ignores_input = window_get_flag(WINDOW_FLAG_NO_FOCUS, p_window) && window_get_flag(WINDOW_FLAG_MOUSE_PASSTHROUGH, p_window);
WindowData &wd = windows[p_window];
if (wd.is_popup || has_popup_ancestor) {
if (wd.is_popup || (has_popup_ancestor && !ignores_input)) {
// Find current popup parent, or root popup if new window is not transient.
List<WindowID>::Element *C = nullptr;
List<WindowID>::Element *E = popup_list.back();