X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/521bf4ff3ef47059265beff5d53c9e1162beb122..ec935ba8415e2bbb3593fa6db85c11303b985d23:/src/x11/reparent.cpp?ds=sidebyside diff --git a/src/x11/reparent.cpp b/src/x11/reparent.cpp index 4d0cb919a9..d6ece8ddce 100644 --- a/src/x11/reparent.cpp +++ b/src/x11/reparent.cpp @@ -27,14 +27,20 @@ #if !wxUSE_NANOX #include "wx/x11/reparent.h" + +#ifndef WX_PRECOMP + #include "wx/log.h" + #include "wx/app.h" + #include "wx/timer.h" +#endif + #include "wx/evtloop.h" -#include "wx/log.h" -#include "wx/app.h" -#include "wx/timer.h" #include "wx/x11/private.h" #include "X11/Xatom.h" +#include "wx/generic/private/timer.h" + /* * wxAdoptedWindow */ @@ -58,13 +64,13 @@ wxAdoptedWindow::~wxAdoptedWindow() static bool Xerror; static Atom WM_STATE = 0; -bool wxReparenter::sm_done = FALSE; +bool wxReparenter::sm_done = false; wxAdoptedWindow* wxReparenter::sm_toReparent = NULL; wxWindow* wxReparenter::sm_newParent = NULL; wxString wxReparenter::sm_name; -bool wxReparenter::sm_exactMatch = FALSE; +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; @@ -127,7 +133,7 @@ bool wxReparenter::Reparent(wxWindow* newParent, wxAdoptedWindow* toReparent) } // Wait for an appropriate window to be created. -// If exactMatch is FALSE, a substring match is OK. +// If exactMatch is false, a substring match is OK. // If windowName is empty, then wait for the next overrideRedirect window. bool wxReparenter::WaitAndReparent(wxWindow* newParent, wxAdoptedWindow* toReparent, const wxString& windowName, @@ -151,7 +157,7 @@ bool wxReparenter::WaitAndReparent(wxWindow* newParent, wxAdoptedWindow* toRepar wxLogDebug(_T("Waiting for window %s"), windowName.c_str()); #endif - sm_done = FALSE; + sm_done = false; wxEventLoop eventLoop; while (!sm_done) @@ -169,7 +175,7 @@ bool wxReparenter::WaitAndReparent(wxWindow* newParent, wxAdoptedWindow* toRepar else { #if wxUSE_TIMER - wxTimer::NotifyTimers(); + wxGenericTimerImpl::NotifyTimers(); wxTheApp->ProcessIdle(); #endif } @@ -212,7 +218,7 @@ bool wxReparenter::ProcessXEvent(WXEvent* event) return sm_done; } } - return FALSE; + return false; } WXWindow wxReparenter::FindAClientWindow(WXWindow window, const wxString& name) @@ -284,4 +290,4 @@ WXWindow wxReparenter::FindAClientWindow(WXWindow window, const wxString& name) } return (WXWindow) result; } -#endif +#endif // !wxUSE_NANOX