X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/bd00fe32fb099384c5fdd337e3749ae461ae497f..5ac1d44aa499901b1a2e194292ba7a93112196ae:/src/x11/utils.cpp diff --git a/src/x11/utils.cpp b/src/x11/utils.cpp index 4640a12221..6c8fa963cb 100644 --- a/src/x11/utils.cpp +++ b/src/x11/utils.cpp @@ -153,17 +153,22 @@ void wxBell() } #endif -wxToolkitInfo& wxGUIAppTraits::GetToolkitInfo() +wxPortId wxGUIAppTraits::GetToolkitVersion(int *verMaj, int *verMin) const { - static wxToolkitInfo info; - info.shortName = _T("x11univ"); - info.name = _T("wxX11"); - info.versionMajor = 0; - info.versionMinor = 0; - info.os = wxX11; - return info; + // get X protocol version + Display *display = wxGlobalDisplay(); + if (display) + { + if ( verMaj ) + *verMaj = ProtocolVersion (display); + if ( verMin ) + *verMin = ProtocolRevision (display); + } + + return wxPORT_X11; } + // ---------------------------------------------------------------------------- // display info // ----------------------------------------------------------------------------