-
-
Notifications
You must be signed in to change notification settings - Fork 1.7k
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
wayland: fix and enable by default #12333
Conversation
e3a026d
to
eb040c8
Compare
20f4495
to
c28ef97
Compare
c28ef97
to
b251c88
Compare
This is a workaround for QTBUG-133919
b251c88
to
209c0ec
Compare
209c0ec
to
d4472ed
Compare
I wonder, to test this do we want to launch it with the env |
Launch it as normal and it'll run in native wayland by default, since the |
(Left is Master, Right is PR) This fixes:
This doesn't fix:
|
This is to be expected, as wayland does not support absolute positioning. It would break environments like gnome or tiling wms a la sway.
Proooobably due to QTBUG-133919 fucking up with native. Unsure I can do anything about this... |
If you've come here to try and poke fun at us fixing a wayland bug we said wasn't our fault, well if you read the OP it's an upstream bug and this is a workaround. |
Following the original discovery that Qt's wl_surface lifetime were broken around 8 months ago, here's another upstream Qt bug!
Qt has two types of rendering for its widgets, alien and native. While alien is usually more efficient and allows Qt to handle its own refresh primitives, native window rendering is necessary if we want to paint to a widget ourselves (see Qt::WA_PaintOnScreen ).
Unfortunately, this comes with the side effect of letting the compositor decide how to deal with those surfaces.
Compositors that do not implement SSD, like GNOME (mutter) or weston do not by design refresh the way Qt assumes, thus leading to pretty borked results on those OSes for some widgets, for example:
As such, let's disable native window rendering for everything but the DisplayWidget.
This bug is reported and tracked upstream: https://bugreports.qt.io/browse/QTBUG-133919
POC: https://projects.govanify.com/govanify/qt-native-wayland-borked
NB: Do we want to enable alien rendering for every platform out of Wayland? Qt's documentation do mention that they are more efficient, but I only enabled it for wayland for now in fear of breakage.EDIT: added alien widget rendering for all platforms as windows testing showed a performance boost
Suggested Testing Steps
DO EVERYTHING YOU CAN TO MAKE IT BREAK!
Be sure to test GNOME wayland in priority, and don't hesitate to do weird things with the window, like hide, unhide, rotate 33° idk.