[polari] chatroomManager: Don't use tp timestamp for presenting window



commit 8b742c50d415315ae2ab7a5182751c92b055e810
Author: Florian Müllner <fmuellner gnome org>
Date:   Thu Jun 16 14:42:37 2016 +0200

    chatroomManager: Don't use tp timestamp for presenting window
    
    Translating the timestamp from a telepathy request to an X11
    timestamp is not entirely reliable (not least because we are
    faking TP_USER_ACTION_TIME_CURRENT_TIME due to limitations
    in JS's handling of large numbers), so there's a fair chance
    that a more recent event causes the window manager to deny
    our focus request. We can expect GTK+ to do a better job at
    keeping track of relevant timestamps (including remote calls
    to the org.freedesktop.Application interface), so simply
    activate the application to present the window without an
    explicit timestamp.

 src/chatroomManager.js |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)
---
diff --git a/src/chatroomManager.js b/src/chatroomManager.js
index 1f295df..7cddd98 100644
--- a/src/chatroomManager.js
+++ b/src/chatroomManager.js
@@ -416,7 +416,7 @@ const _ChatroomManager = new Lang.Class({
         let [account, connection,
              channels, satisfied, userTime, context] = arguments;
 
-        let [present, time] = Tp.user_action_time_should_present(userTime);
+        let [present, ] = Tp.user_action_time_should_present(userTime);
 
         this._processRequest(context, connection, channels, Lang.bind(this,
             function(channel) {
@@ -435,7 +435,7 @@ const _ChatroomManager = new Lang.Class({
                     this.setActiveRoom(room);
 
                 if (present)
-                    this._app.get_active_window().present_with_time(time);
+                    this._app.activate();
             }));
     },
 


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