summaryrefslogtreecommitdiff
path: root/platform/x11/os_x11.cpp
diff options
context:
space:
mode:
authorRĂ©mi Verschelde <rverschelde@gmail.com>2019-04-29 18:39:45 +0200
committerGitHub <noreply@github.com>2019-04-29 18:39:45 +0200
commitb2f6beb888d17b2a01779bba203067c0aba548c4 (patch)
tree5400b67183b8264693d02ac32157f5bdcc729611 /platform/x11/os_x11.cpp
parent23147ae2c3740e73f0247cf4bff24ba9326683a4 (diff)
parentc709dfdf06f6b09b61c1f34ff5a32cbfa8acc523 (diff)
Merge pull request #28061 from guilhermefelipecgs/fix_19137
[Input] Release keys/actions pressed if window loses focus
Diffstat (limited to 'platform/x11/os_x11.cpp')
-rw-r--r--platform/x11/os_x11.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/platform/x11/os_x11.cpp b/platform/x11/os_x11.cpp
index f6161a9485..8d857de239 100644
--- a/platform/x11/os_x11.cpp
+++ b/platform/x11/os_x11.cpp
@@ -2076,7 +2076,9 @@ void OS_X11::process_xevents() {
case FocusOut:
window_has_focus = false;
+ input->release_pressed_events();
main_loop->notification(MainLoop::NOTIFICATION_WM_FOCUS_OUT);
+
if (mouse_mode_grab) {
//dear X11, I try, I really try, but you never work, you do whathever you want.
if (mouse_mode == MOUSE_MODE_CAPTURED) {