mirror of
https://github.com/brl/mutter.git
synced 2025-07-05 10:31:18 +00:00
Precompute groups to guarantee that meta_group_list_windows always returns
2003-06-04 Rob Adams <robadams@ucla.edu> Precompute groups to guarantee that meta_group_list_windows always returns the correct list of windows. See Bug #96973 * src/window.h: change cached_group variable to group * src/window.c (meta_window_new): change cached_group to group and call meta_window_compute_group * src/groups.c (meta_window_get_group): simply return window->group rather than computing it and returning window->cached_group (meta_window_compute_group): new function computes window->group. Designed to be called once from meta_window_new (remove_window_from_group): change cached_group to group (meta_window_group_leader_changed): call meta_window_compute_group instead of meta_window_get_group
This commit is contained in:
@ -347,6 +347,10 @@ meta_window_new (MetaDisplay *display,
|
||||
window->display = display;
|
||||
window->workspaces = NULL;
|
||||
|
||||
/* assign the window to its group, or create a new group if needed
|
||||
*/
|
||||
meta_window_compute_group (window);
|
||||
|
||||
#ifdef HAVE_XSYNC
|
||||
window->update_counter = None;
|
||||
#endif
|
||||
@ -490,7 +494,7 @@ meta_window_new (MetaDisplay *display,
|
||||
window->top_strut = 0;
|
||||
window->bottom_strut = 0;
|
||||
|
||||
window->cached_group = NULL;
|
||||
window->group = NULL;
|
||||
|
||||
window->using_net_wm_name = FALSE;
|
||||
window->using_net_wm_icon_name = FALSE;
|
||||
@ -536,7 +540,7 @@ meta_window_new (MetaDisplay *display,
|
||||
update_role (window);
|
||||
update_net_wm_type (window);
|
||||
meta_window_update_icon_now (window);
|
||||
|
||||
|
||||
if (window->initially_iconic)
|
||||
{
|
||||
/* WM_HINTS said minimized */
|
||||
|
Reference in New Issue
Block a user