Skip to content

Commit 796dc3f

Browse files
committed
webui_wait_async - macOS
1 parent ca14322 commit 796dc3f

1 file changed

Lines changed: 15 additions & 0 deletions

File tree

src/webview/wkwebview.m

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -151,6 +151,21 @@ void _webui_macos_wv_start() {
151151
}
152152
}
153153

154+
bool _webui_macos_wv_iteration_do(void) {
155+
@autoreleasepool {
156+
NSEvent *event = [NSApp nextEventMatchingMask:NSEventMaskAny
157+
untilDate:[NSDate distantPast]
158+
inMode:NSDefaultRunLoopMode
159+
dequeue:YES];
160+
if (event) {
161+
[NSApp sendEvent:event];
162+
[NSApp updateWindows];
163+
return true; // One event processed
164+
}
165+
return false; // Event queue is empty
166+
}
167+
}
168+
154169
bool _webui_macos_wv_new(int index, bool frameless, bool resizable) {
155170
#ifdef WEBUI_LOG
156171
printf("[ObjC]\t\t\t_webui_macos_wv_new([%d], [%d], [%d])\n", index, frameless, resizable);

0 commit comments

Comments
 (0)