On Mon, 2009-03-09 at 16:38 +0800, Liu, Raymond wrote: > Hi > Is there anyway to get absolute x,y coordinate of an actor in clutter? > > clutter_actor_get_position can get relative x,y to an actor's parent > container, I can try to add the x,y offset up to the stage. But : > > 1: the container itself might have some border or decorator, which I > have no way to count in their width and height. > 2: Seems I got no way to get the stage's absolute x,y relative to > desktop root_window? > > So, anyone have ideas about this? > > BTW. my purpose to get absolute x,y is to put a window at say the > current cursor's location.
clutter_actor_get_transformed_position () is what you are looking for. It will give you the absolute position of the actor relative to the clutter stage, and if your clutter stage at 0,0 in your screen, then it will be the absolute position in the screen! Btw, please don't start new threads on a mailing list by replying on an older post and editing all the content. This breaks the threads. You should actually click on the mailing list email to start a new email. Pierre-Luc
signature.asc
Description: This is a digitally signed message part
