Skip to content
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 initial support for Mutter 40 #980

Merged
merged 2 commits into from Aug 16, 2021
Merged

Add initial support for Mutter 40 #980

merged 2 commits into from Aug 16, 2021

Conversation

tintou
Copy link
Member

@tintou tintou commented Dec 3, 2020

No description provided.

@decathorpe
Copy link

Looks like there already are some API changes in 40.alpha.

Notable warnings from build log:

WARNING: Project specifies a minimum meson_version '>= 0.48.0' but uses features which were added in newer versions:
 * 0.49.0: {'/ with string arguments'}
../lib/Plugin.vala:89.9-89.38: warning: Type `Meta.Rectangle[]' can not be used for a GLib.Object property
        public Meta.Rectangle[] region { get; private set; }
        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
../lib/Plugin.vala:96.9-96.49: warning: Type `Meta.Rectangle[]?' can not be used for a GLib.Object property
        protected Meta.Rectangle[]? custom_region {
        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
../lib/WindowManager.vala:67.9-67.50: warning: Type `Gala.KeybindingFilter?' can not be used for a GLib.Object property
        public KeybindingFilter? keybinding_filter { get; owned set; default = () => true; }
        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Compilation succeeded - 3 warning(s)
../plugins/pip/ShadowEffect.vala:108.13-109.59: warning: unhandled error `GLib.Error'
Compilation succeeded - 1 warning(s)
../src/ScreenshotManager.vala:318.17-325.17: warning: unhandled error `GLib.Error'
../src/ScreenshotManager.vala:327.17-334.17: warning: unhandled error `GLib.Error'
../src/Background/Background.vala:186.33-186.36: warning: Argument 1: Cannot pass null to non-null parameter type
                        finish (null);
                                ^^^^
../src/Background/Background.vala:192.37-192.40: warning: Argument 1: Cannot pass null to non-null parameter type
                            finish (null);
                                    ^^^^
../src/Background/BackgroundManager.vala:140.9-140.28: warning: Gala.BackgroundManager.set_size hides inherited method `Clutter.Actor.set_size'. Use the `new' keyword if hiding was intentional
        public void set_size (float width, float height) {
        ^^^^^^^^^^^^^^^^^^^^
../src/ShadowEffect.vala:121.13-122.59: warning: unhandled error `GLib.Error'
../src/Widgets/IconGroup.vala:544.17-544.27: warning: `null' incompatible with return type `Clutter.Actor'
                return null;
                ^^^^^^^^^^^
../src/DBus.vala:81.17-81.68: warning: Access to possible `null'. Perform a check or use an unsafe cast.
                (wm.background_group as BackgroundContainer).changed.connect (() => background_changed ());
                ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
../src/WindowManager.vala:399.15-399.29: warning: unreachable catch clause detected
            } catch (Error e) {
              ^^^^^^^^^^^^^^^
../src/WindowManager.vala:1050.23-1050.37: warning: unreachable catch clause detected
                    } catch (Error e) {
                      ^^^^^^^^^^^^^^^
../src/Background/BackgroundSource.vala:134.13-134.35: warning: field `Gala.BackgroundSource.SettingsHashCache.color_shading_type' never used
            uint color_shading_type;
            ^^^^^^^^^^^^^^^^^^^^^^^
../src/Background/BackgroundSource.vala:135.13-135.32: warning: field `Gala.BackgroundSource.SettingsHashCache.picture_opacity' never used
            uint picture_opacity;
            ^^^^^^^^^^^^^^^^^^^^
../src/Background/BackgroundSource.vala:136.13-136.32: warning: field `Gala.BackgroundSource.SettingsHashCache.picture_options' never used
            uint picture_options;
            ^^^^^^^^^^^^^^^^^^^^
../src/Background/BackgroundSource.vala:137.13-137.28: warning: field `Gala.BackgroundSource.SettingsHashCache.picture_uri' never used
            uint picture_uri;
            ^^^^^^^^^^^^^^^^
../src/Background/BackgroundSource.vala:138.13-138.29: warning: field `Gala.BackgroundSource.SettingsHashCache.primar_color' never used
            uint primar_color;
            ^^^^^^^^^^^^^^^^^
../src/Background/BackgroundSource.vala:139.13-139.32: warning: field `Gala.BackgroundSource.SettingsHashCache.secondary_color' never used
            uint secondary_color;
            ^^^^^^^^^^^^^^^^^^^^
../src/PluginManager.vala:34.9-34.37: warning: Type `X.Xrectangle[]' can not be used for a GLib.Object property
        public X.Xrectangle[] regions { get; private set; }
        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Compilation succeeded - 17 warning(s)

And one error:

src/gala.p/ScreenshotManager.c:2765:2: error: too many arguments to function ‘meta_cursor_tracker_get_pointer’
 2765 |  meta_cursor_tracker_get_pointer (_tmp3_, &_tmp4_, &_tmp5_, NULL);
      |  ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from src/gala.p/ScreenshotManager.c:42:
/usr/include/mutter-8/meta/meta-cursor-tracker.h:52:16: note: declared here
   52 | void           meta_cursor_tracker_get_pointer (MetaCursorTracker   *tracker,
      |                ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Full build.log attached.

@tintou tintou force-pushed the tintou/mutter40 branch 2 times, most recently from c49ac07 to 2d54e38 Compare December 3, 2020 14:53
@tintou
Copy link
Member Author

tintou commented Dec 3, 2020

Okay, so I've updated the .vapi and the source accordingly, I haven't compiled or tested it though

@decathorpe
Copy link

Looks like some copy-paste mishap happened, one of the .vapi files is no longer valid:

mutter-cogl-8.vapi:272.4-272.10: error: duplicate attribute `Version'
		[Version (since = "2.0")]
		 ^^^^^^^
mutter-cogl-8.vapi:585.2-585.43: error: `Cogl' already contains a definition for `Framebuffer'
	public interface Framebuffer : Cogl.Object {
	^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
mutter-cogl-8.vapi:68.2-68.48: note: previous definition of `Framebuffer' was here
	public abstract class Framebuffer : GLib.Object {
	^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Compilation failed: 2 error(s), 0 warning(s)

@tintou
Copy link
Member Author

tintou commented Dec 3, 2020

Indeed, those are now fixed

@decathorpe
Copy link

Thanks. More errors 🎉

../src/DBusAccelerator.vala:64.70-64.78: error: The name `id' does not exist in the context of `Clutter.InputDevice' (mutter-clutter-8)
                    parameters.set ("device-id", new Variant.uint32 (device.id));
                                                                     ^^^^^^^^^
../src/ScreenshotManager.vala:388.13-388.24: error: Assignment: Cannot convert from `float' to `int'
            x = coords.x;
            ^^^^^^^^^^^^
../src/ScreenshotManager.vala:389.13-389.24: error: Assignment: Cannot convert from `float' to `int'
            y = coords.y;
            ^^^^^^^^^^^^
../src/Widgets/PointerLocator.vala:132.34-132.38: error: Argument 1: Cannot pass out argument to non-output parameter
            tracker.get_pointer (out x, out y, null);
                                 ^^^^^
../src/Widgets/PointerLocator.vala:132.13-132.52: error: 1 extra arguments for `void Meta.CursorTracker.get_pointer (Graphene.Point, out Clutter.ModifierType)'
            tracker.get_pointer (out x, out y, null);
            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
../src/Widgets/DwellClickTimer.vala:70.38-70.42: error: Argument 1: Cannot pass out argument to non-output parameter
                tracker.get_pointer (out x, out y, null);
                                     ^^^^^
../src/Widgets/DwellClickTimer.vala:70.17-70.56: error: 1 extra arguments for `void Meta.CursorTracker.get_pointer (Graphene.Point, out Clutter.ModifierType)'
                tracker.get_pointer (out x, out y, null);
                ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

@davidmhewitt
Copy link
Member

@decathorpe What's the easiest way for me to go about setting up a dev environment to manually test changes against this version of mutter? Can I do this just by downloading a rawhide compose?

@decathorpe
Copy link

@davidmhewitt Probably, yes. The nightly images aren't tested regularly though, so no guarantees that it actually boots or works :/

You can get the latest nightly rawhide Workstation ISO from:

https://dl.fedoraproject.org/pub/fedora/linux/development/rawhide/Workstation/x86_64/iso/

@codesardine
Copy link

@davidmhewitt, you could try manjaro unstable as a dev environment, is currently crashing there with mutter 40.

@decathorpe
Copy link

That reminds me, Fedora 34 is going to be released as stable on April 27, it also ships with GNOME 40. The final image can already be downloaded here (RC 1.2 is what's going the be shipped as "stable"): https://dl.fedoraproject.org/pub/alt/stage/34_RC-1.2/Workstation/x86_64/iso/

To support gala on Fedora 34+ until it supports mutter 40, I have again opted to create a compat package for mutter 3.38, which seems to work well so far. This might be an option for other distros as well.

@codesardine
Copy link

I have again opted to create a compat package for mutter 3.38

We already have that, rolling is always more complex, keeping an eye on this one. 👍
https://manjaro.org/branch-compare/?query=mutter

@hotsezus
Copy link

hotsezus commented Jun 20, 2021

It looks like upgrading to 40.* version of mutter should fix layout switch slutter
Posted some info about it here and here

@efectn
Copy link

efectn commented Aug 2, 2021

I've tested. Multitasking thumbnails are buggy after sliding. I haven't seen another bug.

@JoseExposito
Copy link
Member

Thanks for pushing my changes @tintou . I can confirm it builds on Fedora 34. Closing #1181 in favor of this PR.

@tintou tintou enabled auto-merge (squash) August 16, 2021 08:48
Copy link
Contributor

@cassidyjames cassidyjames left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If @JoseExposito and @tintou are happy, I'm happy.

@tintou tintou merged commit 87d51c5 into master Aug 16, 2021
@tintou tintou deleted the tintou/mutter40 branch August 16, 2021 22:23
tintou pushed a commit to elementary/greeter that referenced this pull request Aug 16, 2021
cassidyjames pushed a commit to elementary/greeter that referenced this pull request Aug 16, 2021
@mojahed-yavazi
Copy link

@tintou I've tested. Unmaximize animation not working #1185

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

9 participants