Skip to content

Commit 6a0bc96

Browse files
committed
Restore pumpRunLoopEventSendAndSignal: for Squeak
@guillep introduced some additional logic to filter out events that do not correspond to the VM window. The about panel and the fullscreen frame are also alien windows, but were not receiving any events because of this change. As a consequence, these events will forever remain in the queue and therefore, the buttons of the fullscreen frame and about panel cannot be clicked. This commit reverts all changes back to the previous version that consumes all events and forwards them to NSApp. In order to avoid breaking PharoVM, we do all of this behind an `#ifdef PharoVM`. Relevant changes: #295 #300
1 parent c25b871 commit 6a0bc96

File tree

1 file changed

+16
-0
lines changed

1 file changed

+16
-0
lines changed

platforms/iOS/vm/OSX/sqSqueakOSXApplication+events.m

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -74,6 +74,7 @@ @implementation sqSqueakOSXApplication (events)
7474
// This gives other windows the opportunity to consume their events
7575
- (void) pumpRunLoopEventSendAndSignal:(BOOL)signal {
7676

77+
#ifdef PharoVM
7778
@autoreleasepool {
7879
NSEvent *event;
7980
NSMutableArray *alienEventQueue = [[NSMutableArray alloc] init];
@@ -100,6 +101,21 @@ - (void) pumpRunLoopEventSendAndSignal:(BOOL)signal {
100101
[alienEventQueue removeObject: event];
101102
}
102103
}
104+
#else
105+
NSEvent *event;
106+
107+
while ((event = [NSApp
108+
nextEventMatchingMask:NSAnyEventMask
109+
untilDate:nil
110+
inMode:NSEventTrackingRunLoopMode
111+
dequeue:YES])) {
112+
113+
[NSApp sendEvent: event];
114+
if (signal) {
115+
interpreterProxy->signalSemaphoreWithIndex(gDelegateApp.squeakApplication.inputSemaphoreIndex);
116+
}
117+
}
118+
#endif
103119
}
104120

105121
- (void) pumpRunLoop {

0 commit comments

Comments
 (0)