diff --git a/agents/meshcore.js b/agents/meshcore.js index 7d3eea05..4f27cdcd 100644 --- a/agents/meshcore.js +++ b/agents/meshcore.js @@ -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); diff --git a/public/images/icon-background-red.png b/public/images/icon-background-red.png new file mode 100644 index 00000000..18337406 Binary files /dev/null and b/public/images/icon-background-red.png differ diff --git a/views/default.handlebars b/views/default.handlebars index 5bb9ae2c..8551e7f0 100644 --- a/views/default.handlebars +++ b/views/default.handlebars @@ -726,7 +726,7 @@ - + @@ -2660,6 +2660,12 @@ x += ''; QH('id_dialogOptions', x); } + } else if (message.type === 'deskBackground') { + if(message.data != "") { + Q('DeskBackgroundButtonImage').src = 'images/icon-background.png'; + }else{ + Q('DeskBackgroundButtonImage').src = 'images/icon-background-red.png'; + } } } } else {