[gnome-shell] chrome: Make affectsStruts default to false



commit a376cd1610d9861da67c0e57613410ee55dd1fc8
Author: Dan Winship <danw gnome org>
Date:   Thu Jul 21 10:18:15 2011 -0400

    chrome: Make affectsStruts default to false
    
    Since we only want it to be true for the panel, and nothing else.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=655813

 js/ui/chrome.js      |   21 ++++++++++-----------
 js/ui/layout.js      |    2 +-
 js/ui/messageTray.js |    3 +--
 js/ui/panel.js       |    8 +++-----
 js/ui/panelMenu.js   |    2 +-
 5 files changed, 16 insertions(+), 20 deletions(-)
---
diff --git a/js/ui/chrome.js b/js/ui/chrome.js
index 7110ee5..602b93d 100644
--- a/js/ui/chrome.js
+++ b/js/ui/chrome.js
@@ -16,7 +16,7 @@ const ScreenSaver = imports.misc.screenSaver;
 
 const defaultParams = {
     visibleInFullscreen: false,
-    affectsStruts: true,
+    affectsStruts: false,
     affectsInputRegion: true
 };
 
@@ -71,19 +71,18 @@ Chrome.prototype = {
     // @actor: an actor to add to the chrome layer
     // @params: (optional) additional params
     //
-    // Adds @actor to the chrome layer and extends the input region
-    // and window manager struts to include it. (Window manager struts
-    // will only be affected if @actor is touching a screen edge.)
-    // Changes in @actor's size and position will automatically result
-    // in appropriate changes to the input region and struts. Changes
-    // in its visibility will affect the input region, but NOT the
-    // struts.
+    // Adds @actor to the chrome layer and (unless %affectsInputRegion
+    // is %false) extends the input region to include it. Changes in
+    // @actor's size, position, and visibility will automatically
+    // result in appropriate changes to the input region.
+    //
+    // If %affectsStruts is %true (and @actor is along a screen edge),
+    // then @actor's size and position will also affect the window
+    // manager struts. Changes to @actor's visibility will NOT affect
+    // whether or not the strut is present, however.
     //
     // If %visibleInFullscreen is %true, the actor will be visible
     // even when a fullscreen window should be covering it.
-    //
-    // If %affectsStruts or %affectsInputRegion is %false, the actor
-    // will not have the indicated effect.
     addActor: function(actor, params) {
         this.actor.add_actor(actor);
         this._trackActor(actor, params);
diff --git a/js/ui/layout.js b/js/ui/layout.js
index a4f4996..e13151a 100644
--- a/js/ui/layout.js
+++ b/js/ui/layout.js
@@ -109,7 +109,7 @@ LayoutManager.prototype = {
             let corner = new HotCorner();
             this._hotCorners.push(corner);
             corner.actor.set_position(cornerX, cornerY);
-            Main.chrome.addActor(corner.actor, { affectsStruts: false });
+            Main.chrome.addActor(corner.actor);
         }
     },
 
diff --git a/js/ui/messageTray.js b/js/ui/messageTray.js
index 3dea6ff..d7d246d 100644
--- a/js/ui/messageTray.js
+++ b/js/ui/messageTray.js
@@ -1330,8 +1330,7 @@ MessageTray.prototype = {
         this._notificationRemoved = false;
         this._reNotifyAfterHideNotification = null;
 
-        Main.chrome.addActor(this.actor, { affectsStruts: false,
-                                           visibleInFullscreen: true });
+        Main.chrome.addActor(this.actor, { visibleInFullscreen: true });
         Main.chrome.trackActor(this._notificationBin);
         Main.chrome.trackActor(this._summaryBoxPointer.actor);
 
diff --git a/js/ui/panel.js b/js/ui/panel.js
index a830a1c..b0c4f89 100644
--- a/js/ui/panel.js
+++ b/js/ui/panel.js
@@ -941,11 +941,9 @@ Panel.prototype = {
         Main.statusIconDispatcher.connect('status-icon-added', Lang.bind(this, this._onTrayIconAdded));
         Main.statusIconDispatcher.connect('status-icon-removed', Lang.bind(this, this._onTrayIconRemoved));
 
-        Main.chrome.addActor(this.actor);
-        Main.chrome.addActor(this._leftCorner.actor, { affectsStruts: false,
-                                                       affectsInputRegion: false });
-        Main.chrome.addActor(this._rightCorner.actor, { affectsStruts: false,
-                                                        affectsInputRegion: false });
+        Main.chrome.addActor(this.actor, { affectsStruts: true });
+        Main.chrome.addActor(this._leftCorner.actor, { affectsInputRegion: false });
+        Main.chrome.addActor(this._rightCorner.actor, { affectsInputRegion: false });
 
         Main.ctrlAltTabManager.addGroup(this.actor, _("Top Bar"), 'start-here',
                                         { sortGroup: CtrlAltTab.SortGroup.TOP });
diff --git a/js/ui/panelMenu.js b/js/ui/panelMenu.js
index 6cb96e2..4c5ccd3 100644
--- a/js/ui/panelMenu.js
+++ b/js/ui/panelMenu.js
@@ -27,7 +27,7 @@ Button.prototype = {
         this.menu.actor.add_style_class_name('panel-menu');
         this.menu.connect('open-state-changed', Lang.bind(this, this._onOpenStateChanged));
         this.menu.actor.connect('key-press-event', Lang.bind(this, this._onMenuKeyPress));
-        Main.chrome.addActor(this.menu.actor, { affectsStruts: false });
+        Main.chrome.addActor(this.menu.actor);
         this.menu.actor.hide();
     },
 



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]