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

Implement PantheonShellX11 protocol #1997

Closed
wants to merge 13 commits into from

Conversation

lenemter
Copy link
Member

@lenemter lenemter commented Jul 25, 2024

Closes #1965

Makes Gtk4 Dock (and other Gtk4 ports in the future) usable in X11 session.

This is achieved using 3 "hacks":

  1. Adds supports-id as an attribute in shell list. If it's true, then window is launched with a unique id by passing it as --id <id here>. Then Gala can identify new windows by checking the window titles.
  2. Implements PantheonShellX11 protocol for positioning windows on X11. It requires an id from the first step. Other than that it's a simplified copy of our Wayland protocol.
  3. Since mutter can't change window_type on X11, Gala does it manually via X.Display.

You can use elementary/dock#260 to test it with the dock.

Unblocks elementary/notifications#157

@danirabbit
Copy link
Member

I think this is a bit beyond my technical knowledge, but afaict everything works as expected and I'd love to not have to ship Plank for X11 ❤️

@leolost2605
Copy link
Member

This would be really cool :)

Since X11 has pretty much no security anyways what if we just allow windows to set the x property _MUTTER_HINTS (or one of our own if preferred) to something like anchor=0:hide_mode=never or centered=1 and then act accordingly e.g. in map.
This would save us the id and dbus stuff while also allowing the same process to have multiple windows that act differently.
Or maybe I've missed something this method wouldn't allow for?

@lenemter
Copy link
Member Author

@leolost2605 I think using x properties is double-edged sword. While, yes, it would save us ids and dbus stuff, but we would have to deal with x properties (which I assume is a bit more complicated than simple dbus interface) and also listen to properties changes in Gala, since user can change dock hide mode.

@leolost2605
Copy link
Member

IMHO it's not that bad at least when using the _MUTTER_HINTS property because there mutter already handles everything for us. I did a quick implementation at #2002 which works with elementary/dock#263. What would you say about that? Or if you really prefer we could also do it this way, although we kinda want to move away from launching our clients in general see https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/3844)

@lenemter lenemter deleted the lenemter/shell-clients-support-x11 branch November 1, 2024 10:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
No open projects
Status: Done
Development

Successfully merging this pull request may close these issues.

Launch Dock on X11
4 participants