[gnome-shell/wip/wayland: 363/376] Replace GnomeIdleMonitor with MetaIdleMonitor



commit 62ad227f1debd6a7c15ee34c02229e06659464aa
Author: Giovanni Campagna <gcampagn redhat com>
Date:   Wed Aug 14 15:47:27 2013 +0200

    Replace GnomeIdleMonitor with MetaIdleMonitor
    
    Now that GnomeIdleMonitor is a DBus API for mutter, we need to
    use own in-process thing, to avoid dead locks.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=706005

 js/ui/messageTray.js    |    2 +-
 js/ui/pointerWatcher.js |    3 ++-
 js/ui/screenShield.js   |    2 +-
 js/ui/unlockDialog.js   |    3 ++-
 4 files changed, 6 insertions(+), 4 deletions(-)
---
diff --git a/js/ui/messageTray.js b/js/ui/messageTray.js
index ce9802e..bfe1356 100644
--- a/js/ui/messageTray.js
+++ b/js/ui/messageTray.js
@@ -1685,7 +1685,7 @@ const MessageTray = new Lang.Class({
 
         this._userActiveWhileNotificationShown = false;
 
-        this.idleMonitor = new GnomeDesktop.IdleMonitor();
+        this.idleMonitor = Meta.IdleMonitor.get_core();
 
         this._grabHelper = new GrabHelper.GrabHelper(this.actor,
                                                      { keybindingMode: Shell.KeyBindingMode.MESSAGE_TRAY });
diff --git a/js/ui/pointerWatcher.js b/js/ui/pointerWatcher.js
index 38339b8..87b4b74 100644
--- a/js/ui/pointerWatcher.js
+++ b/js/ui/pointerWatcher.js
@@ -2,6 +2,7 @@
 
 const Lang = imports.lang;
 const Mainloop = imports.mainloop;
+const Meta = imports.gi.Meta;
 const GnomeDesktop = imports.gi.GnomeDesktop;
 const Shell = imports.gi.Shell;
 
@@ -41,7 +42,7 @@ const PointerWatcher = new Lang.Class({
     Name: 'PointerWatcher',
 
     _init: function() {
-        this._idleMonitor = new GnomeDesktop.IdleMonitor();
+        this._idleMonitor = Meta.IdleMonitor.get_core();
         this._idleMonitor.add_idle_watch(IDLE_TIME, Lang.bind(this, this._onIdleMonitorBecameIdle));
         this._idle = this._idleMonitor.get_idletime() > IDLE_TIME;
         this._watches = [];
diff --git a/js/ui/screenShield.js b/js/ui/screenShield.js
index 942f3eb..e9c2665 100644
--- a/js/ui/screenShield.js
+++ b/js/ui/screenShield.js
@@ -586,7 +586,7 @@ const ScreenShield = new Lang.Class({
                                                  fadeFactor: 1 });
         this._lightbox.connect('shown', Lang.bind(this, this._onLightboxShown));
 
-        this.idleMonitor = new GnomeDesktop.IdleMonitor();
+        this.idleMonitor = Meta.IdleMonitor.get_core();
     },
 
     _createBackground: function(monitorIndex) {
diff --git a/js/ui/unlockDialog.js b/js/ui/unlockDialog.js
index 13a2bd4..b0d342b 100644
--- a/js/ui/unlockDialog.js
+++ b/js/ui/unlockDialog.js
@@ -9,6 +9,7 @@ const GLib = imports.gi.GLib;
 const GnomeDesktop = imports.gi.GnomeDesktop;
 const Gtk = imports.gi.Gtk;
 const Lang = imports.lang;
+const Meta = imports.gi.Meta;
 const Signals = imports.signals;
 const Shell = imports.gi.Shell;
 const St = imports.gi.St;
@@ -80,7 +81,7 @@ const UnlockDialog = new Lang.Class({
 
         Main.ctrlAltTabManager.addGroup(this.actor, _("Unlock Window"), 'dialog-password-symbolic');
 
-        this._idleMonitor = new GnomeDesktop.IdleMonitor();
+        this._idleMonitor = Meta.IdleMonitor.get_core();
         this._idleWatchId = this._idleMonitor.add_idle_watch(IDLE_TIMEOUT * 1000, Lang.bind(this, 
this._escape));
     },
 


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