Skip to content

Commit 54dad6c

Browse files
committed
[Win32] Make Edge only process relevant OS messages #1789
When waiting for initialization of the WebView2 component in the Edge implementation, OS messages are processed by peeking the queue and performing a display.readAndDispatch() in case a message is present. The call to OS.PeekMessage() does, however, already perform some processing of the messages. In fact, Edge is not supposed to process all kinds of OS messages at all (like paint or input events) but should rather only process the WebView2 initialization callback message, arriving as a posted OS message. This change thus limits the message peeking inside Edge to only process the message type PM_QS_POSTMESSAGE. Fixes #1789
1 parent 920fe85 commit 54dad6c

File tree

1 file changed

+1
-1
lines changed
  • bundles/org.eclipse.swt/Eclipse SWT Browser/win32/org/eclipse/swt/browser

1 file changed

+1
-1
lines changed

bundles/org.eclipse.swt/Eclipse SWT Browser/win32/org/eclipse/swt/browser/Edge.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -510,7 +510,7 @@ private static void processOSMessagesUntil(Supplier<Boolean> condition, Consumer
510510
// The timer call also wakes up the display to avoid being stuck in display.sleep()
511511
display.timerExec((int) MAXIMUM_OPERATION_TIME.toMillis(), () -> timeoutOccurred.set(true));
512512
while (!display.isDisposed() && !condition.get() && !timeoutOccurred.get()) {
513-
if (OS.PeekMessage(msg, 0, 0, 0, OS.PM_NOREMOVE)) {
513+
if (OS.PeekMessage(msg, 0, 0, 0, OS.PM_NOREMOVE | OS.PM_QS_POSTMESSAGE)) {
514514
display.readAndDispatch();
515515
} else {
516516
display.sleep();

0 commit comments

Comments
 (0)