set wallpaper icon red if wallpaper removed (#5533)

Signed-off-by: si458 <simonsmith5521@gmail.com>
This commit is contained in:
Simon Smith
2023-11-11 02:36:03 +00:00
committed by GitHub
parent 12c3e4ee53
commit 5c527c4632
3 changed files with 9 additions and 1 deletions

View File

@@ -1356,11 +1356,13 @@ function handleServerCommand(data) {
child.stdout.str = ''; child.stdout.on('data', function (c) { this.str += c.toString(); });
child.stderr.on('data', function () { });
child.waitExit();
mesh.SendCommand({ action: 'msg', type: 'deskBackground', sessionid: data.sessionid, data: (current != '' ? "" : require('MeshAgent')._wallpaper), });
} else {
var id = require('user-sessions').consoleUid();
var current = require('linux-gnome-helpers').getDesktopWallpaper(id);
if (current != '/dev/null') { require('MeshAgent')._wallpaper = current; }
require('linux-gnome-helpers').setDesktopWallpaper(id, current != '/dev/null' ? undefined : require('MeshAgent')._wallpaper);
mesh.SendCommand({ action: 'msg', type: 'deskBackground', sessionid: data.sessionid, data: (current != '/dev/null' ? "" : require('MeshAgent')._wallpaper), });
}
} catch (ex) {
sendConsoleText(ex);