Comment 2 for bug 1514065

Revision history for this message
Jon (jonpad) wrote :

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

    # Activate them as well
    wmctrl -R $window
done