[gnome-shell] [chrome] Fix fullscreen check for broken apps
- From: Adel Gadllah <agadllah src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-shell] [chrome] Fix fullscreen check for broken apps
- Date: Tue, 6 Apr 2010 19:19:14 +0000 (UTC)
commit ab75c8caccd67d411ef83e86e009c08f14484771
Author: Adel Gadllah <adel gadllah gmail com>
Date: Tue Apr 6 21:14:54 2010 +0200
[chrome] Fix fullscreen check for broken apps
Document fullscreen checks and add a third case to catch apps like
flash who position there windows sightly offscreen to hide there decorations.
https://bugzilla.gnome.org/show_bug.cgi?id=614509
js/ui/chrome.js | 13 +++++++++++--
1 files changed, 11 insertions(+), 2 deletions(-)
---
diff --git a/js/ui/chrome.js b/js/ui/chrome.js
index b87c309..406fae1 100644
--- a/js/ui/chrome.js
+++ b/js/ui/chrome.js
@@ -208,9 +208,18 @@ Chrome.prototype = {
this._obscuredByFullscreen = false;
for (let i = windows.length - 1; i > -1; i--) {
let layer = windows[i].get_meta_window().get_layer();
+
+ // There are 3 cases we check here for:
+ // 1.) Monitor sized window
+ // 2.) Window with a position somewhere on the primary screen having the _NET_WM_FULLSCREEN flag set
+ // 3.) Window that is partly off screen (tries to hide its decorations) which might have negative coords
+ // We check for 1.) and 2.) by checking if the upper right corner is on the primary monitor, but avoid the case
+ // where it overlaps with the secondary screen (like window.x + window.width == primary.x + primary.width)
+ // For 3.) we just ignore negative values as they don't really make sense
+
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) {
+ if (Math.max(windows[i].x, 0) >= primary.x && Math.max(windows[i].x, 0) < primary.x + primary.width &&
+ Math.max(windows[i].y, 0) >= primary.y && Math.max(windows[i].y, 0) < primary.y + primary.height) {
this._obscuredByFullscreen = true;
break;
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]