X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/44353523d85ba44f62bad4ab7b27a14001d4b1ae..dde4740fe1dddbb2738a0afd054f493cb0dd67d1:/src/unix/utilsx11.cpp diff --git a/src/unix/utilsx11.cpp b/src/unix/utilsx11.cpp index 012b53114e..ec9e3cb1f6 100644 --- a/src/unix/utilsx11.cpp +++ b/src/unix/utilsx11.cpp @@ -65,12 +65,15 @@ static bool IsMapped(Display *display, Window window) // Suspends X11 errors. Used when we expect errors but they are not fatal // for us. +extern "C" { + static int wxX11ErrorsSuspender_handler(Display*, XErrorEvent*) { return 0; } +} class wxX11ErrorsSuspender { public: wxX11ErrorsSuspender(Display *d) : m_display(d) { - m_old = XSetErrorHandler(handler); + m_old = XSetErrorHandler(wxX11ErrorsSuspender_handler); } ~wxX11ErrorsSuspender() { @@ -81,7 +84,6 @@ public: private: Display *m_display; int (*m_old)(Display*, XErrorEvent *); - static int handler(Display *, XErrorEvent *) { return 0; } };