Re: Sync workspaces



On Tue, 2009-08-11 at 20:31 +0000, Colin Walters wrote: 
> On Tue, Aug 11, 2009 at 8:22 PM, Mads Villadsen<maxx krakoa dk> wrote:
> > Attached is a small patch that uses libwnck to make sure the workspace
> > layout
> 
> I'm not too familiar with the concept of workspace layout, so I'll let
> someone else respond to that.  But:

Just to clarify what I am hoping to achieve: When adding workspaces in
gnome-shell the number of rows in the workspace list grows to accomodate
the new workspaces. However when using <Ctrl><Alt>-arrowkeys to change
workspace the layout is always in one single row.

So I wanted to make sure changes made in the gnome-shell workspace view
got reflected in the internal workspace switcher as well.

> > is synced with the window manager.
> 
> We *are* the window manager.  Using libwnck inside the mutter process
> is not a good idea, we end up talking to ourselves over the X server.

I hadn't thought about it that way - but you are of course right.

> > Any hints on how to make it cleaner will be greatly appreciated.
> 
> You should call directly into MetaDisplay, MetaScreen functions to
> accomplish what you want.

However as far as I can tell there isn't really a way to set the layout
from either MetaDisplay or MetaScreen - and it even appears to be by
design.

See
http://standards.freedesktop.org/wm-spec/latest/ar01s03.html#id2568337

It is stated that the layout is set by the pager, and not the window
manager, and since metacity has until now gone hand in hand with libwnck
it makes sense that metacity can't set this property itself.

I don't think there is any inherent problem in having the pager be an
in-process part of the window manager, but I think it makes sense to
reuse libwnck as it probably handles a lot of corner cases.

Another option would of course be to somehow catch an event caused by
pressing <Ctrl><Alt>-arrowkeys, and then do all the drawing with clutter
- it would have the added advantage of looking nicer. 

Regards.
-- 
Mads Villadsen <maxx krakoa dk>



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]