diff --git a/js/ui/messageTray.js b/js/ui/messageTray.js index 0ba3e6238..c87a2983c 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 38339b8f9..87b4b7431 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 f9ab4e9cb..304ef349f 100644 --- a/js/ui/screenShield.js +++ b/js/ui/screenShield.js @@ -592,7 +592,7 @@ const ScreenShield = new Lang.Class({ fadeFactor: 1 }); this._shortLightbox.connect('shown', Lang.bind(this, this._onShortLightboxShown)); - 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 13a2bd416..b0d342b9e 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)); },