Fix fullscreen behaviour

The check in _windowsRestacked checks for
windows[i].x >= primary.x
and
windows[i].x <= primary.x + primary.width
(likewise for y).

This is wrong because a fullscreen window on the secondary screen is likely
to have windows[i].x == primary.x + primary.width which means that the checks
for _both_ screens would be valid, but the first one would win due to
the "break;" statement.

But here the window isn't really on the primary but on the secondary one.

Fix that by using < instead of <= for those checks.

https://bugzilla.gnome.org/show_bug.cgi?id=614509
This commit is contained in:
Adel Gadllah 2010-03-31 22:59:20 +02:00
parent b571ad0760
commit f262473a3f

View File

@ -209,8 +209,8 @@ Chrome.prototype = {
for (let i = windows.length - 1; i > -1; i--) { for (let i = windows.length - 1; i > -1; i--) {
let layer = windows[i].get_meta_window().get_layer(); let layer = windows[i].get_meta_window().get_layer();
if (layer == Meta.StackLayer.FULLSCREEN) { if (layer == Meta.StackLayer.FULLSCREEN) {
if (windows[i].x >= primary.x && windows[i].x <= primary.x + primary.width && 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) { windows[i].y >= primary.y && windows[i].y < primary.y + primary.height) {
this._obscuredByFullscreen = true; this._obscuredByFullscreen = true;
break; break;
} }