Is Gtk sticky window (gtk_window_stick) supported in GNOME?

Hello,

Recently I discover Xpad project, a sticky notes, that able to run on GNOME desktop. It is wonderful and has option to “Show notes on all workspaces”. Internally, it uses gtk_window_stick(). But it doesn’t work on GNOME Shell wayland mode.

Is gtk_window_stick() actually supported by GNOME Shell or Mutter in wayland mode? Any advice to make it works (either editing Xpad code to add some flag or something)?


Links

Window stack management API is not available to clients in Wayland: only the compositor knows the stacking order.

Is there anyway to request these? Or is there a plan to accommodate similar client requirement?

It’s definitely against the Wayland model: applications are not privileged components, and don’t have a view on the overall state of the system.

In theory, it would be possible to add a separate Wayland extension protocol for some windowing system operations, like asking to be “sticky”; but you’d have to not only design the protocol, you’d also need to provide an implementation for toolkits and compositors, and of course that means that not all compositors would support it. Additionally, GTK4 has removed most of the window stacking API, as it’s only really supported on X11.

1 Like

After researching some Wayland issues, this MR (#18) is the closest to be expected on this case.

That’s a session management interface, and has nothing to do with the window stacking order.

Yes, actually, that is one way to save and restore stacking order preference. The other way is to propose new kind of window, a sticky note window :sweat_smile: or similar, which has no MR and very specific use case. That first is the closest I expect.

Unfortunately, an app that setting any direct hint (check/uncheck Always on every workspace) is against wayland model similar to what you outlined. Thanks for the insight.

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.