After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 640552 - Add ability to override workspace layout
Add ability to override workspace layout
Status: RESOLVED FIXED
Product: mutter
Classification: Core
Component: general
unspecified
Other All
: Normal normal
: ---
Assigned To: Dan Winship
mutter-maint
Depends on:
Blocks:
 
 
Reported: 2011-01-25 17:07 UTC by Owen Taylor
Modified: 2011-02-01 16:40 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Add ability to override workspace layout (4.28 KB, patch)
2011-01-25 17:07 UTC, Owen Taylor
committed Details | Review

Description Owen Taylor 2011-01-25 17:07:41 UTC
I wrote this to be able to switch the workspace layout in GNOME Shell to a column
rather than a grid.

An alternative would be to let a plugin *completely* specify the workspace layout
in any order - we needed that in the past to do the old grid layout, but we
don't need that now and this is a lot simpler.

I didnt' add a way to unoverride since there isn't an obvious need, at least
for GNOME Shell.
Comment 1 Owen Taylor 2011-01-25 17:07:43 UTC
Created attachment 179299 [details] [review]
Add ability to override workspace layout

A plugin that does workspace management on its on may want to set the
workspace layout without having to deal with putting a property
on the root window to be read back and parsed.

Add meta_screen_override_window_layout() that allows the same types
of layouts as _NET_DESKTOP_LAYOUT but without setting a property.
Comment 2 Dan Winship 2011-01-26 22:16:03 UTC
Comment on attachment 179299 [details] [review]
Add ability to override workspace layout

>+  if (screen->workspace_layout_overridden)
>+    return;

In theory, we should also remove _NET_DESKTOP_LAYOUT from _NET_SUPPORTED in this case, but that's up to you. Everything else looks good.
Comment 3 Owen Taylor 2011-02-01 16:40:10 UTC
Updating _NET_SUPPORTED was a big pain (it's set by an #define / #include "atomnames.h" type hack),
so I just added a comment:

/* In theory we should remove _NET_DESKTOP_LAYOUT from _NET_SUPPORTED at this
 * point, but it's unlikely that anybody checks that, and it's unlikely that
 * anybody who checks that handles changes, so we'd probably just create
 * a race condition. And it's hard to implement with the code in set_supported_hint()
 */

Attachment 179299 [details] pushed as 8b22007 - Add ability to override workspace layout