diff options
author | Simon Rettberg | 2023-07-21 17:33:12 +0200 |
---|---|---|
committer | Simon Rettberg | 2023-07-21 17:33:12 +0200 |
commit | b1a583692c95546986ba455fcfdad3d33671e4cf (patch) | |
tree | 272db0296047521ebb291391b77f3aad4f9241d1 | |
parent | [vbox-src] Add xscreensaver ungrab hook for VirtualBox (diff) | |
download | mltk-b1a583692c95546986ba455fcfdad3d33671e4cf.tar.gz mltk-b1a583692c95546986ba455fcfdad3d33671e4cf.tar.xz mltk-b1a583692c95546986ba455fcfdad3d33671e4cf.zip |
[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.
-rwxr-xr-x | core/modules/vmware-common/data/opt/openslx/xscreensaver/ungrab.d/vmware | 16 |
1 files changed, 8 insertions, 8 deletions
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 |