mirror of
https://github.com/brl/mutter.git
synced 2025-02-16 21:34:09 +00:00
window: Fix crash when mapping sticky window
Since the introduction of set_workspace_state(), window->workspace will always be NULL when on_all_workspaces is set - passing that to a workspace function that does not validate its input will then result in a crash. Use the get_workspace() function instead, which will always return a valid workspace.
This commit is contained in:
parent
c954f9cc24
commit
df90545258
@ -2095,7 +2095,7 @@ windows_overlap (const MetaWindow *w1, const MetaWindow *w2)
|
|||||||
static gboolean
|
static gboolean
|
||||||
window_would_be_covered (const MetaWindow *newbie)
|
window_would_be_covered (const MetaWindow *newbie)
|
||||||
{
|
{
|
||||||
MetaWorkspace *workspace = newbie->workspace;
|
MetaWorkspace *workspace = meta_window_get_workspace ((MetaWindow *)newbie);
|
||||||
GList *tmp, *windows;
|
GList *tmp, *windows;
|
||||||
|
|
||||||
windows = meta_workspace_list_windows (workspace);
|
windows = meta_workspace_list_windows (workspace);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user