Re: Main.chrome.addActor to the desktop level



Il giorno dom, 08/05/2011 alle 12.22 -0400, Jasper St. Pierre ha
scritto:
> This would be something called the "background actor". Unfortunately,
> it's not a container, nor does it look like you can set it to another
> actor... so you have to patch mutter somehow
> 
> There are a few approaches you could take:
> 
>   1) Add a new API to set the background_actor. You'd just have to
> make sure that no code assumes the background_actor is an instance of
> MetaBackgroundActor. To a limited grep, it looks like window-group.c
> makes this assumption... but that looks easy enough to change.
> 
>      The JS side:
> 
> Meta.set_background_actor_for_screen(global.screen).add_actor(rainmeter);
> 
>   2) Add a new background_group that either sits above or contains the
> background_group, and add new API to use it. You'd modify
> sync_actor_syncing, and add a new method,
> meta_get_background_actor_for_screen.
> 
>      The JS side:
> 
> Meta.get_background_group_for_screen(global.screen).add_actor(this.rainmeter)

This would work - if you don't want to get events. At which point
Main.uiGroup.add_actor(actor)
actor.lower(actor, global.background_actor)
would work as well.

If on the other hand you want events it becomes a lot trickier, because
you need another X11 window, below those owned by the application (the
normal X11 window used by the shell is above everything, covers
everything and uses XShape to let events through).
You could do it by creating a new GdkWindow with the OverrideRedirect
bit, then extracting the XID and passing it to
ClutterX11.set_stage_foreign(). But it would be a different
ClutterStage, so you would not really blend with the rest of the shell
(events wouldn't bubble, for instance), at which point is really better
to use a separate GTK application.

> -
> 
> 2011/5/8 Erick Pérez <erick red gmail com>
>         Hi:
>         
>         I've been trying to add an actor to gnome through a extension
>         but I
>         want that to be in the desktop level, so any window could hide
>         it, and
>         I only look a it, when there's no window over it,
>         
>         How can I do that ?
>         
>         Erick
>         
>         Thxs
>         
>         --
>         El derecho de expresar nuestros pensamientos tiene algún
>         significado
>         tan sólo si somos capaces de tener pensamientos propios.
>         El miedo a la libertad, Erich Fromm
>         _______________________________________________
>         gnome-shell-list mailing list
>         gnome-shell-list gnome org
>         http://mail.gnome.org/mailman/listinfo/gnome-shell-list
> 
> _______________________________________________
> gnome-shell-list mailing list
> gnome-shell-list gnome org
> http://mail.gnome.org/mailman/listinfo/gnome-shell-list


Attachment: signature.asc
Description: This is a digitally signed message part



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