Add meta_window_is_on_primary_monitor function
This is useful in a couple of places to avoid opencoding it. https://bugzilla.gnome.org/show_bug.cgi?id=609258
This commit is contained in:
parent
d6f0d2c64c
commit
eeca838778
@ -3213,6 +3213,17 @@ meta_window_is_fullscreen (MetaWindow *window)
|
|||||||
return window->fullscreen;
|
return window->fullscreen;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* meta_window_is_on_primary_monitor:
|
||||||
|
*
|
||||||
|
* Return value: %TRUE if the window is on the primary monitor
|
||||||
|
*/
|
||||||
|
gboolean
|
||||||
|
meta_window_is_on_primary_monitor (MetaWindow *window)
|
||||||
|
{
|
||||||
|
return window->monitor->number == window->screen->primary_monitor_index;
|
||||||
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
meta_window_tile (MetaWindow *window)
|
meta_window_tile (MetaWindow *window)
|
||||||
{
|
{
|
||||||
|
@ -126,6 +126,7 @@ void meta_window_foreach_ancestor (MetaWindow *window,
|
|||||||
|
|
||||||
MetaMaximizeFlags meta_window_get_maximized (MetaWindow *window);
|
MetaMaximizeFlags meta_window_get_maximized (MetaWindow *window);
|
||||||
gboolean meta_window_is_fullscreen (MetaWindow *window);
|
gboolean meta_window_is_fullscreen (MetaWindow *window);
|
||||||
|
gboolean meta_window_is_on_primary_monitor (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);
|
||||||
|
Loading…
Reference in New Issue
Block a user