mac: have key events get sent to parent
All checks were successful
pyrite-dev/milsko/pipeline/head This commit looks good
All checks were successful
pyrite-dev/milsko/pipeline/head This commit looks good
This commit is contained in:
parent
e2bcd7b9e9
commit
9be36b0755
1 changed files with 7 additions and 3 deletions
|
|
@ -247,7 +247,9 @@ static CGPoint pointFlip(CGPoint point) {
|
|||
int i;
|
||||
NSEvent *ev;
|
||||
|
||||
[self eventProcess:lastEvent];
|
||||
if (lastEvent) {
|
||||
[self eventProcess:lastEvent];
|
||||
}
|
||||
|
||||
while ((ev = [self->window nextEventMatchingMask:NSAnyEventMask
|
||||
untilDate:[NSDate distantPast]
|
||||
|
|
@ -262,6 +264,8 @@ static CGPoint pointFlip(CGPoint point) {
|
|||
NSWindow *parentWindow = [self parentWindow];
|
||||
MwLL h;
|
||||
MwBool doSendEvent = MwTRUE;
|
||||
MwLL this = self->handle.pointer;
|
||||
|
||||
if (!win) {
|
||||
return;
|
||||
}
|
||||
|
|
@ -789,10 +793,10 @@ static CGPoint pointFlip(CGPoint point) {
|
|||
}
|
||||
switch (ev.type) {
|
||||
case NSEventTypeKeyDown:
|
||||
MwLLDispatch(h, key, &ch);
|
||||
MwLLDispatch(this, key, &ch);
|
||||
break;
|
||||
case NSEventTypeKeyUp:
|
||||
MwLLDispatch(h, key_released, &ch);
|
||||
MwLLDispatch(this, key_released, &ch);
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue