Merge pull request #119331 from norepro/fix-x11-release-pressed-events
Release X11 pressed events on true focus loss
This commit is contained in:
@@ -4915,6 +4915,9 @@ void DisplayServerX11::process_events() {
|
||||
OS::get_singleton()->get_main_loop()->notification(MainLoop::NOTIFICATION_APPLICATION_FOCUS_OUT);
|
||||
}
|
||||
app_focused = false;
|
||||
|
||||
// Release pressed events here instead of FocusOut because it's a no-op until NOTIFICATION_APPLICATION_FOCUS_OUT is processed.
|
||||
Input::get_singleton()->release_pressed_events();
|
||||
}
|
||||
} else {
|
||||
time_since_no_focus = OS::get_singleton()->get_ticks_msec();
|
||||
@@ -5275,8 +5278,6 @@ void DisplayServerX11::process_events() {
|
||||
}
|
||||
wd.focused = false;
|
||||
|
||||
Input::get_singleton()->release_pressed_events();
|
||||
|
||||
AccessibilityServer::get_singleton()->set_window_focused(window_id, false);
|
||||
_send_window_event(wd, DisplayServerEnums::WINDOW_EVENT_FOCUS_OUT);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user