Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)
at devShellTools-shell 56 lines 2.8 kB view raw
1diff --git a/decoration.js b/decoration.js 2index d1ff3dd..ff4193f 100644 3--- a/decoration.js 4+++ b/decoration.js 5@@ -223,7 +223,7 @@ var Decoration = class { 6 7 let winId = this._guessWindowXID(win); 8 9- let xprops = GLib.spawn_command_line_sync(`xprop -id ${winId}`); 10+ let xprops = GLib.spawn_command_line_sync(`@xprop@ -id ${winId}`); 11 if (!xprops[0]) { 12 Utils.log_debug(`Unable to determine windows '${win.get_title()}' original state`); 13 return win._noTitleBarOriginalState = WindowState.UNKNOWN; 14@@ -237,7 +237,7 @@ var Decoration = class { 15 let prop = '_MOTIF_WM_HINTS'; 16 let value = '0x2, 0x0, %s, 0x0, 0x0'.format(hide ? '0x2' : '0x1'); 17 18- GLib.spawn_command_line_sync(`xprop -id ${windId} -f ${prop} 32c -set ${prop} "${value}"`); 19+ GLib.spawn_command_line_sync(`@xprop@ -id ${windId} -f ${prop} 32c -set ${prop} "${value}"`); 20 if (!hide && !win.titlebar_is_onscreen()) { 21 Utils.log_debug(`Shoving titlebar onscreen for window '${win.get_title()}'`); 22 win.shove_titlebar_onscreen(); 23@@ -354,7 +354,7 @@ var Decoration = class { 24 let act = win.get_compositor_private(); 25 let xwindow = act && act['x-window']; 26 if (xwindow) { 27- let xwininfo = GLib.spawn_command_line_sync('xwininfo -children -id 0x%x'.format(xwindow)); 28+ let xwininfo = GLib.spawn_command_line_sync('@xwininfo@ -children -id 0x%x'.format(xwindow)); 29 if (xwininfo[0]) { 30 let str = ByteArray.toString(xwininfo[1]); 31 32@@ -384,7 +384,7 @@ var Decoration = class { 33 // Try enumerating all available windows and match the title. Note that this 34 // may be necessary if the title contains special characters and `x-window` 35 // is not available. 36- let result = GLib.spawn_command_line_sync('xprop -root _NET_CLIENT_LIST'); 37+ let result = GLib.spawn_command_line_sync('@xprop@ -root _NET_CLIENT_LIST'); 38 if (result[0]) { 39 let str = ByteArray.toString(result[1]); 40 41@@ -395,7 +395,7 @@ var Decoration = class { 42 43 // For each window ID, check if the title matches the desired title. 44 for (var i = 0; i < windowList.length; ++i) { 45- let cmd = 'xprop -id "' + windowList[i] + '" _NET_WM_NAME _NO_TITLE_BAR_ORIGINAL_STATE'; 46+ let cmd = '@xprop@ -id "' + windowList[i] + '" _NET_WM_NAME _NO_TITLE_BAR_ORIGINAL_STATE'; 47 let result = GLib.spawn_command_line_sync(cmd); 48 49 if (result[0]) { 50@@ -455,4 +455,4 @@ var Decoration = class { 51 let styleContent = this._updateUserStyles(); 52 GLib.file_set_contents(this._userStylesPath, styleContent); 53 } 54-} 55\ No newline at end of file 56+}