[mutter/wayland] window: Split out recalc of skip_taskbar / skip_pager
- From: Jasper St. Pierre <jstpierre src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [mutter/wayland] window: Split out recalc of skip_taskbar / skip_pager
- Date: Tue, 18 Mar 2014 19:44:37 +0000 (UTC)
commit 63b158e4da8223ccd110ad85ea5c99ae31012249
Author: Jasper St. Pierre <jstpierre mecheye net>
Date: Tue Mar 18 11:10:22 2014 -0400
window: Split out recalc of skip_taskbar / skip_pager
This will be our first attempt for the MetaWindowX11Private
src/core/window.c | 83 ++++++++++++++++++++++++++---------------------------
1 files changed, 41 insertions(+), 42 deletions(-)
---
diff --git a/src/core/window.c b/src/core/window.c
index bbf4c0b..bffb706 100644
--- a/src/core/window.c
+++ b/src/core/window.c
@@ -7160,6 +7160,46 @@ set_allowed_actions_hint (MetaWindow *window)
#undef MAX_N_ACTIONS
}
+static void
+meta_window_recalc_skip_features (MetaWindow *window)
+{
+ switch (window->type)
+ {
+ /* Force skip taskbar/pager on these window types */
+ case META_WINDOW_DESKTOP:
+ case META_WINDOW_DOCK:
+ case META_WINDOW_TOOLBAR:
+ case META_WINDOW_MENU:
+ case META_WINDOW_UTILITY:
+ case META_WINDOW_SPLASHSCREEN:
+ case META_WINDOW_DROPDOWN_MENU:
+ case META_WINDOW_POPUP_MENU:
+ case META_WINDOW_TOOLTIP:
+ case META_WINDOW_NOTIFICATION:
+ case META_WINDOW_COMBO:
+ case META_WINDOW_DND:
+ case META_WINDOW_OVERRIDE_OTHER:
+ window->skip_taskbar = TRUE;
+ window->skip_pager = TRUE;
+ break;
+
+ case META_WINDOW_DIALOG:
+ case META_WINDOW_MODAL_DIALOG:
+ /* only skip taskbar if we have a real transient parent
+ (and ignore the application hints) */
+ if (window->transient_for != NULL)
+ window->skip_taskbar = TRUE;
+ else
+ window->skip_taskbar = FALSE;
+ break;
+
+ case META_WINDOW_NORMAL:
+ window->skip_taskbar = window->wm_state_skip_taskbar;
+ window->skip_pager = window->wm_state_skip_pager;
+ break;
+ }
+}
+
void
meta_window_recalc_features (MetaWindow *window)
{
@@ -7311,48 +7351,7 @@ meta_window_recalc_features (MetaWindow *window)
if (!window->decorated || window->border_only)
window->has_shade_func = FALSE;
- window->skip_taskbar = FALSE;
- window->skip_pager = FALSE;
-
- if (window->wm_state_skip_taskbar)
- window->skip_taskbar = TRUE;
-
- if (window->wm_state_skip_pager)
- window->skip_pager = TRUE;
-
- switch (window->type)
- {
- /* Force skip taskbar/pager on these window types */
- case META_WINDOW_DESKTOP:
- case META_WINDOW_DOCK:
- case META_WINDOW_TOOLBAR:
- case META_WINDOW_MENU:
- case META_WINDOW_UTILITY:
- case META_WINDOW_SPLASHSCREEN:
- case META_WINDOW_DROPDOWN_MENU:
- case META_WINDOW_POPUP_MENU:
- case META_WINDOW_TOOLTIP:
- case META_WINDOW_NOTIFICATION:
- case META_WINDOW_COMBO:
- case META_WINDOW_DND:
- case META_WINDOW_OVERRIDE_OTHER:
- window->skip_taskbar = TRUE;
- window->skip_pager = TRUE;
- break;
-
- case META_WINDOW_DIALOG:
- case META_WINDOW_MODAL_DIALOG:
- /* only skip taskbar if we have a real transient parent
- (and ignore the application hints) */
- if (window->transient_for != NULL)
- window->skip_taskbar = TRUE;
- else
- window->skip_taskbar = FALSE;
- break;
-
- case META_WINDOW_NORMAL:
- break;
- }
+ meta_window_recalc_skip_features (window);
meta_topic (META_DEBUG_WINDOW_OPS,
"Window %s decorated = %d border_only = %d has_close = %d has_minimize = %d has_maximize = %d
has_move = %d has_shade = %d skip_taskbar = %d skip_pager = %d\n",
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]