This fixes a number of test issues when running the tests on Fedora under Wayland/Gnome Shell.
There are still about 10 test cases that fail, but I haven't been able to sort out those yet (they're intermittent).
https://github.com/wxWidgets/wxWidgets/pull/26934
(18 files)
—
Reply to this email directly, view it on GitHub, or unsubscribe.
Triage notifications, keep track of coding agent tasks and review pull requests on the go with GitHub Mobile for iOS and Android. Download it today!
You are receiving this because you are subscribed to this thread.![]()
@vadz commented on this pull request.
Thanks for the fixes! Most of them should definitely be applied, but I think a couple can be improved by applying them to all ports and not just wxGTK and I don't understand one of them (wxHelpEvent), could you please explain? TIA!
In tests/controls/gridtest.cpp:
> + // Update() is a no-op under GTK3/Wayland, so wait for the actual + // paint event instead of relying on it being synchronous.
I'd say that we should do this under all platforms, waiting for the paint event is higher level and hence better than just blindly yielding.
In tests/controls/textctrltest.cpp:
> @@ -197,6 +199,11 @@ void TextCtrlTestCase::CreateText(long extraStyles)
{
const long style = m_style | extraStyles;
const int h = (style & wxTE_MULTILINE) ? TEXT_HEIGHT : -1;
+#if defined(__WXGTK__)
This shouldn't be GTK-specific, this is how it works in all ports. So something else must explain the failures under wxGTK.
> + // wxHelpEvent::GuessOrigin(), called from its default ctor, + // can trigger a wx assert here because it can't determine
I think this is a real problem uncovered by the test and should be fixed instead of being suppressed.
But I don't see any asserts in wxGetKeyState() when using Wayland, where exactly is it?
In tests/events/propagation.cpp:
> @@ -187,8 +187,16 @@ class TestScrollWindow : public wxScrolledWindow
g_str.clear();
#endif // __WXGTK__ || __WXQT__
+#ifdef __WXGTK__
Again, I'd rather do this for all platforms instead of adding a special case for wxGTK.
—
Reply to this email directly, view it on GitHub, or unsubscribe.
Triage notifications, keep track of coding agent tasks and review pull requests on the go with GitHub Mobile for iOS and Android. Download it today!
You are receiving this because you are subscribed to this thread.![]()
@swt2c commented on this pull request.
> + // wxHelpEvent::GuessOrigin(), called from its default ctor, + // can trigger a wx assert here because it can't determine
Yes, admittedly, this is a real problem, but wasn't sure about how to fix it. We really need some sort of bool wxCanKeyKeyState(wxKeyCode) that returns true/false if it's possible to get the key state for a given key. In the case where wxHelpEvent calls wxGetKeyState() it could at least return Origin_Unknown which would be better that what it does currently.
This is where the assert is happening: https://github.com/wxWidgets/wxWidgets/blob/master/src/unix/utilsx11.cpp#L2633
You don't see that one?
—
Reply to this email directly, view it on GitHub, or unsubscribe.
Triage notifications, keep track of coding agent tasks and review pull requests on the go with GitHub Mobile for iOS and Android. Download it today!
You are receiving this because you are subscribed to this thread.![]()
@vadz commented on this pull request.
> + // wxHelpEvent::GuessOrigin(), called from its default ctor, + // can trigger a wx assert here because it can't determine
Sorry, I misread the code :-(
I think we need to either just remove the assert (after all, we already just return false silently for GTK3 < 3.4.0 — although I don't think we support GTK < 3.6 since a very long time...) or add a new wxIsKeyPressed() returning a 3-state enum with values meaning "yes", "no" and "unknown".
The assert was originally added by you in 1033fb0 (Fix wxGetKeyState() on non-X11 wxGTK backends (e.g., Wayland), 2016-09-02), so I think it's up to you to decide what do you prefer. Unless @paulcor has some overriding considerations?
—
Reply to this email directly, view it on GitHub, or unsubscribe.
Triage notifications, keep track of coding agent tasks and review pull requests on the go with GitHub Mobile for iOS and Android. Download it today!
You are receiving this because you are subscribed to this thread.![]()
@swt2c commented on this pull request.
> + // wxHelpEvent::GuessOrigin(), called from its default ctor, + // can trigger a wx assert here because it can't determine
Ah yes, I can't believe that was nearly 10 years ago.
OK, since this one isn't really a test fix, I'll pull this commit from the PR and address separately.
—
Reply to this email directly, view it on GitHub, or unsubscribe.
Triage notifications, keep track of coding agent tasks and review pull requests on the go with GitHub Mobile for iOS and Android. Download it today!
You are receiving this because you are subscribed to this thread.![]()
@swt2c pushed 8 commits.
—
View it on GitHub or unsubscribe.
Triage notifications, keep track of coding agent tasks and review pull requests on the go with GitHub Mobile for iOS and Android. Download it today!
You are receiving this because you are subscribed to this thread.![]()
@swt2c pushed 4 commits.
—
View it on GitHub or unsubscribe.
Triage notifications, keep track of coding agent tasks and review pull requests on the go with GitHub Mobile for iOS and Android. Download it today!
You are receiving this because you are subscribed to this thread.![]()
@swt2c commented on this pull request.
In tests/controls/gridtest.cpp:
> + // Update() is a no-op under GTK3/Wayland, so wait for the actual + // paint event instead of relying on it being synchronous.
I started to do this, but then realized that wxWaitForPaint is only implemented for wxGTK, so I stopped, especially since I don't really have a way to test MSW and OSX outside of GitHub Actions, so I'd rather not do this.
—
Reply to this email directly, view it on GitHub, or unsubscribe.
Triage notifications, keep track of coding agent tasks and review pull requests on the go with GitHub Mobile for iOS and Android. Download it today!
You are receiving this because you are subscribed to this thread.![]()
@swt2c commented on this pull request.
In tests/controls/textctrltest.cpp:
> @@ -197,6 +199,11 @@ void TextCtrlTestCase::CreateText(long extraStyles)
{
const long style = m_style | extraStyles;
const int h = (style & wxTE_MULTILINE) ? TEXT_HEIGHT : -1;
+#if defined(__WXGTK__)
Done.
—
Reply to this email directly, view it on GitHub, or unsubscribe.
Triage notifications, keep track of coding agent tasks and review pull requests on the go with GitHub Mobile for iOS and Android. Download it today!
You are receiving this because you are subscribed to this thread.![]()
@swt2c commented on this pull request.
> + // wxHelpEvent::GuessOrigin(), called from its default ctor, + // can trigger a wx assert here because it can't determine
Removed.
—
Reply to this email directly, view it on GitHub, or unsubscribe.
Triage notifications, keep track of coding agent tasks and review pull requests on the go with GitHub Mobile for iOS and Android. Download it today!
You are receiving this because you are subscribed to this thread.![]()
@swt2c commented on this pull request.
In tests/events/propagation.cpp:
> @@ -187,8 +187,16 @@ class TestScrollWindow : public wxScrolledWindow
g_str.clear();
#endif // __WXGTK__ || __WXQT__
+#ifdef __WXGTK__
Ditto on wxWaitForPaint only being wxGTK.
—
Reply to this email directly, view it on GitHub, or unsubscribe.
Triage notifications, keep track of coding agent tasks and review pull requests on the go with GitHub Mobile for iOS and Android. Download it today!
You are receiving this because you are subscribed to this thread.![]()
@vadz commented on this pull request.
In tests/controls/gridtest.cpp:
> + // Update() is a no-op under GTK3/Wayland, so wait for the actual + // paint event instead of relying on it being synchronous.
Oops, sorry for completely forgetting about this :-(
—
Reply to this email directly, view it on GitHub, or unsubscribe.
Triage notifications, keep track of coding agent tasks and review pull requests on the go with GitHub Mobile for iOS and Android. Download it today!
You are receiving this because you are subscribed to this thread.![]()
—
Reply to this email directly, view it on GitHub, or unsubscribe.
Triage notifications, keep track of coding agent tasks and review pull requests on the go with GitHub Mobile for iOS and Android. Download it today!
You are receiving this because you are subscribed to this thread.![]()