From 2d574047e4a8c843078749a39caac262f48e17f2 Mon Sep 17 00:00:00 2001 From: Adel Gadllah Date: Tue, 9 Feb 2010 21:33:10 +0100 Subject: [PATCH] Don't show chrome when a fullscreen window is open Currently the check in chrome.js checks if a window is on the primary screen by checking its coordinates, width and height. This check misses the case where windows just set _NET_WM_FULLSCREEN without changing their position and size (examples are Flash and ooimpress's presentation window). Fix this by separating the check for fullscreen windows from the override redirect one, and only check whether the window is anywhere on the primary screen in the fullscreen case. https://bugzilla.gnome.org/show_bug.cgi?id=597271 --- js/ui/chrome.js | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/js/ui/chrome.js b/js/ui/chrome.js index 2e57456cf..50e0e79b3 100644 --- a/js/ui/chrome.js +++ b/js/ui/chrome.js @@ -208,9 +208,14 @@ Chrome.prototype = { this._obscuredByFullscreen = false; for (let i = windows.length - 1; i > -1; i--) { let layer = windows[i].get_meta_window().get_layer(); - - if (layer == Meta.StackLayer.OVERRIDE_REDIRECT || - layer == Meta.StackLayer.FULLSCREEN) { + if (layer == Meta.StackLayer.FULLSCREEN) { + if (windows[i].x >= primary.x && windows[i].x <= primary.x + primary.width && + windows[i].y >= primary.y && windows[i].y <= primary.y + primary.height) { + this._obscuredByFullscreen = true; + break; + } + } + if (layer == Meta.StackLayer.OVERRIDE_REDIRECT) { if (windows[i].x <= primary.x && windows[i].x + windows[i].width >= primary.x + primary.width && windows[i].y <= primary.y &&