GNOME Bugzilla – Bug 640552
Add ability to override workspace layout
Last modified: 2011-02-01 16:40:13 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.
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 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.
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