mirror of
https://github.com/brl/mutter.git
synced 2024-11-22 08:00:42 -05:00
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
This commit is contained in:
parent
2b21f1d48c
commit
bf7ae3e4d3
@ -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
|
static void
|
||||||
meta_window_tile (MetaWindow *window)
|
meta_window_tile (MetaWindow *window)
|
||||||
{
|
{
|
||||||
|
@ -120,6 +120,9 @@ void meta_window_foreach_ancestor (MetaWindow *window,
|
|||||||
MetaWindowForeachFunc func,
|
MetaWindowForeachFunc func,
|
||||||
void *user_data);
|
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_is_mapped (MetaWindow *window);
|
||||||
gboolean meta_window_toplevel_is_mapped (MetaWindow *window);
|
gboolean meta_window_toplevel_is_mapped (MetaWindow *window);
|
||||||
gboolean meta_window_get_icon_geometry (MetaWindow *window,
|
gboolean meta_window_get_icon_geometry (MetaWindow *window,
|
||||||
|
Loading…
Reference in New Issue
Block a user