]> git.saurik.com Git - wxWidgets.git/blobdiff - src/unix/utilsx11.cpp
fix warnings about hiding virtual wxGraphicsContext::DrawText() overloads by using...
[wxWidgets.git] / src / unix / utilsx11.cpp
index 67e641c3cb5a92061372bcc0581542e803619674..efb3be521c40ca8062297f7d9cf1a6ea717c8869 100644 (file)
@@ -41,7 +41,6 @@
 #endif
 
 // Various X11 Atoms used in this file:
-static Atom _NET_WM_ICON = 0;
 static Atom _NET_WM_STATE = 0;
 static Atom _NET_WM_STATE_FULLSCREEN = 0;
 static Atom _NET_WM_STATE_STAYS_ON_TOP = 0;
@@ -106,10 +105,13 @@ private:
 // Setting icons for window manager:
 // ----------------------------------------------------------------------------
 
+#if wxUSE_IMAGE && !wxUSE_NANOX
+
+static Atom _NET_WM_ICON = 0;
+
 void
 wxSetIconsX11(WXDisplay* display, WXWindow window, const wxIconBundle& ib)
 {
-#if !wxUSE_NANOX
     size_t size = 0;
 
     const size_t numIcons = ib.GetIconCount();
@@ -184,9 +186,9 @@ wxSetIconsX11(WXDisplay* display, WXWindow window, const wxIconBundle& ib)
                          WindowCast(window),
                          _NET_WM_ICON );
     }
-#endif // !wxUSE_NANOX
 }
 
+#endif // wxUSE_IMAGE && !wxUSE_NANOX
 
 // ----------------------------------------------------------------------------
 // Fullscreen mode:
@@ -380,20 +382,20 @@ static bool wxKwinRunning(Display *display, Window rootWnd)
 {
     wxMAKE_ATOM(KWIN_RUNNING, display);
 
-    long *data;
+    unsigned char* data;
     Atom type;
     int format;
     unsigned long nitems, after;
     if (XGetWindowProperty(display, rootWnd,
                            KWIN_RUNNING, 0, 1, False, KWIN_RUNNING,
                            &type, &format, &nitems, &after,
-                           (unsigned char**)&data) != Success)
+                           &data) != Success)
     {
         return false;
     }
 
     bool retval = (type == KWIN_RUNNING &&
-                   nitems == 1 && data && data[0] == 1);
+                   nitems == 1 && data && ((long*)data)[0] == 1);
     XFree(data);
     return retval;
 }