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
This commit is contained in:
parent
d4f66da793
commit
e0574d2861
@ -1685,7 +1685,7 @@ const MessageTray = new Lang.Class({
|
|||||||
|
|
||||||
this._userActiveWhileNotificationShown = false;
|
this._userActiveWhileNotificationShown = false;
|
||||||
|
|
||||||
this.idleMonitor = new GnomeDesktop.IdleMonitor();
|
this.idleMonitor = Meta.IdleMonitor.get_core();
|
||||||
|
|
||||||
this._grabHelper = new GrabHelper.GrabHelper(this.actor,
|
this._grabHelper = new GrabHelper.GrabHelper(this.actor,
|
||||||
{ keybindingMode: Shell.KeyBindingMode.MESSAGE_TRAY });
|
{ keybindingMode: Shell.KeyBindingMode.MESSAGE_TRAY });
|
||||||
|
@ -2,6 +2,7 @@
|
|||||||
|
|
||||||
const Lang = imports.lang;
|
const Lang = imports.lang;
|
||||||
const Mainloop = imports.mainloop;
|
const Mainloop = imports.mainloop;
|
||||||
|
const Meta = imports.gi.Meta;
|
||||||
const GnomeDesktop = imports.gi.GnomeDesktop;
|
const GnomeDesktop = imports.gi.GnomeDesktop;
|
||||||
const Shell = imports.gi.Shell;
|
const Shell = imports.gi.Shell;
|
||||||
|
|
||||||
@ -41,7 +42,7 @@ const PointerWatcher = new Lang.Class({
|
|||||||
Name: 'PointerWatcher',
|
Name: 'PointerWatcher',
|
||||||
|
|
||||||
_init: function() {
|
_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._idleMonitor.add_idle_watch(IDLE_TIME, Lang.bind(this, this._onIdleMonitorBecameIdle));
|
||||||
this._idle = this._idleMonitor.get_idletime() > IDLE_TIME;
|
this._idle = this._idleMonitor.get_idletime() > IDLE_TIME;
|
||||||
this._watches = [];
|
this._watches = [];
|
||||||
|
@ -592,7 +592,7 @@ const ScreenShield = new Lang.Class({
|
|||||||
fadeFactor: 1 });
|
fadeFactor: 1 });
|
||||||
this._shortLightbox.connect('shown', Lang.bind(this, this._onShortLightboxShown));
|
this._shortLightbox.connect('shown', Lang.bind(this, this._onShortLightboxShown));
|
||||||
|
|
||||||
this.idleMonitor = new GnomeDesktop.IdleMonitor();
|
this.idleMonitor = Meta.IdleMonitor.get_core();
|
||||||
},
|
},
|
||||||
|
|
||||||
_createBackground: function(monitorIndex) {
|
_createBackground: function(monitorIndex) {
|
||||||
|
@ -9,6 +9,7 @@ const GLib = imports.gi.GLib;
|
|||||||
const GnomeDesktop = imports.gi.GnomeDesktop;
|
const GnomeDesktop = imports.gi.GnomeDesktop;
|
||||||
const Gtk = imports.gi.Gtk;
|
const Gtk = imports.gi.Gtk;
|
||||||
const Lang = imports.lang;
|
const Lang = imports.lang;
|
||||||
|
const Meta = imports.gi.Meta;
|
||||||
const Signals = imports.signals;
|
const Signals = imports.signals;
|
||||||
const Shell = imports.gi.Shell;
|
const Shell = imports.gi.Shell;
|
||||||
const St = imports.gi.St;
|
const St = imports.gi.St;
|
||||||
@ -80,7 +81,7 @@ const UnlockDialog = new Lang.Class({
|
|||||||
|
|
||||||
Main.ctrlAltTabManager.addGroup(this.actor, _("Unlock Window"), 'dialog-password-symbolic');
|
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));
|
this._idleWatchId = this._idleMonitor.add_idle_watch(IDLE_TIMEOUT * 1000, Lang.bind(this, this._escape));
|
||||||
},
|
},
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user