summaryrefslogtreecommitdiff
path: root/src/window.c
diff options
context:
space:
mode:
authorHavoc Pennington <hp@pobox.com>2002-07-06 19:05:37 +0000
committerHavoc Pennington <hp@src.gnome.org>2002-07-06 19:05:37 +0000
commita62b3c8b29b09665c5589b168f3bbb9302354f32 (patch)
treedaa792b9bc49fffa7277cfc26cfd71783b1c8ad9 /src/window.c
parent8c3437fd2754c9aec761545a1a1e668ed6d07ea1 (diff)
downloadmetacity-a62b3c8b29b09665c5589b168f3bbb9302354f32.tar.gz
metacity-a62b3c8b29b09665c5589b168f3bbb9302354f32.tar.bz2
Apply blackc@speakeasy.net patch, bug #83940, to do mini-workspaces
2002-07-06 Havoc Pennington <hp@pobox.com> Apply blackc@speakeasy.net patch, bug #83940, to do mini-workspaces similar to the pager, when switching spaces. * src/window.c (update_net_wm_state): actually fill in wm_state_skip_taskbar, wm_state_skip_pager flags * src/tabpopup.c: support drawing a mini-workspace similar to the one the pager draws. * src/stack.c (meta_stack_list_windows): new function to list the windows in stacking order * src/screen.c (meta_screen_ensure_workspace_popup): don't pass in the ugly default app icon for workspaces * src/display.c (event_callback): fix from blackc@speakeasy.net to avoid dereferencing a NULL grab window.
Diffstat (limited to 'src/window.c')
-rw-r--r--src/window.c49
1 files changed, 44 insertions, 5 deletions
diff --git a/src/window.c b/src/window.c
index 531330d..690f3fc 100644
--- a/src/window.c
+++ b/src/window.c
@@ -382,6 +382,8 @@ meta_window_new (MetaDisplay *display, Window xwindow,
window->has_fullscreen_func = TRUE;
window->wm_state_modal = FALSE;
+ window->skip_taskbar = FALSE;
+ window->skip_pager = FALSE;
window->wm_state_skip_taskbar = FALSE;
window->wm_state_skip_pager = FALSE;
@@ -3222,9 +3224,9 @@ meta_window_client_message (MetaWindow *window,
if (first == display->atom_net_wm_state_skip_pager ||
second == display->atom_net_wm_state_skip_pager)
{
- window->wm_state_skip_pager =
+ window->skip_pager =
(action == _NET_WM_STATE_ADD) ||
- (action == _NET_WM_STATE_TOGGLE && !window->wm_state_skip_pager);
+ (action == _NET_WM_STATE_TOGGLE && !window->skip_pager);
set_net_wm_state (window);
}
@@ -3232,9 +3234,9 @@ meta_window_client_message (MetaWindow *window,
if (first == display->atom_net_wm_state_skip_taskbar ||
second == display->atom_net_wm_state_skip_taskbar)
{
- window->wm_state_skip_taskbar =
+ window->skip_taskbar =
(action == _NET_WM_STATE_ADD) ||
- (action == _NET_WM_STATE_TOGGLE && !window->wm_state_skip_taskbar);
+ (action == _NET_WM_STATE_TOGGLE && !window->skip_taskbar);
set_net_wm_state (window);
}
@@ -4088,7 +4090,9 @@ update_net_wm_state (MetaWindow *window)
window->shaded = FALSE;
window->maximized = FALSE;
window->wm_state_modal = FALSE;
-
+ window->wm_state_skip_taskbar = FALSE;
+ window->wm_state_skip_pager = FALSE;
+
if (meta_prop_get_atom_list (window->display, window->xwindow,
window->display->atom_net_wm_state,
&atoms, &n_atoms))
@@ -4106,6 +4110,10 @@ update_net_wm_state (MetaWindow *window)
window->maximized = TRUE;
else if (atoms[i] == window->display->atom_net_wm_state_modal)
window->wm_state_modal = TRUE;
+ else if (atoms[i] == window->display->atom_net_wm_state_skip_taskbar)
+ window->wm_state_skip_taskbar = TRUE;
+ else if (atoms[i] == window->display->atom_net_wm_state_skip_pager)
+ window->wm_state_skip_pager = TRUE;
++i;
}
@@ -5012,7 +5020,38 @@ recalc_window_features (MetaWindow *window)
/* no shading if not decorated */
if (!window->decorated)
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:
+ window->skip_taskbar = TRUE;
+ window->skip_pager = TRUE;
+ break;
+
+ case META_WINDOW_DIALOG:
+ case META_WINDOW_MODAL_DIALOG:
+ window->skip_taskbar = TRUE;
+ break;
+
+ case META_WINDOW_NORMAL:
+ break;
+ }
+
/* FIXME perhaps should ensure if we don't have a shade func,
* we aren't shaded, etc.
*/