X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/527343602e91d60c65fb7589a6ddcf4683930c78..0b7dce5480b8cf7ce4368122744d853f7a684e34:/src/unix/utilsx11.cpp diff --git a/src/unix/utilsx11.cpp b/src/unix/utilsx11.cpp index 67e641c3cb..efb3be521c 100644 --- a/src/unix/utilsx11.cpp +++ b/src/unix/utilsx11.cpp @@ -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; }