From b1a583692c95546986ba455fcfdad3d33671e4cf Mon Sep 17 00:00:00 2001 From: Simon Rettberg Date: Fri, 21 Jul 2023 17:33:12 +0200 Subject: [vmware-common] Polish xscreensaver ungrab hook a bit, avoid OfficeKey Let's click on the (hopefully empty) desktop after hiding VMware to release the mouse grab, instead of sending the VMware release key-combo, which also is the "Office Key" on Windows 10. --- .../data/opt/openslx/xscreensaver/ungrab.d/vmware | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) (limited to 'core/modules/vmware-common') diff --git a/core/modules/vmware-common/data/opt/openslx/xscreensaver/ungrab.d/vmware b/core/modules/vmware-common/data/opt/openslx/xscreensaver/ungrab.d/vmware index c411bfec..66e5eed4 100755 --- a/core/modules/vmware-common/data/opt/openslx/xscreensaver/ungrab.d/vmware +++ b/core/modules/vmware-common/data/opt/openslx/xscreensaver/ungrab.d/vmware @@ -4,28 +4,28 @@ wfile="/run/user/$(id -u)/vmwins" if [ "$1" = "pre" ]; then # Find all vmware windows currently visible - WINDOWS=$(xdotool search --onlyvisible --class vmplayer) + WINDOWS="$( xdotool search --onlyvisible --class vmplayer )" [ -z "$WINDOWS" ] && exit 0 for window in $WINDOWS; do - xdotool windowminimize $window + xdotool windowminimize "$window" echo "$window" >> "$wfile" # Remember for later done # move mouse pointer around to avoid some problems with ghost clicks - # also this resets the idle time durr hurr - xdotool mousemove 0 0 + xdotool mousemove --sync 0 0 usleep 10000 - xdotool mousemove --polar 0 0 + xdotool click 1 usleep 10000 - xdotool key "ctrl+alt+shift+super" + xdotool mousemove --polar 0 0 usleep 10000 fi if [ "$1" = "post" ]; then # let's restore vmware - WINDOWS=$(sort -u "$wfile") + WINDOWS="$( sort -u "$wfile" )" for window in $WINDOWS; do - xdotool windowmap $window + xdotool windowmap "$window" done + rm -f -- "$wfile" fi exit 0 -- cgit v1.2.3-55-g7522