X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/61c18e1a3df26176d3eb996a37d6f8c58075144b..3e4e0908a7c8217f87d1c7a521f590c1de3bc0f9:/src/gtk/utilsgtk.cpp?ds=sidebyside diff --git a/src/gtk/utilsgtk.cpp b/src/gtk/utilsgtk.cpp index e337be9792..0850010f6e 100644 --- a/src/gtk/utilsgtk.cpp +++ b/src/gtk/utilsgtk.cpp @@ -40,14 +40,13 @@ #include // for WNOHANG #include -#include "glib.h" -#include "gdk/gdk.h" -#include "gtk/gtk.h" -#include "gdk/gdkx.h" +#include +#include #if wxUSE_DETECT_SM - #include "X11/Xlib.h" - #include "X11/SM/SMlib.h" + #include + + #include "wx/unix/utilsx11.h" #endif //----------------------------------------------------------------------------- @@ -242,17 +241,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;