X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/d69225772ad1ff3952a3ee74055dc93f85c13812..3b96fc2f1b64f78bba7c755a5c14f618962f696b:/src/unix/utilsx11.cpp diff --git a/src/unix/utilsx11.cpp b/src/unix/utilsx11.cpp index 26a81cff28..6510b0d3db 100644 --- a/src/unix/utilsx11.cpp +++ b/src/unix/utilsx11.cpp @@ -65,9 +65,13 @@ static bool IsMapped(Display *display, Window window) // Suspends X11 errors. Used when we expect errors but they are not fatal // for us. -extern "C" { +extern "C" +{ + typedef int (*wxX11ErrorHandler)(Display *, XErrorEvent *); + static int wxX11ErrorsSuspender_handler(Display*, XErrorEvent*) { return 0; } } + class wxX11ErrorsSuspender { public: @@ -83,7 +87,7 @@ public: private: Display *m_display; - int (*m_old)(Display*, XErrorEvent *); + wxX11ErrorHandler m_old; };