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

Use Meta.WaylandClient for shell components #1761

Closed
wants to merge 5 commits into from

Conversation

leolost2605
Copy link
Member

@leolost2605 leolost2605 commented Sep 25, 2023

Tries to fix stuff like #1693 and #1694 by using Meta.WaylandClient to launch the respective apps as trusted subprocesses and by managing their position etc. from within gala as suggested by @davidmhewitt.
As a proof of concept this PR currently positions the new dock in the top left corner (I didn't bother getting the maths right for the correct position with the possibility we might not even use this :)) of the primary monitor, keeps it above all other windows and hides it from the window list.
It's based on the wayland-testing branch because for some reason master still crashes for me but can be easily rebased.
@tintou @Marukesu is this worth pursuing?

The code is probably not very good, it's the first time I do something window manager related and this is just the result of me playing around with wayland :) Still it works and shouldn't require too much additional effort to get it ready 🤞

var subprocess_launcher = new GLib.SubprocessLauncher (NONE);
try {
dock_client = new Meta.WaylandClient (subprocess_launcher);
string[] args = {"io.elementary.dock"};
Copy link
Member Author

Choose a reason for hiding this comment

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

For a more useful way to test this replace dock with wingpanel and remove the TryExec for io.elementary.wingpanel from the wayland session settings and it works really fine apart from maximized windows disappearing behind the panel :)

@tintou
Copy link
Member

tintou commented Sep 25, 2023

Hi there, you should take a look at #1705

@leolost2605
Copy link
Member Author

leolost2605 commented Sep 25, 2023

Hi, yes I've seen that and even tried to do some direct xdg shell wayland access from a client side to see how easy/hard using custom wayland protocols is but at some point (I think when I just couldn't figure out how to use the headers generated for wayland protocols from within vala without manually writing vapi, although I can imagine I probably did something very wrong🙂) just gave up and found this to be at least IMHO a simpler solution that (as @davidmhewitt pointed out) doesn't require new API and any (?) client side effort 🤷

@leolost2605
Copy link
Member Author

Also with this it's easier for new people, like me, to contribute without having to dig deep down into how wayland works :)

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

Successfully merging this pull request may close these issues.

3 participants