-
-
Notifications
You must be signed in to change notification settings - Fork 76
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
Add support for Mutter 44 #1570
Conversation
🙃 Ah so the change is larger than I expected, how do we get_ui_scaling_factor these days? The corresponding MR seems to be https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/2718, which is doing treewide changes like - MetaBackend *backend = meta_get_backend ();
+ MetaDisplay *display = meta_x11_display_get_display (x11_display);
+ MetaContext *context = meta_display_get_context (display);
+ MetaBackend *backend = meta_context_get_backend (context); |
Basically, for the scale_factor, we have to take into account the fact that each display can have a different scale factor and that it can be a floating value (which we do not like at elementary but that's something upstream wanted) |
This builds now, but I have done no testing whatsoever, I've been developing in a docker container and haven't even tried running it 😅 It will need thorough testing in the following areas as significant parts of code have been refactored, if it even runs without crashing:
|
I managed to build a VM. It looks like it crashes at https://github.com/elementary/gala/blob/62375b5/src/InternalUtils.vala#L361 with |
That sounds like the error you get when you try to start Gala in Wayland mode, which isn't supported yet. |
I can reproduce this crash on Fedora 38 beta with Mutter 44, definitely in X11 mode. But not with Mutter 42 on elementary OS. This is the same problem we have with Gala+Wayland though in that it's failing because we're trying to use GTK code inside the compositor, which isn't really ideal. |
@bobby285271 I've had some initial success with Mutter 44 and this branch, but it's a bit hacky: https://github.com/elementary/gala/tree/davidmhewitt/init-later |
Nice that seems to work, still saw some issues at a quick glance though (did not do a proper testing yet) I circled them in the screenshot |
Yes, I expected some scaling/positioning issues like this after having modified so much of the scaling and positioning code. There will be some maths I've done wrong somewhere 😅 I'll try and test and fix this some more over the next few days. The missing icon in your screenshot (number 2), is probably caused by the gresource being removed: Was there a reason for this @tintou ? |
Sorry that's a leftover of glib-compile-resources not working under Fedora docker image (my host is too old) so I had to remove it to build it locally |
@davidmhewitt Are there changes that we can start backporting to reduce the diff of this MR? |
@tintou Yes, probably. I'll start some work on that this week. |
cf40f95
to
75f3fc1
Compare
@bobby285271 @decathorpe I think this branch is in a pretty good state for Mutter 44 support now. I'll continue to separate out of a few of the changes and test and merge them separately, but I don't expect too many changes between this and the final version of our Mutter 44 support if you wanted to start some testing on your respective distros! 😉 |
This comment was marked as resolved.
This comment was marked as resolved.
@bobby285271 Could you check whether that issue happens with the Adwaita stylesheet? We're not really in control of the sizing of these titlebars in Gala, so this may be a stylesheet issue. |
Ah yeah it looks fine in Adwaita stylesheet 👍 |
Stylesheet issue opened here: elementary/stylesheet#1253 |
Get the scaling factor for the monitor you are drawing to with `Meta.Display.get_monitor_scale` instead.
3d194ce
to
fab71f0
Compare
@davidmhewitt I've rebased this MR, you might want to check it again 🙂 |
@tintou All looking good, thanks for cleaning up the commits! I've tested this branch on Mutter 42 on elementary 7 and Mutter 44 on Fedora 38 and it all seems to be working great. |
Closes #1569