Extract X11 Display wrapper class in a private header.
No real changes, just extract a private Dpy class used by wxGTK to a header and rename it to wxX11Display. This will allow reusing it from X11 wxUIActionSimulator implementation in the upcoming commits. git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@65380 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -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;
|
||||
|
||||
|
Reference in New Issue
Block a user