API wrote: > I would like to know if there are a way to get the absolute screen position > of an actor. > > I will explain a little the context and my first attempts: > > On Gtk, you can do that with a code similar to: > window = gtk_widget_get_parent_window (widget); /* if the widget has a > parent */ > gdk_window_get_origin (window, &x_window, &y_window); > > But on clutter you have the next: > clutter_actor_get_geometry(actor, &geometry) > > But this returns the position relative to the stage (AFAIK, please correct me > if I'm wrong), so it starts to count from (0,0), not from the top level window > position. > > This problem can be workarounded if you are using the clutter stage inside a > GtkClutterEmbed, so you can use clutter_actor_get_geometry to get the relative > position, and use the gdk_window_get_origin, as I said previously, with the > GtkClutterEmbed to get the absolute position of the toplevel. I was able to > do > that, and seems to work.
With the X backend you can always just query the geometry of the stage window (which is available via clutter_x11_get_stage_window()). Tomas -- To unsubscribe send a mail to [EMAIL PROTECTED]
