Layout: don't minimize fullscreen windows that are focused
Windows can sometimes be focused, or appear to be focused, without being at the exact top of the stack, for example in the case of override-redirect windows, or with attached modal dialogs. In that case, we should not try to minimize them (as it creates a loop that makes it impossible to restore the window) https://bugzilla.gnome.org/show_bug.cgi?id=694905
This commit is contained in:
parent
43ed66cf26
commit
b6bf8d5b2d
@ -923,7 +923,7 @@ const LayoutManager = new Lang.Class({
|
|||||||
|
|
||||||
if (primaryWasInFullscreen != this.primaryMonitor.inFullscreen) {
|
if (primaryWasInFullscreen != this.primaryMonitor.inFullscreen) {
|
||||||
let windows = this._getWindowActorsForWorkspace(global.screen.get_active_workspace());
|
let windows = this._getWindowActorsForWorkspace(global.screen.get_active_workspace());
|
||||||
for (let i = 0; i < windows.length - 1; i++) {
|
for (let i = 0; i < windows.length; i++) {
|
||||||
let window = windows[i];
|
let window = windows[i];
|
||||||
let metaWindow = window.meta_window;
|
let metaWindow = window.meta_window;
|
||||||
|
|
||||||
@ -935,8 +935,9 @@ const LayoutManager = new Lang.Class({
|
|||||||
if (!metaWindow.is_on_primary_monitor())
|
if (!metaWindow.is_on_primary_monitor())
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
// Minimize monitor sized windows
|
// Minimize monitor sized windows that are not focused
|
||||||
if (metaWindow.is_monitor_sized())
|
if (metaWindow.is_monitor_sized() &&
|
||||||
|
!metaWindow.appears_focused)
|
||||||
metaWindow.minimize();
|
metaWindow.minimize();
|
||||||
}
|
}
|
||||||
this.emit('primary-fullscreen-changed', this.primaryMonitor.inFullscreen);
|
this.emit('primary-fullscreen-changed', this.primaryMonitor.inFullscreen);
|
||||||
|
Loading…
Reference in New Issue
Block a user