mirror of
https://github.com/brl/mutter.git
synced 2024-12-24 12:02:04 +00:00
window: Export a bunch of state flags as accessor methods
This is necessary to reimplement window menus in gnome-shell. https://bugzilla.gnome.org/show_bug.cgi?id=726352
This commit is contained in:
parent
24e12053ea
commit
4f9872c037
@ -607,9 +607,6 @@ void meta_window_show_menu (MetaWindow *window,
|
|||||||
int button,
|
int button,
|
||||||
guint32 timestamp);
|
guint32 timestamp);
|
||||||
|
|
||||||
gboolean meta_window_titlebar_is_onscreen (MetaWindow *window);
|
|
||||||
void meta_window_shove_titlebar_onscreen (MetaWindow *window);
|
|
||||||
|
|
||||||
void meta_window_set_gravity (MetaWindow *window,
|
void meta_window_set_gravity (MetaWindow *window,
|
||||||
int gravity);
|
int gravity);
|
||||||
|
|
||||||
|
@ -11403,12 +11403,6 @@ meta_window_compute_tile_match (MetaWindow *window)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
gboolean
|
|
||||||
meta_window_can_close (MetaWindow *window)
|
|
||||||
{
|
|
||||||
return window->has_close_func;
|
|
||||||
}
|
|
||||||
|
|
||||||
Window
|
Window
|
||||||
meta_window_get_toplevel_xwindow (MetaWindow *window)
|
meta_window_get_toplevel_xwindow (MetaWindow *window)
|
||||||
{
|
{
|
||||||
@ -11424,3 +11418,51 @@ meta_window_set_opacity (MetaWindow *window,
|
|||||||
if (window->display->compositor)
|
if (window->display->compositor)
|
||||||
meta_compositor_window_opacity_changed (window->display->compositor, window);
|
meta_compositor_window_opacity_changed (window->display->compositor, window);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
gboolean
|
||||||
|
meta_window_can_maximize (MetaWindow *window)
|
||||||
|
{
|
||||||
|
return window->has_maximize_func;
|
||||||
|
}
|
||||||
|
|
||||||
|
gboolean
|
||||||
|
meta_window_can_minimize (MetaWindow *window)
|
||||||
|
{
|
||||||
|
return window->has_minimize_func;
|
||||||
|
}
|
||||||
|
|
||||||
|
gboolean
|
||||||
|
meta_window_can_shade (MetaWindow *window)
|
||||||
|
{
|
||||||
|
return window->has_shade_func;
|
||||||
|
}
|
||||||
|
|
||||||
|
gboolean
|
||||||
|
meta_window_can_close (MetaWindow *window)
|
||||||
|
{
|
||||||
|
return window->has_close_func;
|
||||||
|
}
|
||||||
|
|
||||||
|
gboolean
|
||||||
|
meta_window_is_always_on_all_workspaces (MetaWindow *window)
|
||||||
|
{
|
||||||
|
return window->always_sticky;
|
||||||
|
}
|
||||||
|
|
||||||
|
gboolean
|
||||||
|
meta_window_is_above (MetaWindow *window)
|
||||||
|
{
|
||||||
|
return window->wm_state_above;
|
||||||
|
}
|
||||||
|
|
||||||
|
gboolean
|
||||||
|
meta_window_allows_move (MetaWindow *window)
|
||||||
|
{
|
||||||
|
return META_WINDOW_ALLOWS_MOVE (window);
|
||||||
|
}
|
||||||
|
|
||||||
|
gboolean
|
||||||
|
meta_window_allows_resize (MetaWindow *window)
|
||||||
|
{
|
||||||
|
return META_WINDOW_ALLOWS_RESIZE (window);
|
||||||
|
}
|
||||||
|
@ -244,6 +244,16 @@ void meta_window_begin_grab_op (MetaWindow *window,
|
|||||||
gboolean frame_action,
|
gboolean frame_action,
|
||||||
guint32 timestamp);
|
guint32 timestamp);
|
||||||
|
|
||||||
|
gboolean meta_window_can_maximize (MetaWindow *window);
|
||||||
|
gboolean meta_window_can_minimize (MetaWindow *window);
|
||||||
|
gboolean meta_window_can_shade (MetaWindow *window);
|
||||||
gboolean meta_window_can_close (MetaWindow *window);
|
gboolean meta_window_can_close (MetaWindow *window);
|
||||||
|
gboolean meta_window_is_always_on_all_workspaces (MetaWindow *window);
|
||||||
|
gboolean meta_window_is_above (MetaWindow *window);
|
||||||
|
gboolean meta_window_allows_move (MetaWindow *window);
|
||||||
|
gboolean meta_window_allows_resize (MetaWindow *window);
|
||||||
|
|
||||||
|
gboolean meta_window_titlebar_is_onscreen (MetaWindow *window);
|
||||||
|
void meta_window_shove_titlebar_onscreen (MetaWindow *window);
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
Loading…
Reference in New Issue
Block a user