Re: Connect to window resize / move signal



Why don't you have the MetaWindowActor? When establishing a signal like:

  actor.metaWindow.connect('size-changed', ...);

Do:

  actor.metaWindow.connect('size-changed', Lang.bind(this,
this.windowSizeChanged, actor));

and now you have the actor parameter closed over the signal handler.

On Sun, Jun 19, 2011 at 1:50 AM, Tim Cuthbertson <tim gfxmonk net> wrote:
> In Meta.gir I can see that WindowActor has some useful signals to tell
> when a user has resized or moved a window (namely size-changed and
> position-changed). I would like to connect these signals, but I can't
> find a way to access the window's actor. MetaWindow.actor (the obvious
> guess) doesn't exist, and I can't find any methods in Meta.gir that
> return a WindowActor.
>
> Am I looking in the wrong direction? Is there another signal I should
> be connecting to that will tell me when a window has been moved or
> resized by the user? If not, how do I get to a MetaWindow's
> WindowActor?
>
> Thanks,
>  - Tim.
> _______________________________________________
> gnome-shell-list mailing list
> gnome-shell-list gnome org
> http://mail.gnome.org/mailman/listinfo/gnome-shell-list
>


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