[polari] ChatroomManager: activate the app when getting an handleChannels



commit cb3a42c81c667bd15e041300915b12bde25c4c23
Author: Giovanni Campagna <scampa giovanni gmail com>
Date:   Mon Mar 2 01:47:46 2015 -0800

    ChatroomManager: activate the app when getting an handleChannels
    
    We need to create the first window manually if we're activated by
    dbus from mission control.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=745418

 src/chatroomManager.js |    8 ++++++--
 1 files changed, 6 insertions(+), 2 deletions(-)
---
diff --git a/src/chatroomManager.js b/src/chatroomManager.js
index c170dbc..3190e1d 100644
--- a/src/chatroomManager.js
+++ b/src/chatroomManager.js
@@ -231,14 +231,18 @@ const _ChatroomManager = new Lang.Class({
 
         this._processRequest(context, connection, channels, Lang.bind(this,
             function(channel) {
+                if (!this._app.get_active_window())
+                    this._app.activate();
+
                 let room = this._ensureRoomForChannel(channel);
                 //channel.join_async('', null);
 
                 if (present || this.roomCount == 1)
                     this.setActiveRoom(room);
+
+                if (present)
+                    this._app.get_active_window().present_with_time(time);
             }));
-        if (present)
-            this._app.get_active_window().present_with_time(time);
     },
 
     _addRoom: function(room) {


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