Hi Jasper,

Yes, I kind of do. The parent actor is GenericContainer, and its
position is fixed. Its children are placed inside the parent at some
positions. I just searched through my installed extensions and found out
that, for example, Dash to Dock uses similar concept to position the
dash: there is St.Bin with a child positioned vertically at center, and
St.Bin is added using addChrome with affectsInputRegion = false, while
for its child trackChrome with affectInputRegion = true is called.

Probably, it is the right decision to simplify the whole thing about
input regions. May be if, for example, trackChrome could add a region
that is a descendant of Main.uiGroup but has no tracked ancestors, that
would solve the problem.

As I can see right now when trackChrome(B) is called, it looks for B's
ancestor A that is already being tracked. Then the only thing I see how
A is used is to copy A's params to B -- those that are not specified for
B directly. Is there another thing I am missing why trackChrome would
require such ancestor?

Vadim.


On 07/10/2013 02:08 PM, Jasper St. Pierre wrote:
> Do you really need the parent-child relationship?
>
>
> On Tue, Jul 9, 2013 at 4:45 PM, Vadim <va...@dbfin.com
> <mailto:va...@dbfin.com>> wrote:
>
>     Hi everyone,
>
>     I have a question about GS 3.9. One of the commits removes the
>     affectsInputRegion parameter. I know there were some special
>     reasons for
>     that, and a lot of underlying C code has changed.
>
>     Now, suppose I have an actor A that takes some space but I want it
>     to be
>     transparent for all events such as mouse clicks etc. Actor A may have
>     some children -- actors B, C, ... -- which are not transparent, and I
>     want them to receive mouse clicks etc. Before 3.9 I would do
>     something like:
>     addChrome(A, { affectsInputRegion: false });
>     trackChrome(B, { affectsInputRegion: true });
>     trackChrome(C, { affectsInputRegion: true });
>     ...
>
>     Now, if I add A using Main.uiGroup.add_child(A) instead, then
>     trackChrome will complain that none of B's (or C's etc.) ancestors
>     were
>     added using addChrome.
>
>     What is the recommended way of doing this in GS 3.9? Thank you.
>
>     Vadim.
>     _______________________________________________
>     gnome-shell-list mailing list
>     gnome-shell-list@gnome.org <mailto:gnome-shell-list@gnome.org>
>     https://mail.gnome.org/mailman/listinfo/gnome-shell-list
>
>
>
>
> -- 
>   Jasper

_______________________________________________
gnome-shell-list mailing list
gnome-shell-list@gnome.org
https://mail.gnome.org/mailman/listinfo/gnome-shell-list

Reply via email to