Re: Writing an extension



On Mon, 2010-12-20 at 09:16 +0100, Alessandro Crismani wrote:
> >         display.connect('window-created',FindAndMove);
> >         
> >         I would like to ask if it is possible to perform an action
> >         ONLY on the
> >         new window that is opened, something like (this is a
> >         theoretical guess,
> >         hope you get the point):
> >         
> >         display.connect('window-created',FindAndMove(opened_window));
> >         
> > That's strange, I thought I solved this. Maybe it was after I sent the
> > e-mail. Basically I create an array with the windows id and set a
> > boolean to true if they've already been managed. I'll send the source
> > asap, i.e tomorrow morning.
> 
> The last version checked all the apps, I never thought of using a
> boolean already_set to check whether the window was already processed
> because I think that having a way to identify the new opened window
> would be better. However I am no good with JS and Gnome Shell sources,
> hence I couldn't find a way to do that yet.

Uhm - the created window is actually a parameter of the signal handler:

FindAndMove: function(display, window) {
  // do stuff
},

No need to jump though hoops really ...


Florian



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