[gnome-shell/wip/fmuellner/notification-redux+sass: 132/145] layout: Move "tray" to the top



commit 8ecd7c424e8453a381847bcccf7c6b12c3f119e0
Author: Florian Müllner <fmuellner gnome org>
Date:   Fri Feb 13 00:14:59 2015 +0100

    layout: Move "tray" to the top

 js/ui/layout.js      |   10 +++++-----
 js/ui/messageTray.js |    3 +--
 2 files changed, 6 insertions(+), 7 deletions(-)
---
diff --git a/js/ui/layout.js b/js/ui/layout.js
index 7c0b703..d67d15a 100644
--- a/js/ui/layout.js
+++ b/js/ui/layout.js
@@ -243,8 +243,9 @@ const LayoutManager = new Lang.Class({
                               Lang.bind(this, this._panelBoxChanged));
 
         this.trayBox = new St.Widget({ name: 'trayBox',
+                                       clip_to_allocation: true,
                                        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 +290,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,10 +462,6 @@ const LayoutManager = new Lang.Class({
         this.panelBox.set_size(this.primaryMonitor.width, -1);
 
         this.keyboardIndex = this.primaryIndex;
-
-        this.trayBox.set_position(this.bottomMonitor.x,
-                                  this.bottomMonitor.y + this.bottomMonitor.height);
-        this.trayBox.set_size(this.bottomMonitor.width, -1);
     },
 
     _panelBoxChanged: function() {
diff --git a/js/ui/messageTray.js b/js/ui/messageTray.js
index 4db787a..2a6c031 100644
--- a/js/ui/messageTray.js
+++ b/js/ui/messageTray.js
@@ -1464,7 +1464,6 @@ const MessageTray = new Lang.Class({
         }));
 
         this.actor = new St.Widget({ name: 'notification-container',
-                                     clip_to_allocation: true,
                                      x_expand: true, y_expand: true,
                                      layout_manager: new Clutter.BinLayout() });
         this.actor.connect('key-release-event', Lang.bind(this, this._onNotificationKeyRelease));
@@ -1505,7 +1504,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]