- XReparentWindow((Display*) newParent->GetXDisplay(),
- (Window) toReparent->GetXWindow(),
- (Window) newParent->GetXWindow(),
- 0, 0);
-
- if (!XQueryTree((Display*) newParent->GetXDisplay(),
- (Window) toReparent->GetXWindow(),
- &returnroot, &returnparent,
- &children, &numchildren) || Xerror)
+ XReparentWindow( wxGlobalDisplay(),
+ (Window) toReparent->GetMainWindow(),
+ (Window) newParent->GetMainWindow(),
+ 0, 0);
+
+ if (!XQueryTree( wxGlobalDisplay(),
+ (Window) toReparent->GetMainWindow(),
+ &returnroot, &returnparent,
+ &children, &numchildren) || Xerror)