-
Notifications
You must be signed in to change notification settings - Fork 182
Process events until parent shell is activated #2592
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
Process events until parent shell is activated #2592
Conversation
d27585a
to
ffba498
Compare
Test commit with |
Test Results 118 files ±0 118 suites ±0 11m 53s ⏱️ ±0s Results for commit 6777ba1. ± Comparison against base commit 1eabfa3. This pull request skips 1 test.
♻️ This comment has been updated with latest results. |
8cc0c1c
to
50a12a5
Compare
The test I am modifying was a regression test for https://bugs.eclipse.org/bugs/show_bug.cgi?id=436841, but only tested 1 of the 4 events. I added to the test all the events. The test was also written before GTK4 (???) and was disabled on non-x11. The test is now enabled on x11. I'll updated the commit message to include the above on my next push. |
The tests have successfully run 1000x, so I think this is ready to go. |
50a12a5
to
2d0e5ac
Compare
It may take some event cycles before the parent shell that is getting focus/activation back gets the notification. Therefore wait until the Activate listener is called This test had bitrotten due to order of operation issues, see eclipse-platform#2591 for details on that. This test was a regression test for https://bugs.eclipse.org/436841, but only tested 1 of the 4 events. I added to the test all the events. The test was also written before GTK4 (???) and was disabled on non-x11. The test is now enabled on x11.
2d0e5ac
to
6777ba1
Compare
assertTrue(listenerCalled); | ||
} | ||
public void test_activateEventSend() throws InterruptedException { | ||
assumeTrue((SwtTestUtil.isGTK && SwtTestUtil.isX11) || SwtTestUtil.isGTK4, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Note that because of #2591 this assumption fails, even on GTK3 + x11.
When I had done the 1000x repeated test I had included the fix in this PR as well to make sure it ran.
Once #2591 is done this test will actually run properly.
In hindsight, I think I made it too complicated by having this as two PRs. Two commits in the one PR would have been sufficient (and simpler for me)
The value of org.eclipse.swt.internal.gdk.backend is not set until a display is created at least once since this value is assigned in the Display constructor. To be able to detect if Display has been created, set "org.eclipse.swt.internal.gdk.backend" on wayland too. A similar problem exists for org.eclipse.swt.internal.gtk.version in relation to OS. This is a fix for a regression caused by moving the setting of org.eclipse.swt.internal.gdk.backend from OS to Display in 5d67ce6. That commit fixed an unrelated bug, but sometimes bad initialization of isX11 is an unintended side effect causing tests to be skipped or run in unexpected ways since isX11 was not correct. See for example eclipse-platform#2592 for a test that was silently being skipped and had bitrotten as a result.
The value of org.eclipse.swt.internal.gdk.backend is not set until a display is created at least once since this value is assigned in the Display constructor. To be able to detect if Display has been created, set "org.eclipse.swt.internal.gdk.backend" on wayland too. A similar problem exists for org.eclipse.swt.internal.gtk.version in relation to OS. This is a fix for a regression caused by moving the setting of org.eclipse.swt.internal.gdk.backend from OS to Display in 5d67ce6. That commit fixed an unrelated bug, but sometimes bad initialization of isX11 is an unintended side effect causing tests to be skipped or run in unexpected ways since isX11 was not correct. See for example eclipse-platform#2592 for a test that was silently being skipped and had bitrotten as a result.
The value of org.eclipse.swt.internal.gdk.backend is not set until a display is created at least once since this value is assigned in the Display constructor. To be able to detect if Display has been created, set "org.eclipse.swt.internal.gdk.backend" on wayland too. A similar problem exists for org.eclipse.swt.internal.gtk.version in relation to OS. This is a fix for a regression caused by moving the setting of org.eclipse.swt.internal.gdk.backend from OS to Display in 5d67ce6. That commit fixed an unrelated bug, but sometimes bad initialization of isX11 is an unintended side effect causing tests to be skipped or run in unexpected ways since isX11 was not correct. See for example eclipse-platform#2592 for a test that was silently being skipped and had bitrotten as a result.
It may take some event cycles before the parent shell that is getting focus/activation back gets the notification. Therefore wait until the Activate listener is called