mirror of
https://github.com/brl/mutter.git
synced 2024-11-30 03:50:47 -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
f90834e2cf
commit
9ed5dc758f
@ -946,7 +946,15 @@ save_state (void)
|
||||
|
||||
/* Sticky */
|
||||
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 */
|
||||
if (window->minimized)
|
||||
@ -963,14 +971,6 @@ save_state (void)
|
||||
window->saved_rect.height);
|
||||
}
|
||||
|
||||
/* Workspaces we're on */
|
||||
{
|
||||
int n;
|
||||
n = meta_workspace_index (window->workspace);
|
||||
fprintf (outfile,
|
||||
" <workspace index=\"%d\"/>\n", n);
|
||||
}
|
||||
|
||||
/* Gravity */
|
||||
{
|
||||
int x, y, w, h;
|
||||
|
Loading…
Reference in New Issue
Block a user