[gnome-shell] Ensure that all struts we set extends to their boundary
- From: Alexander Larsson <alexl src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-shell] Ensure that all struts we set extends to their boundary
- Date: Thu, 3 Mar 2011 14:57:09 +0000 (UTC)
commit d964d2baaebf3d8f6de639beeae2e6a573d5990b
Author: Alexander Larsson <alexl redhat com>
Date: Thu Feb 24 12:06:25 2011 +0100
Ensure that all struts we set extends to their boundary
Mutter really expects this, as this is how app-specified struts
happen. For instance, if the primary display is beside a taller
screen and is not positioned at the top, then we extend the struts
for the panel with the size of the unused area above the primary
monitor.
https://bugzilla.gnome.org/show_bug.cgi?id=642881
js/ui/chrome.js | 17 +++++++++++++++++
1 files changed, 17 insertions(+), 0 deletions(-)
---
diff --git a/js/ui/chrome.js b/js/ui/chrome.js
index 4bad7c0..addc9ac 100644
--- a/js/ui/chrome.js
+++ b/js/ui/chrome.js
@@ -413,6 +413,23 @@ Chrome.prototype = {
else
continue;
+ // Ensure that the strut rects goes all the way to the screen edge,
+ // as this really what mutter expects.
+ switch (side) {
+ case Meta.Side.TOP:
+ y1 = 0;
+ break;
+ case Meta.Side.BOTTOM:
+ y2 = global.screen_height;
+ break;
+ case Meta.Side.LEFT:
+ x1 = 0;
+ break;
+ case Meta.Side.RIGHT:
+ x2 = global.screen_width;
+ break;
+ }
+
let strutRect = new Meta.Rectangle({ x: x1, y: y1, width: x2 - x1, height: y2 - y1});
let strut = new Meta.Strut({ rect: strutRect, side: side });
struts.push(strut);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]