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
This commit is contained in:
Adel Gadllah 2010-02-09 21:33:10 +01:00
parent 8ded91e975
commit 2d574047e4

View File

@ -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 &&