Re: Layering in Clutter



Hi Dave,

The first version produces null because you probably used it in the constructor, when the actor has not yet been added to the stage. If you use it inside one of the other functions, you'll see that this.actor.get_stage() will no longer be null.

In the second version, you should use global.stage instead of global.get_stage().

Let's move the discussion of this patch to bugzilla. Can you create a new bug against gnome-shell product and attach the next version of your patch with any comments/question you have here: http://bugzilla.gnome.org/enter_bug.cgi Feel free to hop on on IRC with any quick questions as well.

Thanks!
Marina

----- Original Message -----
From: "Timbob steve" <timbobsteve gmail com>
To: "Colin Walters" <walters verbum org
Cc: gnome-shell-list gnome org
Sent: Tuesday, February 10, 2009 11:26:37 AM GMT -05:00 US/Canada Eastern
Subject: Re: Layering in Clutter


Hi Colin, 

Thanks for the heads-up. Unfortunately adding the following code (when adding the thumbnailPreview actor) doesn't work: 


let stage = this.actor.get_stage(); 
stage.add_actor(box); 

This seems to fail with the error: 

ERROR: stage = null 

It appears that actor.get_stage() doesn't return the desired stage reference. I did try it with the bellow code in its place, but this also fails with a null reference to stage: 


let global = Shell.Global.get(); 
let stage = global.get_stage(); 
stage.add_actor(box); 

Cheers, 
Dave. 


2009/2/10 Colin Walters < walters verbum org > 


2009/2/10 Timbob steve < timbobsteve gmail com >: 

> Hi All, 
> 
> I am working on a thumbnailing patch for docDisplayItem, 

Cool! 


> Another thought was to make the preview-thumbnail a top-level actor, but I 
> can't find any way to retrieve the global Clutter.Group() (not even sure if 
> there is one). 

The simplest way to attack this I think is just to make the popup a 
child of the stage (call .get_stage() on any of the actors, or 
global.stage). Because the stage is a Group, and groups paint their 
children in the order they're added, you'll get the ordering you want. 

In one of my projects I have an explicit PopupManager class, but it's 
sort of tied into the app architecture. We could definitely create a 
similar manager type object if we run into this situation more though. 


> NB: There is also an issue that is more pronounced with the thumbnailing 
> code, where mouse-over events aren't actually triggered upon the mouse 
> entering an actors space. 

Hmm, as I understand it there is an issue with leave events not being 
synthesized for the mouse leaving the stage entirely (this is why the 
Activities button doesn't de-highlight when moving the mouse down 
instead of right); but your description sounds different. 


_______________________________________________
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]