summaryrefslogtreecommitdiff
path: root/src/lib/ecore_cocoa
diff options
context:
space:
mode:
authorAlastair Poole <netstar@gmail.com>2018-06-21 13:34:20 +0100
committerAlastair Poole <netstar@gmail.com>2018-06-21 13:39:22 +0100
commita939b57c7b4da5171d92de93f1d837bcef842765 (patch)
tree1d47e0b77995d0944418bc477b5838194efff45b /src/lib/ecore_cocoa
parent1bcdc8af7be7d8060660c9b9e14018d66ac921d2 (diff)
ecore_cocoa: fix ECORE_EVENT_KEY_DOWN/UP on MacOS.
Fixing issue with modifier keys on MacOS. These events were missing window information. Tested with Fyne.io. Window ID and keyname are valid. See: http://bogosys.org/images/fyne_OSX.png. Thanks zmike for initial investigation. @fix T6944
Diffstat (limited to 'src/lib/ecore_cocoa')
-rw-r--r--src/lib/ecore_cocoa/ecore_cocoa.m5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/lib/ecore_cocoa/ecore_cocoa.m b/src/lib/ecore_cocoa/ecore_cocoa.m
index 83a7e26876..cfd56d397a 100644
--- a/src/lib/ecore_cocoa/ecore_cocoa.m
+++ b/src/lib/ecore_cocoa/ecore_cocoa.m
@@ -254,6 +254,7 @@ _ecore_cocoa_feed_events(void *anEvent)
254 case NSEventTypeFlagsChanged: 254 case NSEventTypeFlagsChanged:
255 { 255 {
256 NSUInteger flags = [event modifierFlags]; 256 NSUInteger flags = [event modifierFlags];
257 EcoreCocoaWindow *window = (EcoreCocoaWindow *)[event window];
257 258
258 Ecore_Event_Key *evDown = NULL; 259 Ecore_Event_Key *evDown = NULL;
259 Ecore_Event_Key *evUp = NULL; 260 Ecore_Event_Key *evUp = NULL;
@@ -277,6 +278,8 @@ _ecore_cocoa_feed_events(void *anEvent)
277 278
278 if (evDown->key) 279 if (evDown->key)
279 { 280 {
281 evDown->window = (Ecore_Window)window.ecore_window_data;
282 evDown->event_window = evDown->window;
280 evDown->keyname = evDown->key; 283 evDown->keyname = evDown->key;
281 evDown->timestamp = time; 284 evDown->timestamp = time;
282 evDown->string = NULL; 285 evDown->string = NULL;
@@ -311,6 +314,8 @@ _ecore_cocoa_feed_events(void *anEvent)
311 314
312 if (evUp->key) 315 if (evUp->key)
313 { 316 {
317 evUp->window = (Ecore_Window)window.ecore_window_data;
318 evUp->event_window = evUp->window;
314 evUp->keyname = evUp->key; 319 evUp->keyname = evUp->key;
315 evUp->timestamp = time; 320 evUp->timestamp = time;
316 evUp->string = NULL; 321 evUp->string = NULL;