Expose meta_window_get_icon_geometry()

Make meta_window_get_icon_geometry() public, so that it can be used
to from plugins to animate windows minimizing to the correct
position.

Based on a patch from Cosimo Cecchi <cosimoc@gnome.org>

http://bugzilla.gnome.org/show_bug.cgi?id=571109
This commit is contained in:
Owen W. Taylor 2009-03-31 17:29:48 -04:00
parent 4253ff8e12
commit 8ab9ed5d4e
3 changed files with 18 additions and 3 deletions

View File

@ -600,9 +600,6 @@ void meta_window_update_keyboard_move (MetaWindow *window);
void meta_window_update_layer (MetaWindow *window);
gboolean meta_window_get_icon_geometry (MetaWindow *window,
MetaRectangle *rect);
void meta_window_recalc_features (MetaWindow *window);
void meta_window_recalc_window_type (MetaWindow *window);

View File

@ -5910,6 +5910,22 @@ send_configure_notify (MetaWindow *window)
meta_error_trap_pop (window->display, FALSE);
}
/* FIXME: @rect should be marked (out), but gjs doesn't currently support
* this. See also http://bugzilla.gnome.org/show_bug.cgi?id=573314
*/
/**
* meta_window_get_icon_geometry:
* @window: a #MetaWindow
* @rect: rectangle into which to store the returned geometry.
*
* Gets the location of the icon corresponding to the window. The location
* will be provided set by the task bar or other user interface element
* displaying the icon, and is relative to the root window. This currently
* retrieves the icon geometry from the X server as a round trip on every
* call.
*
* Return value: %TRUE if the icon geometry was succesfully retrieved.
*/
gboolean
meta_window_get_icon_geometry (MetaWindow *window,
MetaRectangle *rect)

View File

@ -99,5 +99,7 @@ void meta_window_configure_notify (MetaWindow *window, XConfigureEvent *event);
const char *meta_window_get_role (MetaWindow *window);
MetaStackLayer meta_window_get_layer (MetaWindow *window);
MetaWindow* meta_window_find_root_ancestor (MetaWindow *window);
gboolean meta_window_get_icon_geometry (MetaWindow *window,
MetaRectangle *rect);
#endif