[gnome-shell/wip/fmuellner/notification-redux+sass: 164/207] layout: Simplify trayBox handling



commit 1181a2b4adceeaa805ce621cc72dbb6a80542c7e
Author: Florian Müllner <fmuellner gnome org>
Date:   Sat Feb 14 14:22:57 2015 +0100

    layout: Simplify trayBox handling

 js/ui/layout.js      |    9 ++++-----
 js/ui/messageTray.js |    2 +-
 2 files changed, 5 insertions(+), 6 deletions(-)
---
diff --git a/js/ui/layout.js b/js/ui/layout.js
index 1d839a1..2700723 100644
--- a/js/ui/layout.js
+++ b/js/ui/layout.js
@@ -244,7 +244,7 @@ const LayoutManager = new Lang.Class({
 
         this.trayBox = new St.Widget({ name: 'trayBox',
                                        layout_manager: new Clutter.BinLayout() }); 
-        this.addChrome(this.trayBox);
+        this.addChrome(this.trayBox, { affectsInputRegion: false });
 
         this.modalDialogGroup = new St.Widget({ name: 'modalDialogGroup',
                                                 layout_manager: new Clutter.BinLayout() });
@@ -289,6 +289,9 @@ const LayoutManager = new Lang.Class({
     init: function() {
         Main.sessionMode.connect('updated', Lang.bind(this, this._sessionUpdated));
 
+        let trayConstraint = new MonitorConstraint({ primary: true });
+        this.trayBox.add_constraint(trayConstraint);
+
         this._loadBackground();
     },
 
@@ -458,9 +461,6 @@ const LayoutManager = new Lang.Class({
         this.panelBox.set_size(this.primaryMonitor.width, -1);
 
         this.keyboardIndex = this.primaryIndex;
-
-        this.trayBox.set_position(this.primaryMonitor.x, this.primaryMonitor.y);
-        this.trayBox.set_size(this.primaryMonitor.width, -1);
     },
 
     _panelBoxChanged: function() {
@@ -471,7 +471,6 @@ const LayoutManager = new Lang.Class({
             if (corner)
                 corner.setBarrierSize(size);
         });
-        this.trayBox.set_y(this.panelBox.y + size);
     },
 
     _updatePanelBarrier: function() {
diff --git a/js/ui/messageTray.js b/js/ui/messageTray.js
index 89320cf..54fc0e8 100644
--- a/js/ui/messageTray.js
+++ b/js/ui/messageTray.js
@@ -1274,7 +1274,7 @@ const MessageTray = new Lang.Class({
 
         Main.layoutManager.trayBox.add_actor(this.actor);
         Main.layoutManager.trackChrome(this.actor);
-        Main.layoutManager.trackChrome(this._notificationBin);
+        Main.layoutManager.trackChrome(this._notificationBin, { affectsInputRegion: true });
 
         global.screen.connect('in-fullscreen-changed', Lang.bind(this, this._updateState));
 


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