Skip to content

Support unmanaged windows monitor index (negative)

Marco Trevisan requested to merge wip/support-invalid-monitor-index into master

Reproposing patches by @sam1 from https://bugzilla.gnome.org/show_bug.cgi?id=788882 rebased on current master and with some of the requested changes applied.

This change needs mutter!84 (merged) to land in order to fix the occurring crashes.

Moved here for better tracking compared to bugzilla. Previous reviews:

Wondering if instead of changing keyboard.js would be instead the case of just doing something like:

diff --git a/js/ui/layout.js b/js/ui/layout.js
index 59ec77d..9100024 100644
--- a/js/ui/layout.js
+++ b/js/ui/layout.js
@@ -551,7 +551,8 @@ var LayoutManager = new Lang.Class({
 
         if (global.stage.key_focus != null)
             i = this.findIndexForActor(global.stage.key_focus);
-        else if (global.display.focus_window != null)
+        else if (global.display.focus_window != null &&
+                 global.display.focus_window.get_monitor() >= 0)
             i = global.display.focus_window.get_monitor();
         return i;
     },
Edited by Marco Trevisan

Merge request reports