pop-os/desktop-widget

"Multi-monitor behavior" likely infeasible

ids1024 opened this issue · 3 comments

There's an upstream issue about this. This blog post about Gnome 40 specifically mentions that the behavior here is unchanged.

As far as I can tell there is currently no way to provide the "Displays have separate workspaces" mode (extension, gsettings, etc.). And since workspaces are part of Mutter, it probably cannot be done just with shell extensions. Modifying Mutter to support it is likely complicated, and too much trouble at least if upstream is not interested in the same behavior.

So it would be nice to support, but we may have to remove the setting unless someone has an idea about how this could work.

In mutter a MetaWorkspace is associated with a particular MetaScreen, but as given the existence of a meta_screen_get_n_monitors function, this probably isn't quite what it sounds like. Presumably this is like GdkScreen:

GdkScreen objects are the GDK representation of the screen on which windows can be displayed and on which the pointer moves. X originally identified screens with physical screens, but nowadays it is more common to have a single GdkScreen which combines several physical monitors

Mutter does support "Workspaces only on primary monitor" (which is the default behavior), which can be enabled through gsettings or Gnome Tweaks. Though this isn't what we want.

It seems Mutter implements this by having considering the window to be on all workspaces, hence functions like meta_window_is_on_all_workspaces(). So having a separate set of workspace per-monitor is both not exposed by Mutter and fairly different from how Mutter handles things internally.

It's hard to know exactly how hard this would be to implement without being an expert in Mutter and Gnome Shell internals, but the APIs Mutter provides for workspaces may just not be compatible with this way of handling workspaces, and all the code involving workspaces in Mutter or Gnome Shell will assume the current design.

Thanks for looking into this. I’m comfortable with changing the setting to expose the option for workspaces on primary or workspaces spanned across displays for this release.

Given the option to prioritize this potentially rabbit hole feature or enabling horizontal workspaces, we’ll be adding more value in offering horizontal as an option.

@maria-komarova fyi