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

feat: implement initial wayland support in panel, panel manager, popovers, and Raven #588

Merged
merged 19 commits into from
Jul 3, 2024

Conversation

JoshStrobl
Copy link
Member

@JoshStrobl JoshStrobl commented Jun 15, 2024

Summary

This pull request aims to accomplish the following:

  1. Bulk of initial support for Wayland for the Panel, Panel Manager, Popovers, and Raven.
  2. Fix annoyances e.g. fullscreen Raven
  3. Add workarounds to no-op budgie-wm and IBus management when under Wayland.

Seriously important:

Once this is merged, popovers will stop working under the X11 environment. Quite likely, more stuff will be broke as well. This is intentional, the main branch will be for iterating on Wayland support. If you read this and you aren't a Budgie developer, switch to non-git builds if you're on them. We are not yet providing instructions for running Budgie under Wayland, as it is not ready for broader consumption. You will not receive any support running via git until such time, I promise.

How

The panel, panel manager, and popover management now leverage GtkLayerShell to define anchoring, exclusion zones, and keyboard mode.

Budgie.Popover has been completely dropkicked in favor of Gtk.Popover, as we no longer are limited by the literal window constraints that were imposed in X11 and do not have the seat issues that are present under X11 either.

To workaround issues related to the panel no longer being interactive after moving it via Budgie Desktop Settings, we now have a masked panel recreation (in that we will now hide the panel, update the existing one's placement to ensure struts are updated for everything else, ensure position is saved, nuke and create a new one and show that one).

Some cleanup has happened across relevant parts of the codebase, however PanelManager and Panel itself will need some down the line (probably) even just for the sake of getting rid of gdk warnings related to trying to use APIs that are non-functional on Wayland (mainly related to monitor and positioning).

Other hacks:

  • Raven animations because it looked bad. Still weird expansion on show but more usable.
  • budgie-wm just doesn't do anything on Wayland, we exit it with status 0. Otherwise 🔥.

Known Issues

Oh boy, where do I get started?

  1. While dock mode works, autohide does not. This should be expected because we have no idea where windows are. This is something the compositor will need to do!
  2. Transparency mode untested due to missing protocols in kwin used by libxfce4windowing, same deal as ITL.
  3. Keyboard shortcuts do not work. No surprise, no working wm to trigger them.
  4. Under kwin, ITL does not update. Expected because lack of protocol support.
  5. There is no longer a GtkBox under Popover, therefore no .container. We may want to add that stuff back or alternative reach out to any remaining Gtk theme developers to fix theirs.

@JoshStrobl JoshStrobl added the wayland Tasks related to port to Wayland label Jun 15, 2024
@JoshStrobl JoshStrobl added this to the 10.10 milestone Jun 15, 2024
@JoshStrobl JoshStrobl self-assigned this Jun 15, 2024
@JoshStrobl JoshStrobl linked an issue Jun 15, 2024 that may be closed by this pull request
@Conan-Kudo
Copy link

Under kwin, ITL does not update. Expected because lack of protocol support.

What protocol is missing for the icon task list to work?

@JoshStrobl
Copy link
Member Author

Under kwin, ITL does not update. Expected because lack of protocol support.

What protocol is missing for the icon task list to work?

libxfce4windowing requires wlr foreign toplevel management protocol and ext-workspace-v1.

Copy link
Member

@EbonJaeger EbonJaeger left a comment

Choose a reason for hiding this comment

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

LGTM! Much delete, very wow. Seriously, this all looks good, and I've seen it working live on camera, so hey.

@JoshStrobl JoshStrobl changed the title feat: implement wayland support in panel manager, various usability improvements feat: implement initial wayland support in panel, panel manager, popovers, and Raven Jun 15, 2024
@serebit
Copy link
Member

serebit commented Jun 15, 2024

Will for sure be reviewing this, but we should release 10.10 before merging so users on the release version can get the fixes and improvements that we've put in.

Copy link
Member

@serebit serebit left a comment

Choose a reason for hiding this comment

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

Initial pass, mostly formatting.

Taskfile.yml Outdated Show resolved Hide resolved
src/panel/applets/status/PowerIndicator.vala Outdated Show resolved Hide resolved
src/panel/applets/status/StatusApplet.vala Outdated Show resolved Hide resolved
src/plugin/panel/meson.build Show resolved Hide resolved
@JoshStrobl
Copy link
Member Author

Will for sure be reviewing this, but we should release 10.10 before merging so users on the release version can get the fixes and improvements that we've put in.

Budgie 10.10 is the Wayland release. This has been agreed on in the stand-ups. If we need to cherrypick anything to 10.9.x that can be done via its branch.

@serebit
Copy link
Member

serebit commented Jun 15, 2024

Budgie 10.10 is the Wayland release. This has been agreed on in the stand-ups. If we need to cherrypick anything to 10.9.x that can be done via its branch.

Fair enough.

@JoshStrobl JoshStrobl requested a review from serebit June 16, 2024 08:45
src/theme/meson.build Outdated Show resolved Hide resolved
@JoshStrobl
Copy link
Member Author

Upcoming rebase will be to align with a9a9c21 bump to 10.9.2

@JoshStrobl JoshStrobl force-pushed the 473-implement-wayland-support-in-panel-manager branch from d9e2bde to f48a318 Compare June 21, 2024 23:38
@fossfreedom
Copy link
Contributor

I would recommend we should think about bumping the public gir budgie version - we have always had a pretty stable ABI/API for plugins et al - budgie-1.0. For wayland though many plugins will simply not work because they have X11 dependencies such as wnck and gdk-x11. As the upstream we should be upfront and not just release a new version of budgie that we know 'legacy' plugins will break against because they appear to compile against still.

Lets give an example, I note that third-party plugins that set the popover size no longer run due to "set_default_size" missing as a method on popovers due to the popover refactoring in this PR. For python plugins, the plugin crashes at runtime - its not obviously detectable that the popover methods have changed.

Distros need to understand that any external plugins they manage need to be relooked at at with budgie-10.10 - bumping the generated gir version number from 1.0 to 2.0 will force this evaluation to see if they work in wayland.

@JoshStrobl
Copy link
Member Author

JoshStrobl commented Jul 1, 2024

@fossfreedom addressed with budgie-2.0 bump per the standup, alongside fixing transparent popovers (was due to old reset_style call) and generation of the Night Light applet UI (wrong parent class).

@JoshStrobl JoshStrobl force-pushed the 473-implement-wayland-support-in-panel-manager branch from 448d6f2 to 3df110c Compare July 1, 2024 19:08
@fossfreedom
Copy link
Contributor

Confirmed the budgie bump to v2.0 has had the desired effect of preventing v1.0 applets from being installed.

I note the gir for raven widgets is 1.0 - doubtful this will have any adverse impacts.

I've merged in these latest changes into my branch and all is well. Lets crack on with this merge - initial wayland support achieved!

Copy link

@Conan-Kudo Conan-Kudo left a comment

Choose a reason for hiding this comment

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

Let's do it!

@JoshStrobl JoshStrobl merged commit f837a90 into main Jul 3, 2024
1 check passed
@JoshStrobl JoshStrobl deleted the 473-implement-wayland-support-in-panel-manager branch July 3, 2024 12:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
wayland Tasks related to port to Wayland
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

Implement Wayland support in Panel Manager
5 participants