diff options
author | Jonathan Bauer | 2017-10-10 17:22:36 +0200 |
---|---|---|
committer | Jonathan Bauer | 2017-10-10 17:22:36 +0200 |
commit | 8ea3fa8f1a051a9b8db6af6acb5ab5c36c3efd29 (patch) | |
tree | c19b6ce152b05e0b9780011fe705121234978471 /core | |
parent | [bwlp] add "raw" bwlp target (diff) | |
download | mltk-8ea3fa8f1a051a9b8db6af6acb5ab5c36c3efd29.tar.gz mltk-8ea3fa8f1a051a9b8db6af6acb5ab5c36c3efd29.tar.xz mltk-8ea3fa8f1a051a9b8db6af6acb5ab5c36c3efd29.zip |
[vmware] force mouse grab for vmplayer
using xdotool by searching for the window and sending ctrl+g shortcut
Diffstat (limited to 'core')
-rw-r--r-- | core/modules/vmware/data/opt/openslx/vmchooser/plugins/vmware/run-virt.include | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/core/modules/vmware/data/opt/openslx/vmchooser/plugins/vmware/run-virt.include b/core/modules/vmware/data/opt/openslx/vmchooser/plugins/vmware/run-virt.include index 181ae44c..ec789367 100644 --- a/core/modules/vmware/data/opt/openslx/vmchooser/plugins/vmware/run-virt.include +++ b/core/modules/vmware/data/opt/openslx/vmchooser/plugins/vmware/run-virt.include @@ -43,6 +43,17 @@ run_plugin() { # For debugging cp "$VM_RUN_FILE" "/tmp/vmware-last-config" + + # HACK: make the mouse disappear + ( + local WINDOWS="$(xdotool search --sync --name '.*VMware.*Player.*')" + isempty WINDOWS && writelog "Could not find any vmplayer windows." + for WINDOW in $WINDOWS; do + xdotool set_desktop_for_window $WINDOW 0 || writelog "Could not move vmplayer to desktop 0" + xdotool windowactivate --sync $WINDOW || writelog "Could not activate vmplayer window" + xdotool key --delay 1000 --clearmodifiers --window $WINDOW ctrl+g || writelog "Could not send ctrl+g to vmplayer window" + done + ) & # HACK: using the modified version of the wrapper script declare -rg VIRTCMD="/opt/openslx/bin/vmplayer" |