Resizing new windows using Python callbacks

This visitrc file resizes all new windows, created via the AddWindow command, to 1024x768 pixels. If you do not like VisIt's default 1:1 aspect ratio for new vis windows, installing a Python callback such as this one could be helpful.

def onAddWindow():
    UndoView() # Something to force a sync so state we get is valid
    ga = GetGlobalAttributes()
    ResizeWindow(ga.windows[ga.activeWindow], 1024, 768)

RegisterCallback("AddWindowRPC", onAddWindow)