- // Messes up window management
- // XSetTransientForHint( xdisplay, xwindow, xparent );
+ // Set background to None which will prevent X11 from clearing the
+ // background completely.
+ XSetWindowBackgroundPixmap( xdisplay, xwindow, None );
+
+ if (GetExtraStyle() & wxTOPLEVEL_EX_DIALOG)
+ {
+ if (GetParent() && GetParent()->GetMainWindow())
+ {
+ Window xparentwindow = (Window) GetParent()->GetMainWindow();
+ XSetTransientForHint( xdisplay, xwindow, xparentwindow );
+ }
+ }