From d48687a0719620cc888072db31bb3814dea400ab Mon Sep 17 00:00:00 2001 From: Paul Cornett Date: Thu, 30 Aug 2007 17:13:20 +0000 Subject: [PATCH] X property data is long for format 32 git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@48461 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- src/gtk/toplevel.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/gtk/toplevel.cpp b/src/gtk/toplevel.cpp index 3b7ad49c96..31baa909df 100644 --- a/src/gtk/toplevel.cpp +++ b/src/gtk/toplevel.cpp @@ -1265,15 +1265,17 @@ bool wxTopLevelWindowGTK::SetTransparent(wxByte alpha) // from which the opacity property is checked from. Window win = wxGetTopmostWindowX11(dpy, GDK_WINDOW_XID (m_widget->window)); - unsigned int opacity = alpha * 0x1010101; // Using pure Xlib to not have a GTK version check mess due to gtk2.0 not having GdkDisplay if (alpha == 0xff) XDeleteProperty(dpy, win, XInternAtom(dpy, "_NET_WM_WINDOW_OPACITY", False)); else + { + long opacity = alpha * 0x1010101L; XChangeProperty(dpy, win, XInternAtom(dpy, "_NET_WM_WINDOW_OPACITY", False), XA_CARDINAL, 32, PropModeReplace, (unsigned char *) &opacity, 1L); + } XSync(dpy, False); return true; } -- 2.45.2