[mutter] workspace: fix crash when creating a new workspace with sticky windows that have struts
- From: Rico Tzschichholz <ricotz src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [mutter] workspace: fix crash when creating a new workspace with sticky windows that have struts
- Date: Sun, 12 Oct 2014 20:28:25 +0000 (UTC)
commit d07e2f409089ac08e6f7f0eeae978ee681c80354
Author: Tom Beckmann <tomjonabc gmail com>
Date: Sun Oct 12 11:18:58 2014 +0200
workspace: fix crash when creating a new workspace with sticky windows that have struts
The constructor would collect windows that are sticky before initializing its state
which would lead to a crash in the case of windows with struts which trigger a work
area recalculation where mutter would assume, due to uninitialized state, that an
existing work area has to be freed.
https://bugzilla.gnome.org/show_bug.cgi?id=738384
src/core/workspace.c | 14 +++++++-------
1 files changed, 7 insertions(+), 7 deletions(-)
---
diff --git a/src/core/workspace.c b/src/core/workspace.c
index 4e6224e..f275c00 100644
--- a/src/core/workspace.c
+++ b/src/core/workspace.c
@@ -180,13 +180,6 @@ meta_workspace_new (MetaScreen *screen)
workspace->windows = NULL;
workspace->mru_list = NULL;
- /* make sure sticky windows are in our mru_list */
- windows = meta_display_list_windows (screen->display, META_LIST_SORTED);
- for (l = windows; l; l = l->next)
- if (meta_window_located_on_workspace (l->data, workspace))
- meta_workspace_add_window (workspace, l->data);
- g_slist_free (windows);
-
workspace->work_areas_invalid = TRUE;
workspace->work_area_monitor = NULL;
workspace->work_area_screen.x = 0;
@@ -205,6 +198,13 @@ meta_workspace_new (MetaScreen *screen)
workspace->showing_desktop = FALSE;
+ /* make sure sticky windows are in our mru_list */
+ windows = meta_display_list_windows (screen->display, META_LIST_SORTED);
+ for (l = windows; l; l = l->next)
+ if (meta_window_located_on_workspace (l->data, workspace))
+ meta_workspace_add_window (workspace, l->data);
+ g_slist_free (windows);
+
return workspace;
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]