Maybe somewhere you have to set a display size. Else the window manager could interpret a size like 0x0 as iconified state.