diff --git a/ChangeLog b/ChangeLog index 779284db7..34fb13059 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,12 @@ +2003-06-04 Rob Adams + + * src/window.c (meta_window_new): don't be stupid and set + window->group = NULL after calling meta_window_compute_group. + + * src/group.c (meta_window_get_group): assert that window->group + != NULL in here instead of computing the group to ensure + robustness. + 2003-06-04 Rob Adams Precompute groups to guarantee that meta_group_list_windows always diff --git a/src/group.c b/src/group.c index a1e61c2a4..72dbc930a 100644 --- a/src/group.c +++ b/src/group.c @@ -106,9 +106,8 @@ meta_window_get_group (MetaWindow *window) if (window->unmanaging) return NULL; - if (window->group == NULL) - meta_window_compute_group (window); - + g_assert (window->group != NULL); + return window->group; } diff --git a/src/window.c b/src/window.c index 76e66ea30..2386c02c9 100644 --- a/src/window.c +++ b/src/window.c @@ -349,8 +349,9 @@ meta_window_new (MetaDisplay *display, /* assign the window to its group, or create a new group if needed */ + window->group = NULL; meta_window_compute_group (window); - + #ifdef HAVE_XSYNC window->update_counter = None; #endif @@ -494,8 +495,6 @@ meta_window_new (MetaDisplay *display, window->top_strut = 0; window->bottom_strut = 0; - window->group = NULL; - window->using_net_wm_name = FALSE; window->using_net_wm_icon_name = FALSE;