X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/61c18e1a3df26176d3eb996a37d6f8c58075144b..ba67d647e86150b88d5a6781460251920fb92c83:/src/gtk/utilsgtk.cpp diff --git a/src/gtk/utilsgtk.cpp b/src/gtk/utilsgtk.cpp index e337be9792..93b8f02790 100644 --- a/src/gtk/utilsgtk.cpp +++ b/src/gtk/utilsgtk.cpp @@ -48,6 +48,8 @@ #if wxUSE_DETECT_SM #include "X11/Xlib.h" #include "X11/SM/SMlib.h" + + #include "wx/unix/utilsx11.h" #endif //----------------------------------------------------------------------------- @@ -242,17 +244,7 @@ wxTimerImpl *wxGUIAppTraits::CreateTimerImpl(wxTimer *timer) #if wxUSE_DETECT_SM static wxString GetSM() { - class Dpy - { - public: - Dpy() { m_dpy = XOpenDisplay(NULL); } - ~Dpy() { if ( m_dpy ) XCloseDisplay(m_dpy); } - - operator Display *() const { return m_dpy; } - private: - Display *m_dpy; - } dpy; - + wxX11Display dpy; if ( !dpy ) return wxEmptyString;