Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added comments and removed PharoVM guards for windowing support #296

Merged
merged 1 commit into from Oct 23, 2018
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
31 changes: 11 additions & 20 deletions platforms/iOS/vm/OSX/sqSqueakOSXApplication+events.m
Expand Up @@ -69,30 +69,21 @@ @implementation sqSqueakOSXApplication (events)

- (void) pumpRunLoopEventSendAndSignal:(BOOL)signal {
NSEvent *event;

#ifdef PharoVM
while ((event = [gDelegateApp.window nextEventMatchingMask:NSEventMaskAny
while (event = [NSApp nextEventMatchingMask:NSEventMaskAny
untilDate:nil
inMode:NSEventTrackingRunLoopMode
dequeue:NO])) {
if (event.window == 0 || event.window == gDelegateApp.window) {
event = [gDelegateApp.window nextEventMatchingMask:NSEventMaskAny
untilDate:nil
inMode:NSEventTrackingRunLoopMode
dequeue:YES];
}
else{
// STOP THE LOOP
// We have an event that does not correspond to our window
dequeue:NO]) {
// If the event is not a system event or an event of *this* window, stop consuming events
// In case of multi window applications, it is the responsibility of the other windowing systems to consume their own events
// This is a cooperative event handling mechanism for simplicity
// Single window systems will be not affected by it
if (!(event.window == 0 || event.window == gDelegateApp.window)){
break;
}
#else
while ((event = [NSApp nextEventMatchingMask:NSEventMaskAny
untilDate:nil
inMode:NSEventTrackingRunLoopMode
dequeue:YES])) {
#endif
[NSApp sendEvent: event];
[NSApp sendEvent: [NSApp nextEventMatchingMask:NSEventMaskAny
untilDate:nil
inMode:NSEventTrackingRunLoopMode
dequeue:YES]];
if (signal) {
interpreterProxy->signalSemaphoreWithIndex(gDelegateApp.squeakApplication.inputSemaphoreIndex);
}
Expand Down