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

GNOME 3.30 + GNOME 3.32 compatibility patch #1591

Merged
merged 33 commits into from
Apr 23, 2019

Conversation

fossfreedom
Copy link
Contributor

@fossfreedom fossfreedom commented Oct 8, 2018

This PR describes the GNOME 3.30 patch set Ubuntu 18.10 will be using for its release on the 18th Oct and is part of Debian Buster at the moment

Yes - I am aware this is not backwards compatible with 3.28 - so feel free to ignore/cherry-pick/use as a reference point etc etc.

I'll outline the decision points I made to enable budgie-desktop to work against mutter 3.30 and underlying stuff like Vala that has been incorporated in UB and Debian Buster. Hopefully this may be useful.

The TL;DR; I believe this patch set resolves all except one issue described later.

  1. Our starting point is the end-of-august Git Master - an unsigned tarball has been generated via the mkrelease.sh script.
  2. On top of the tarball is Iain Lane's initial mutter 3.30 patch
  3. b5e9fd3 For all the GNOME based gsettings overrides UB uses :Budgie is now appended - this is new in the latest GLib that allows the initial separation of GNOME Shell and Budgie logins i.e. so that Budgie overrides do not impact the gsettings key value when logging into GNOME-Shell. This commit fixes an error in Iain's original offering.
  4. 825353e The vapi generated by Iain's patch had all the API's based on one mutter core header file. This initially caused whole session crashes when ALT+TABbing. This commit resolves that
  5. c7be4c2 Vala 0.42 stable now no longer allows default getter values - this fixes the compilation issues of budgie-desktop
  6. 665076e Like 3 I have manually run through the whole VAPI and repointed the API calls to where their correct C Header files are located.
  7. f422354 - For some reason Mutter 3.30 is more suspect now to workspace switching crashes. I have see many similar automatic reports on UB 17.10 and later - so this rare issue is not new. I nicked this commit from @alunux and I haven't seen any more automatic reports in this area. Proof of the pudding will be the much larger rollout of UB 18.10
  8. 2b996c8 again nicked from @alunux existing PR - just makes sure GVC points to the new upstream source location
  9. b2d7a8b Dropped from GLib is the ability to overlay gsettings values i.e. how the separation used to be performed between the Budgie and GNOME equivalent gsettings keys. As mentioned in 2, GLib now uses the ":Budgie" syntax to provide session separation. This commit ensures Focus and button layout changes in budgie-settings are still respected - using GNOME schema keys - not the original Budgie schema keys.
  10. 897d8e4 In Mutter 3.30 the default workspace scroll animation is now vertical not horizontal. This commit resets this back to the horizontal animation that Budgie has always used.
  11. Noticed a regression with the nm-applet icon changing colour when first connecting to the network on login. Doesn't occur when equiv patch is compiled for gtk 3.28

The one remaining issue I have not been able to resolve is Window border shading being left on the screen when the menu / Alt+Tab / notification popups are hidden. For the interim I have gsettings overridden the WM animations schema key to turn off budgie animations via the budgie-desktop debian package. I suspect UB and Debian end-users will raise issues here if they subsequently turn animations on in budgie-settings ... or have previously fiddled with that setting in the past and have now upgraded. Obviously if/when someone resolves this I will immediately backport this fix to 18.10 UB and Debian Buster.

@JockeTF JockeTF mentioned this pull request Oct 8, 2018
@alunux
Copy link
Contributor

alunux commented Oct 10, 2018

With the current master branch, we also need to port this work e10d621

@danielpinto8zz6
Copy link
Contributor

@fossfreedom about the animations problem in popovers it couldn't be related to the popover code?
The widget not clearing the drawed area or something

@fossfreedom
Copy link
Contributor Author

I don't think so - you see the remnants of the notification window and the alt+tab window.

Which make me think it is due to the bespoke animation code budgie uses.

@danielpinto8zz6
Copy link
Contributor

oh, ok, I'll see wm code, to check if I can find something

@fossfreedom
Copy link
Contributor Author

fossfreedom commented Dec 13, 2018 via email

@danielpinto8zz6
Copy link
Contributor

do you have any place we can talk easier? telegram, hangouts...

@fossfreedom
Copy link
Contributor Author

fossfreedom commented Dec 13, 2018 via email

@JockeTF
Copy link
Contributor

JockeTF commented Dec 16, 2018

Thanks, I'm running on this branch. Works great so far!

@Ste74
Copy link

Ste74 commented Dec 26, 2018

Well,, @fossfreedom i can do a shot into Manjaro?

@fossfreedom
Copy link
Contributor Author

@Ste74 I haven't had time to give this any sort of extensive testing - but @JockeTF comments gives me hope that all is ok !

@Ste74
Copy link

Ste74 commented Dec 26, 2018

@fossfreedom i started the building so i can testing also in our community 😉

@JockeTF
Copy link
Contributor

JockeTF commented Dec 26, 2018

--> @fossfreedom @Ste74

It runs mostly fine, but I have experienced a few more crashes compared to b2d7a8b which I was running before. These aren't annoying unless you get logged out after a few crashes.

For example, Budge Panel crashes when starting Budgie Settings. This may be because of wonky or old settings though. Haven't looked into the reason for that, but at least make sure you test messing about with Budgie Settings, @Ste74!

Same thing goes with dragging and dropping things to Budgie Panel, and switching workspaces when Guake is open and set to hide on lose focus. Again though, I haven't looked into the reasons for this.

@fossfreedom
Copy link
Contributor Author

fossfreedom commented Dec 26, 2018 via email

@JoshStrobl
Copy link
Contributor

Yeah - if you don't want to separate GNOME Shell from Budgie - sure that's fine, can lose the :Budgie suffix. For UB we'll just use an override to keep that separation.

Yea, I'm referring to the override file. I just wanted to know if it was a requirement or not, I didn't see anything about the suffix / vendor bit being required in the GLib changelogs is all, hence the inquiry.

okey dokey. Can just readd the keys. Thoughts on trying to keep both the budgie keys and equivalent gnome keys in sync? Or don't worry about that?

The equivalent keys should be kept in sync. Most of src/daemon/settings.wm does that when we change the respective Budgie keys, like button-layout as an example. I don't have any issues with doing that leg work though.

I'm still fuzzy on how to keep both mutter 3.28 and mutter 3.30/.32 support at the same time.

My biggest issue with the original patch from Iain was it did away with all backwards compatibility for the prior stack (so the proposal was 3.30, with no support for 3.28). This patch satisfies backwards compatibility by supporting both 3.30 and 3.32.

I would've used a mix of Structs since Vala has no form of typedef or type aliases, as well as implementing a class to handle getting the monitor and screen, with #ifdefs for handling the cases where older ABIs had MetaScreen, compositor setting, etc. It would've overall meant less Mutter version-specific ABI code in wm.vala.

@3v1n0
Copy link
Contributor

3v1n0 commented Mar 6, 2019

@fossfreedom can you merge again with my branch, so that you can get the auto-generated vapis?

@fossfreedom
Copy link
Contributor Author

fossfreedom commented Mar 6, 2019 via email

@3v1n0
Copy link
Contributor

3v1n0 commented Mar 6, 2019

@fossfreedom so... I've pushed to my branch a version that generates Vapi for both libmutter-3 and libmutter-4, it works fine and I've added a custom vapi file to avoid source changes or ifdeffs, so this version should continue working generating proper VAPIs depending on the mutter version is used.

This is not supporting libmutter-2 at the moment, but I think you can add that with few lines more in the same way is done for 3 and 4.

So please, give it a look, because right now budgie is completely wrong in using the system cogl and clutter VAPIs which have already diverged from mutter forks, while it's better if it generates the VAPIs at build time using the proper gir files with some customizations if needed, instead of shipping big vapi files.

PS: what is done here should actually be applied to the other VAPIs that are inside budgie, but not something I'll touch for now.

@JoshStrobl
Copy link
Contributor

while it's better if it generates the VAPIs at build time using the proper gir files with some customizations if needed, instead of shipping big vapi files.

I use the VAPIs as a reference point sometimes in development. I'd much rather we ship them than generate at build time.

@3v1n0
Copy link
Contributor

3v1n0 commented Mar 6, 2019

@JoshStrobl

well, a part that if you develop, I guess you're also building and in such case are in the build directory, but if you really want the built vapi can be instead wrote in the source directory, and then when something new is generated or has changed, you can commit it and push straight forward without having to care to stay in sync manually.

So, this method isn't really touching this, in general though I think the vapi generation should automatized by meson, instead of having to deal with those bits at every mutter abi change.

@fossfreedom
Copy link
Contributor Author

fossfreedom commented Mar 7, 2019

All - just a heads up. Keyboard shortcuts like CTRL + ALT + T and all custom keyboard shortcuts are broken with the new (almost) stable mutter/gnome-settings-daemon 3.32

No idea what is going on - will need investigation. Seems to be ok with vanilla GNOME-Shell so I'm guessing something in the budgie shim will need reworking.

EDIT: Saw this in journalctl

Mar 07 15:53:46 dad-VirtualBox gsd-media-keys[4270]: g_variant_get_va: assertion 'value != NULL' failed
Mar 07 15:53:46 dad-VirtualBox gsd-media-keys[4270]: g_variant_unref: assertion 'value != NULL' failed
Mar 07 15:53:46 dad-VirtualBox gsd-media-keys[4270]: Failed to grab accelerators: GDBus.Error:org.freedesktop.DBus.Error.InvalidArgs: Type of message, “(a(suu))”, does not match expected type “(a(su))” (16)

@3v1n0
Copy link
Contributor

3v1n0 commented Mar 8, 2019

The signature for the registration method has changed, so needs to be updated.

@tista500
Copy link

tista500 commented Mar 8, 2019

@fossfreedom,

These changes landed in 3.31.9x cycle:

Mutter: https://gitlab.gnome.org/GNOME/mutter/commit/00ca387ec7f6a864a35e0baee8c69cc71d60641e

Gnome-Shell: https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/156/diffs

And G-S-D might also have similar changes for following the Mutter 3.31.9x change...

Regards.

@fossfreedom
Copy link
Contributor Author

fossfreedom commented Mar 8, 2019 via email

@JockeTF
Copy link
Contributor

JockeTF commented Mar 16, 2019

Runs well for me on GNOME 3.32!

Thanks again!

@@ -285,8 +285,7 @@ public class SettingsManager {
}

this.xoverrides.set_value("overrides", xset);
this.wm_settings.set_string("button-layout", wm_set);
Copy link
Contributor

Choose a reason for hiding this comment

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

Let's preserve the setting of our key as per our earlier conversation in this PR.

budgie_wm_settings = new GLib.Settings("com.solus-project.budgie-wm");
budgie_wm_settings.bind("attach-modal-dialogs", switch_dialogs, "active", SettingsBindFlags.DEFAULT);
Copy link
Contributor

Choose a reason for hiding this comment

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

Should maintain use of budgie_wm_settings instead of using gnome_wm_settings for attach-modal-dialogs and edge-tiling. We can just additionally change the gnome_wm_settings value in our switch_dialogs and switch_settings functions.

budgie_wm_settings.bind("button-style", combo_layouts, "active-id", SettingsBindFlags.DEFAULT);
budgie_wm_settings.bind("center-windows", center_windows, "active", SettingsBindFlags.DEFAULT);
budgie_wm_settings.bind("disable-night-light-on-fullscreen", disable_night_light, "active", SettingsBindFlags.DEFAULT);
budgie_wm_settings.bind("edge-tiling", switch_tiling, "active", SettingsBindFlags.DEFAULT);
Copy link
Contributor

Choose a reason for hiding this comment

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

Should maintain use of budgie_wm_settings instead of using gnome_wm_settings for attach-modal-dialogs and edge-tiling. We can just additionally change the gnome_wm_settings value in our switch_dialogs and switch_settings functions.

@peyloride
Copy link

@fossfreedom Thanks for your hard work! I've successfully compiled and using your branch on brand new Fedora 29.

@JoshStrobl
Copy link
Contributor

There's still changes here I'd like to see addressed. Any chance you could take a look at your patch / branch @fossfreedom?

@fossfreedom
Copy link
Contributor Author

fossfreedom commented Apr 22, 2019 via email

@JoshStrobl
Copy link
Contributor

It's alright, completely understandable that you folks would be busy. Congratulations on the new release! I've just updated the GNOME Stack on Solus locally to GNOME 3.32 and wanting to start landing the patches and validate now that I have the stack to do so. If the patch isn't sorted by tomorrow, it's not a problem, I can land it and fix it post-merge.

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.

10 participants