3162
* meta_window_get_maximized:
3164
* Gets the current maximization state of the window, as combination
3165
* of the %META_MAXIMIZE_HORIZONTAL and %META_MAXIMIZE_VERTICAL flags;
3167
* Return value: current maximization state
3170
meta_window_get_maximized (MetaWindow *window)
3172
return ((window->maximized_horizontally ? META_MAXIMIZE_HORIZONTAL : 0) |
3173
(window->maximized_vertically ? META_MAXIMIZE_VERTICAL : 0));
3177
* meta_window_is_fullscreen:
3179
* Return value: %TRUE if the window is currently fullscreen
3182
meta_window_is_fullscreen (MetaWindow *window)
3184
return window->fullscreen;
3162
3188
meta_window_tile (MetaWindow *window)
9305
* meta_window_appears_focused:
9306
* @window: a #MetaWindow
9308
* Determines if the window should be drawn with a focused appearance. This is
9309
* true for focused windows but also true for windows with a focused modal
9312
* Return value: %TRUE if the window should be drawn with a focused frame
9279
9315
meta_window_appears_focused (MetaWindow *window)
9317
/* FIXME: meta_window_foreach_transient() iterates over all windows; we
9318
* should eat the complexity to cache a bit for this.
9281
9320
if (!window->has_focus && meta_prefs_get_attach_modal_dialogs ())
9283
9322
gboolean focus = FALSE;
9656
9695
return window->mutter_hints;
9699
* meta_window_get_frame_type:
9700
* @window: a #MetaWindow
9702
* Gets the type of window decorations that should be used for this window.
9704
* Return value: the frame type
9707
meta_window_get_frame_type (MetaWindow *window)
9709
MetaFrameType base_type = META_FRAME_TYPE_LAST;
9711
switch (window->type)
9713
case META_WINDOW_NORMAL:
9714
base_type = META_FRAME_TYPE_NORMAL;
9717
case META_WINDOW_DIALOG:
9718
base_type = META_FRAME_TYPE_DIALOG;
9721
case META_WINDOW_MODAL_DIALOG:
9722
if (meta_prefs_get_attach_modal_dialogs () &&
9723
meta_window_get_transient_for (window) != NULL)
9724
base_type = META_FRAME_TYPE_ATTACHED;
9726
base_type = META_FRAME_TYPE_MODAL_DIALOG;
9729
case META_WINDOW_MENU:
9730
base_type = META_FRAME_TYPE_MENU;
9733
case META_WINDOW_UTILITY:
9734
base_type = META_FRAME_TYPE_UTILITY;
9737
case META_WINDOW_DESKTOP:
9738
case META_WINDOW_DOCK:
9739
case META_WINDOW_TOOLBAR:
9740
case META_WINDOW_SPLASHSCREEN:
9741
case META_WINDOW_DROPDOWN_MENU:
9742
case META_WINDOW_POPUP_MENU:
9743
case META_WINDOW_TOOLTIP:
9744
case META_WINDOW_NOTIFICATION:
9745
case META_WINDOW_COMBO:
9746
case META_WINDOW_DND:
9747
case META_WINDOW_OVERRIDE_OTHER:
9749
base_type = META_FRAME_TYPE_LAST;
9753
if (base_type == META_FRAME_TYPE_LAST)
9755
/* can't add border if undecorated */
9756
return META_FRAME_TYPE_LAST;
9758
else if (window->border_only && base_type != META_FRAME_TYPE_ATTACHED)
9760
/* override base frame type */
9761
return META_FRAME_TYPE_BORDER;