This macro is useful when you normally play in fullscreen, but want to switch over to windowed mode so that WoW stays in focus.
This will avoid the alt-tab disconnect bug, and you can be scanning the auction house with an addon while you doing something else when waiting.
You can also use this macro as a fast and efficient toggle if you want the performance benefits of fullscreen mode but still like the responsive alt-tabbing that a window provides.
The macro will also work if you want the game to run in a maximized window.
Here it is:
/script SetCVar("gxWindow",1-GetCVar("gxWindow"))
/script SetCVar("gxMaximize",1) RestartGx()