Added meta_window_is_modal()

Queries whether the window is in a modal state, as per the _NET_WM_STATE
protocol.
This commit is contained in:
Tomas Frydrych 2009-08-06 18:11:11 +01:00
parent 2c8df7d12e
commit f3e6913d57
2 changed files with 17 additions and 0 deletions

View File

@ -8793,3 +8793,19 @@ meta_window_get_client_machine (MetaWindow *window)
return window->wm_client_machine; return window->wm_client_machine;
} }
/**
* meta_window_is_modal:
* @window: a #MetaWindow
*
* Queries whether the window is in a modal state as described by the
* _NET_WM_STATE protocol.
*
* Return value: (transfer none): TRUE if the window is in modal state.
*/
gboolean
meta_window_is_modal (MetaWindow *window)
{
g_return_val_if_fail (META_IS_WINDOW (window), FALSE);
return window->wm_state_modal;
}

View File

@ -116,4 +116,5 @@ void meta_window_delete (MetaWindow *window,
guint32 timestamp); guint32 timestamp);
int meta_window_get_pid (MetaWindow *window); int meta_window_get_pid (MetaWindow *window);
const char *meta_window_get_client_machine (MetaWindow *window); const char *meta_window_get_client_machine (MetaWindow *window);
gboolean meta_window_is_modal (MetaWindow *window);
#endif #endif