use derived window instead of main window