Re: Setting window properties (always on top, ...) in gnome shell extension

On Thu, 2012-04-26 at 10:53 -0400, Jasper St. Pierre wrote:
> On Thu, Apr 26, 2012 at 6:55 AM, Amy Chan <mathematical coffee gmail com> wrote:
> > Thank you. I looked into libwnck which does all this stuff from python (now
> > there's an example of what I wish clutter
> > had):
> >
> > After a bit of experimenting, it turns out in python I can simply do:
> >
> > import wnck
> > wnck.screen_get_default().get_active_window().make_above()
> >
> > and that's done!
> >
> > So while I wait for the meta_window_set_xxxx stuff to eventually be exposed
> > to the JS interface, I may experiment with somehow calling a python script
> > from within JS to do that bit of functionality (I recall seeing this done in
> > another extension - will have to look it up).
> >
> > Or even better, since wnck seems to use the whole gobject introspection
> > thing, maybe it has JS bindings I can somehow get?
> const Wnck =;
> Wnck.Screen.get_default().get_active_window().make_above();
> I wonder if we should use more wnck. mutter already depends upon it.

I've repeatedly been against using libwnck from GNOME Shell - it just
doesn't make sense to me, inside the window manager process, to use a
library that was written to talk to the window manager by reading X
properties and sending client messages.

Plus, I see no evidence that what we need to do in terms of window
manipulation is going to be present in the current libwnck API, so if
new needs come up, we'd either have to keep on extending libwnck and the
protocols it uses with custom gnome-3-only extensions, or we'd end up
with an even worse mish-mash of different methods.

However, I see nothing wrong with doing using it from an extension if
there's no way of doing things more directly :-)

- Owen

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