Commit d4c28fc5 authored by Owen W. Taylor's avatar Owen W. Taylor
Browse files

Add meta_window_get_maximized() and meta_window_is_fullscreen()

These functions duplicate existing properties; they are added for
convenience and to avoid the GObject property code on some
performance critical painting paths.

https://bugzilla.gnome.org/show_bug.cgi?id=592382
parent ca5f2ac3
......@@ -3158,6 +3158,32 @@ meta_window_maximize (MetaWindow *window,
}
}
/**
* meta_window_get_maximized:
*
* Gets the current maximization state of the window, as combination
* of the %META_MAXIMIZE_HORIZONTAL and %META_MAXIMIZE_VERTICAL flags;
*
* Return value: current maximization state
*/
MetaMaximizeFlags
meta_window_get_maximized (MetaWindow *window)
{
return ((window->maximized_horizontally ? META_MAXIMIZE_HORIZONTAL : 0) |
(window->maximized_vertically ? META_MAXIMIZE_VERTICAL : 0));
}
/**
* meta_window_is_fullscreen:
*
* Return value: %TRUE if the window is currently fullscreen
*/
gboolean
meta_window_is_fullscreen (MetaWindow *window)
{
return window->fullscreen;
}
static void
meta_window_tile (MetaWindow *window)
{
......
......@@ -120,6 +120,9 @@ void meta_window_foreach_ancestor (MetaWindow *window,
MetaWindowForeachFunc func,
void *user_data);
MetaMaximizeFlags meta_window_get_maximized (MetaWindow *window);
gboolean meta_window_is_fullscreen (MetaWindow *window);
gboolean meta_window_is_mapped (MetaWindow *window);
gboolean meta_window_toplevel_is_mapped (MetaWindow *window);
gboolean meta_window_get_icon_geometry (MetaWindow *window,
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment