summaryrefslogtreecommitdiff
path: root/platform/osx/os_osx.mm
diff options
context:
space:
mode:
authorGuilherme Felipe <guilhermefelipecgs@gmail.com>2019-04-15 14:41:44 -0300
committerGuilherme Felipe <guilhermefelipecgs@gmail.com>2019-04-27 12:05:12 -0300
commitc709dfdf06f6b09b61c1f34ff5a32cbfa8acc523 (patch)
treeeb330830f3f29f623134806d29ac0e1cc09a1fe1 /platform/osx/os_osx.mm
parent260530f01caa8ea3e2fb7bfda04f4bd718ae14f5 (diff)
[Input] Release keys/actions pressed if window loses focus
Co-authored-by: bruvzg <7645683+bruvzg@users.noreply.github.com> Co-authored-by: Marcelo Fernandez <marcelofg55@gmail.com>
Diffstat (limited to 'platform/osx/os_osx.mm')
-rw-r--r--platform/osx/os_osx.mm5
1 files changed, 5 insertions, 0 deletions
diff --git a/platform/osx/os_osx.mm b/platform/osx/os_osx.mm
index 5a4c0593bc..945290ac73 100644
--- a/platform/osx/os_osx.mm
+++ b/platform/osx/os_osx.mm
@@ -337,6 +337,11 @@ static CVReturn DisplayLinkCallback(CVDisplayLinkRef displayLink, const CVTimeSt
}
- (void)windowDidMove:(NSNotification *)notification {
+
+ if (OS_OSX::singleton->get_main_loop()) {
+ OS_OSX::singleton->input->release_pressed_events();
+ }
+
/*
[window->nsgl.context update];