Here is the script I'm currently using to rescue stuck windows - activating them has the nice side-effect of bringing them back to their original Workspace as well.
#!/bin/bash
#
# Resets all Windows after triggering Ubuntu/VirtualBox windowing bug
#
# @todo Filter out windows we don't need, using grep
for window in `wmctrl -l | cut -d " " -f 1`; do
# Debugging
#echo $window
# Looks like doing just one axis doesn't work
wmctrl -i -r $window -b toggle,maximized_vert,maximized_horz
wmctrl -i -r $window -b toggle,maximized_vert,maximized_horz
Here is the script I'm currently using to rescue stuck windows - activating them has the nice side-effect of bringing them back to their original Workspace as well.
#!/bin/bash
#
# Resets all Windows after triggering Ubuntu/VirtualBox windowing bug
#
# @todo Filter out windows we don't need, using grep
for window in `wmctrl -l | cut -d " " -f 1`; do
# Debugging
#echo $window
# Looks like doing just one axis doesn't work maximized_ vert,maximized_ horz maximized_ vert,maximized_ horz
wmctrl -i -r $window -b toggle,
wmctrl -i -r $window -b toggle,
# Activate them as well
wmctrl -R $window
done