mirror of
https://github.com/brl/mutter.git
synced 2024-11-25 01:20:42 -05:00
session: Fix crash when saving sticky windows
Since commit 527c53a2a0
, window->workspace is set to %NULL when
the window is sticky (see comment[0]), so don't try to save the
workspace index in that case.
[0] https://git.gnome.org/browse/mutter/tree/src/core/window.c#n4307
https://bugzilla.gnome.org/show_bug.cgi?id=756642
This commit is contained in:
parent
a692fd3808
commit
a95ae4d178
@ -946,7 +946,15 @@ save_state (void)
|
|||||||
|
|
||||||
/* Sticky */
|
/* Sticky */
|
||||||
if (window->on_all_workspaces_requested)
|
if (window->on_all_workspaces_requested)
|
||||||
|
{
|
||||||
fputs (" <sticky/>\n", outfile);
|
fputs (" <sticky/>\n", outfile);
|
||||||
|
} else {
|
||||||
|
int n;
|
||||||
|
n = meta_workspace_index (window->workspace);
|
||||||
|
fprintf (outfile,
|
||||||
|
" <workspace index=\"%d\"/>\n", n);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
/* Minimized */
|
/* Minimized */
|
||||||
if (window->minimized)
|
if (window->minimized)
|
||||||
@ -963,14 +971,6 @@ save_state (void)
|
|||||||
window->saved_rect.height);
|
window->saved_rect.height);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Workspaces we're on */
|
|
||||||
{
|
|
||||||
int n;
|
|
||||||
n = meta_workspace_index (window->workspace);
|
|
||||||
fprintf (outfile,
|
|
||||||
" <workspace index=\"%d\"/>\n", n);
|
|
||||||
}
|
|
||||||
|
|
||||||
/* Gravity */
|
/* Gravity */
|
||||||
{
|
{
|
||||||
int x, y, w, h;
|
int x, y, w, h;
|
||||||
|
Loading…
Reference in New Issue
Block a user