wxAdoptedWindow::wxAdoptedWindow(WXWindow window)
{
- m_mainWidget = window;
+ m_mainWindow = window;
}
wxAdoptedWindow::~wxAdoptedWindow()
int parentOffset = 0;
old = XSetErrorHandler(ErrorHandler);
- 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)
{
XSetErrorHandler(old);
return TRUE;
*/
for (each=0; each<numchildren; each++)
{
- XGetWindowAttributes((Display*) newParent->GetXDisplay(),
- children[each], &xwa);
+ XGetWindowAttributes( wxGlobalDisplay(),
+ children[each], &xwa);
fprintf(stderr,
"Reparenting child at offset %d and position %d, %d.\n",
parentOffset, parentOffset+xwa.x, parentOffset+xwa.y);
- XReparentWindow((Display*) newParent->GetXDisplay(),
- children[each], (Window) newParent->GetXWindow(),
- xwa.x, xwa.y);
+ XReparentWindow( wxGlobalDisplay(),
+ children[each], (Window) newParent->GetMainWindow(),
+ xwa.x, xwa.y);
}
}
sm_exactMatch = exactMatch;
sm_name = windowName;
- Display* display = (Display*) newParent->GetXDisplay() ;
+ Display* display = wxGlobalDisplay();
XSelectInput(display,
RootWindowOfScreen(DefaultScreenOfDisplay(display)),
SubstructureNotifyMask);