Use always pragha_window_get_mainwindow (cwin);