X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/c2ca375c5620209d77a88d2d378bdcdedbc82e7e..7112cdd1f3c4730391cf0a562f4d7dcee8676f07:/src/x11/reparent.cpp diff --git a/src/x11/reparent.cpp b/src/x11/reparent.cpp index ac394ccf1a..ff976cd946 100644 --- a/src/x11/reparent.cpp +++ b/src/x11/reparent.cpp @@ -70,7 +70,7 @@ wxWindow* wxReparenter::sm_newParent = NULL; wxString wxReparenter::sm_name; bool wxReparenter::sm_exactMatch = false; -static int ErrorHandler(Display* dpy, XErrorEvent* event) +static int ErrorHandler(Display* WXUNUSED(dpy), XErrorEvent* WXUNUSED(event)) { Xerror = True; return False; @@ -89,12 +89,12 @@ bool wxReparenter::Reparent(wxWindow* newParent, wxAdoptedWindow* toReparent) old = XSetErrorHandler(ErrorHandler); XReparentWindow( wxGlobalDisplay(), - (Window) toReparent->GetMainWindow(), - (Window) newParent->GetMainWindow(), + (Window) toReparent->X11GetMainWindow(), + (Window) newParent->X11GetMainWindow(), 0, 0); if (!XQueryTree( wxGlobalDisplay(), - (Window) toReparent->GetMainWindow(), + (Window) toReparent->X11GetMainWindow(), &returnroot, &returnparent, &children, &numchildren) || Xerror) { @@ -123,7 +123,7 @@ bool wxReparenter::Reparent(wxWindow* newParent, wxAdoptedWindow* toReparent) "Reparenting child at offset %d and position %d, %d.\n", parentOffset, parentOffset+xwa.x, parentOffset+xwa.y); XReparentWindow( wxGlobalDisplay(), - children[each], (Window) newParent->GetMainWindow(), + children[each], (Window) newParent->X11GetMainWindow(), xwa.x, xwa.y); } } @@ -152,11 +152,6 @@ bool wxReparenter::WaitAndReparent(wxWindow* newParent, wxAdoptedWindow* toRepar if (!WM_STATE) WM_STATE = XInternAtom(display, "WM_STATE", False); -#ifdef __WXDEBUG__ - if (!windowName.empty()) - wxLogDebug(_T("Waiting for window %s"), windowName.c_str()); -#endif - sm_done = false; wxEventLoop eventLoop; @@ -192,13 +187,13 @@ bool wxReparenter::ProcessXEvent(WXEvent* event) { if (xevent->type == MapNotify) { - wxLogDebug(_T("Window was mapped")); + wxLogDebug(wxT("Window was mapped")); } if (xevent->type == MapNotify && !xevent->xmap.override_redirect && (client = (Window) FindAClientWindow((WXWindow) xevent->xmap.window, sm_name))) { - wxLogDebug(_T("Found a client window, about to reparent")); + wxLogDebug(wxT("Found a client window, about to reparent")); wxASSERT(sm_toReparent->GetParent() == NULL); sm_toReparent->SetHandle((WXWindow) client); @@ -209,7 +204,7 @@ bool wxReparenter::ProcessXEvent(WXEvent* event) xevent->xmap.override_redirect && xevent->xmap.window) { - wxLogDebug(_T("Found an override redirect window, about to reparent")); + wxLogDebug(wxT("Found an override redirect window, about to reparent")); sm_toReparent->SetHandle((WXWindow) xevent->xmap.window); sm_newParent->AddChild(sm_toReparent); wxASSERT(sm_toReparent->GetParent() == NULL);