mirror of
https://github.com/Ylianst/MeshAgent
synced 2025-12-16 00:03:45 +00:00
Fixed bug where if you login from login screen, the resulting privacy bar doesn't close when you disconnect KVM
This commit is contained in:
File diff suppressed because one or more lines are too long
@@ -183,8 +183,8 @@ function x_notifybar_check(title)
|
|||||||
.createEvent('close')
|
.createEvent('close')
|
||||||
.addMethod('close', function close()
|
.addMethod('close', function close()
|
||||||
{
|
{
|
||||||
this.removeListener('changed', this._changed);
|
require('user-sessions').removeListener('changed', this._changed);
|
||||||
this._close2()
|
this._close2();
|
||||||
});
|
});
|
||||||
ret._changed = function _changed()
|
ret._changed = function _changed()
|
||||||
{
|
{
|
||||||
@@ -192,7 +192,10 @@ function x_notifybar_check(title)
|
|||||||
var uid = require('user-sessions').consoleUid();
|
var uid = require('user-sessions').consoleUid();
|
||||||
if (uid >= that.min)
|
if (uid >= that.min)
|
||||||
{
|
{
|
||||||
that._close2 = function () { this.child.kill(); };
|
that._close2 = function ()
|
||||||
|
{
|
||||||
|
this.child.kill();
|
||||||
|
};
|
||||||
var xinfo = require('monitor-info').getXInfo(uid);
|
var xinfo = require('monitor-info').getXInfo(uid);
|
||||||
that.child = require('child_process').execFile(process.execPath, [process.execPath.split('/').pop(), '-b64exec', script], { uid: uid, env: xinfo.exportEnv() });
|
that.child = require('child_process').execFile(process.execPath, [process.execPath.split('/').pop(), '-b64exec', script], { uid: uid, env: xinfo.exportEnv() });
|
||||||
that.child.parent = that;
|
that.child.parent = that;
|
||||||
@@ -203,7 +206,10 @@ function x_notifybar_check(title)
|
|||||||
};
|
};
|
||||||
ret._changed.self = ret;
|
ret._changed.self = ret;
|
||||||
require('user-sessions').on('changed', ret._changed);
|
require('user-sessions').on('changed', ret._changed);
|
||||||
ret._close2 = function _close2() { this.emit('close'); };
|
ret._close2 = function _close2()
|
||||||
|
{
|
||||||
|
this.emit('close');
|
||||||
|
};
|
||||||
return (ret);
|
return (ret);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -310,13 +316,13 @@ function x_notifybar(title)
|
|||||||
try
|
try
|
||||||
{
|
{
|
||||||
ws = m[0].display.getCurrentWorkspace();
|
ws = m[0].display.getCurrentWorkspace();
|
||||||
|
this.notifybar.workspaces[ws] = true;
|
||||||
|
this.createBars(m);
|
||||||
}
|
}
|
||||||
catch(wex)
|
catch(wex)
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
this.notifybar.workspaces[ws] = true;
|
|
||||||
this.createBars(m);
|
|
||||||
m[0].display._notifyBar = this.notifybar;
|
m[0].display._notifyBar = this.notifybar;
|
||||||
m[0].display.on('workspaceChanged', function (w)
|
m[0].display.on('workspaceChanged', function (w)
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in New Issue
Block a user