From 54771511fe477eafbb4c28e8c7ddc2455cfc7283 Mon Sep 17 00:00:00 2001
From: Rui Matos <tiagomatos@gmail.com>
Date: Sat, 24 Oct 2015 18:46:12 +0200
Subject: [PATCH 3/4] window: Properly update window->monitor for the desktop
window
We don't want to move the desktop window but we still need to update
window->monitor or otherwise we'll be left with a pointer to invalid
memory.
---
src/core/window.c | 5 +----
1 file changed, 1 insertion(+), 4 deletions(-)
diff --git a/src/core/window.c b/src/core/window.c
index f9fae9e..faa0296 100644
--- a/src/core/window.c
+++ b/src/core/window.c
@@ -3513,12 +3513,9 @@ meta_window_update_for_monitors_changed (MetaWindow *window)
{
const MetaMonitorInfo *old, *new;
- if (window->type == META_WINDOW_DESKTOP)
- return;
-
old = window->monitor;
- if (!old || window->screen->n_monitor_infos == 0 || window->override_redirect)
+ if (!old || window->screen->n_monitor_infos == 0 || window->override_redirect || window->type == META_WINDOW_DESKTOP)
{
meta_window_update_monitor (window, FALSE);
return;
--
2.5.0