Skip to content

Commit 319895e

Browse files
committed
Adapt Test_org_eclipse_swt_events_KeyEvent for Windows Server 2025 #2516
Makes Test_org_eclipse_swt_events_KeyEvent work on Windows Server 2025 by enforcing that the test shell has focus before processing any key combination. Fixes #2516
1 parent 35119f0 commit 319895e

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

tests/org.eclipse.swt.tests.win32/JUnit Tests/org/eclipse/swt/tests/win32/KeyboardLayoutTest.java

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -587,6 +587,8 @@ protected void testKey(String testName, Runnable runnable, int expectStateMask,
587587
}
588588

589589
protected void testScanCode(int pressStateMask, UsScan pressScanCode, int expectStateMask, char expectChar, int expectLocation, int expectKeyCode) {
590+
// ensure that shell has focus
591+
shell.forceFocus();
590592
String testName = getKeyName(pressStateMask, pressScanCode);
591593
testKey(
592594
testName,

0 commit comments

Comments
 (0)