[gnome-shell/wip/message-tray: 2/3] layout: Provide a method to toggle the panel struts
- From: Debarshi Ray <debarshir src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-shell/wip/message-tray: 2/3] layout: Provide a method to toggle the panel struts
- Date: Wed, 18 Jul 2012 15:27:47 +0000 (UTC)
commit df161f2fb1bcf7bcd5ff6042427386a715e36e72
Author: Debarshi Ray <debarshir gnome org>
Date: Wed Jul 18 17:17:47 2012 +0200
layout: Provide a method to toggle the panel struts
We need to toggle the panel struts while toggling the message tray so
that windows can be moved up beneath the panel.
Fixes: https://bugzilla.gnome.org/677215
js/ui/layout.js | 13 +++++++++++++
1 files changed, 13 insertions(+), 0 deletions(-)
---
diff --git a/js/ui/layout.js b/js/ui/layout.js
index ef1a1b2..b471b75 100644
--- a/js/ui/layout.js
+++ b/js/ui/layout.js
@@ -357,6 +357,10 @@ const LayoutManager = new Lang.Class({
this._chrome.removeActor(actor);
},
+ togglePanelStruts: function() {
+ this._chrome.toggleStruts(this.panelBox);
+ },
+
findMonitorForActor: function(actor) {
return this._chrome.findMonitorForActor(actor);
}
@@ -626,6 +630,15 @@ const Chrome = new Lang.Class({
this._untrackActor(actor);
},
+ toggleStruts: function(actor) {
+ let index = this._findActor(actor);
+ if (index == -1)
+ return;
+
+ let actorData = this._trackedActors[index];
+ actorData.affectsStruts = !actorData.affectsStruts;
+ },
+
_findActor: function(actor) {
for (let i = 0; i < this._trackedActors.length; i++) {
let actorData = this._trackedActors[i];
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]