]> git.saurik.com Git - wxWidgets.git/blobdiff - src/x11/utils.cpp
Combine two wxImage-to-pixmap creation functions into one.
[wxWidgets.git] / src / x11 / utils.cpp
index 4640a122212e7ce4cc3a8dce3a77ab3265acfbed..6c8fa963cb9d4f3f654dc83dc5118c340dbd41e2 100644 (file)
@@ -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
 // ----------------------------------------------------------------------------