#!/usr/bin/env python

import gobject
import gtk

f = gtk.Window()
f.realize();
f.show()

def resize(f, m):
    print "Window geometry == ", f.window.get_geometry()
    f.window.property_change('VMWARE_FULLSCREEN_MONITORS',
                             'CARDINAL', 32,
                             gtk.gdk.PROP_MODE_REPLACE,
                             m)

def quit_timeout(f):
    print "Window geometry == ", f.window.get_geometry()
    gtk.main_quit()

gobject.timeout_add(1000, lambda w: w.fullscreen(), f)
gobject.timeout_add(2000, lambda w: resize(w, [0, 1]), f)
gobject.timeout_add(3000, lambda w: resize(w, [0]), f)
gobject.timeout_add(4000, lambda w: resize(w, [1]), f)
gobject.timeout_add(5000, lambda w: w.window.property_delete('VMWARE_FULLSCREEN_MONITORS'), f)
gobject.timeout_add(6000, lambda w: w.unfullscreen(), f)
gobject.timeout_add(7000, lambda w: quit_timeout(w), f)

gtk.main()
