[gnome-shell/wip/message-tray: 2/22] layout: Provide a method to toggle the panel struts
- From: Jasper St. Pierre <jstpierre src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-shell/wip/message-tray: 2/22] layout: Provide a method to toggle the panel struts
- Date: Wed, 1 Aug 2012 18:43:03 +0000 (UTC)
commit 2af17db7907fe4a574a19994943a98cce94e6010
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 a4da201..5f58ff9 100644
--- a/js/ui/layout.js
+++ b/js/ui/layout.js
@@ -366,6 +366,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);
}
@@ -628,6 +632,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]