diff options
author | Alex R.M. Turner <armtuk@gmail.com> | 2008-02-02 04:05:16 +0000 |
---|---|---|
committer | Thomas James Alexander Thurman <tthurman@src.gnome.org> | 2008-02-02 04:05:16 +0000 |
commit | 18b63e9b5f79a1e5d0aa7b3dde17d4183383aac8 (patch) | |
tree | 9802f5caf6398488bf15c07a52049ea377d0a3da | |
parent | 48b6e8dd6773283863ae2c3834ee7ae0f3c7fca1 (diff) | |
download | metacity-18b63e9b5f79a1e5d0aa7b3dde17d4183383aac8.tar.gz |
Have the list also pull windows that are in other workspaces that have the
2008-02-01 Alex R.M. Turner <armtuk@gmail.com>
* src/core/display.c (meta_get_tab_entry_list): Have the list also pull
windows that are in other workspaces that have the
wm_state_needs_attention flag set
* src/core/window.c (meta_window_set_demands_attention): Make windows that
are on other workspaces that demand attention that aren't obscured
count as being obscured
Bug #333548.
svn path=/trunk/; revision=3533
-rw-r--r-- | ChangeLog | 19 | ||||
-rw-r--r-- | src/core/display.c | 23 | ||||
-rw-r--r-- | src/core/window.c | 51 |
3 files changed, 64 insertions, 29 deletions
@@ -1,9 +1,20 @@ +2008-02-01 Alex R.M. Turner <armtuk@gmail.com> + + * src/core/display.c (meta_get_tab_entry_list): Have the list also pull + windows that are in other workspaces that have the + wm_state_needs_attention flag set + * src/core/window.c (meta_window_set_demands_attention): Make windows that + are on other workspaces that demand attention that aren't obscured + count as being obscured + Bug #333548. + 2008-01-28 Christian Persch <chpe@gnome.org> - * src/core/display.c: (convert_property): - * src/core/screen.c: (meta_screen_calc_workspace_layout): - * src/core/xprops.c: (meta_prop_get_values): - Use G_STRFUNC instead of the deprecated G_GNUC_FUNCTION. Bug #512561. + * src/core/display.c (convert_property): + * src/core/screen.c (meta_screen_calc_workspace_layout): + * src/core/xprops.c (meta_prop_get_values): + Use G_STRFUNC instead of the deprecated G_GNUC_FUNCTION. + Bug #512561. 2008-01-21 Thomas Thurman <tthurman@gnome.org> diff --git a/src/core/display.c b/src/core/display.c index ac9c6c64..b70abf5e 100644 --- a/src/core/display.c +++ b/src/core/display.c @@ -4596,6 +4596,29 @@ meta_display_get_tab_list (MetaDisplay *display, } tab_list = g_list_reverse (tab_list); + + { + GSList *tmp; + MetaWindow *l_window; + + tmp = meta_display_list_windows (display); + + /* Go through all windows */ + while (tmp != NULL) + { + l_window=tmp->data; + + /* Check to see if it demands attention */ + if (l_window->wm_state_demands_attention && + l_window->workspace!=workspace) + { + /* if it does, add it to the popup */ + tab_list = g_list_prepend (tab_list, l_window); + } + + tmp = tmp->next; + } /* End while tmp!=NULL */ + } return tab_list; } diff --git a/src/core/window.c b/src/core/window.c index bcedd84e..31c483ac 100644 --- a/src/core/window.c +++ b/src/core/window.c @@ -8056,37 +8056,38 @@ meta_window_set_demands_attention (MetaWindow *window) MetaWindow *other_window; gboolean obscured = FALSE; - /* Does the window have any other window on this workspace - * overlapping it? - */ - - meta_window_get_outer_rect (window, &candidate_rect); - - /* The stack is sorted with the top windows first. */ - - while (stack != NULL && stack->data != window) + MetaWorkspace *workspace = window->screen->active_workspace; + if (workspace!=window->workspace) { - other_window = stack->data; - stack = stack->next; - - if (other_window->on_all_workspaces || - window->on_all_workspaces || - other_window->workspace == window->workspace) - { - meta_window_get_outer_rect (other_window, &other_rect); + /* windows on other workspaces are necessarily obscured */ + obscured = TRUE; + } + else + { + meta_window_get_outer_rect (window, &candidate_rect); - if (meta_rectangle_overlap (&candidate_rect, &other_rect)) + /* The stack is sorted with the top windows first. */ + + while (stack != NULL && stack->data != window) + { + other_window = stack->data; + stack = stack->next; + + if (other_window->on_all_workspaces || + window->on_all_workspaces || + other_window->workspace == window->workspace) { - obscured = TRUE; - break; + meta_window_get_outer_rect (other_window, &other_rect); + + if (meta_rectangle_overlap (&candidate_rect, &other_rect)) + { + obscured = TRUE; + break; + } } } - } - - /* If the window's in full view, there's no point setting the flag. */ + /* If the window's in full view, there's no point setting the flag. */ - if (!obscured) - { meta_topic (META_DEBUG_WINDOW_OPS, "Not marking %s as needing attention because it's in full view\n", window->desc); |