]> git.saurik.com Git - wxWidgets.git/commitdiff
added gtk.tlw.can-set-transparency system option (replaces patch 1527017)
authorVadim Zeitlin <vadim@wxwidgets.org>
Sat, 31 Mar 2007 14:51:10 +0000 (14:51 +0000)
committerVadim Zeitlin <vadim@wxwidgets.org>
Sat, 31 Mar 2007 14:51:10 +0000 (14:51 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@45187 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

docs/changes.txt
docs/latex/wx/sysopt.tex
src/gtk/toplevel.cpp

index 244c410e7f5f59f62b1108650b4674c5387da1b2..b608898d23f4a4b177505753d2cb55c41721c57b 100644 (file)
@@ -109,6 +109,7 @@ wxGTK:
 - wxTopLevelWindow::GetClientSize() returns 0x0 when the window is minimized.
 - Added support for colour cursors (Pascal Monasse).
 - Setting foreground colour of single line wxTextCtrl now works
+- Added gtk.tlw.can-set-transparency system option
 
 wxMac:
 
index cd945711a459e861a1b2db2c4bd0a0138d238832..12b8b11bf8cf6322c62e6316222184c1c2694832 100644 (file)
@@ -33,6 +33,19 @@ Setting this to 0 causes more flicker, but allows applications to paint graphics
 used.}
 \end{twocollist}
 
+\wxheading{GTK}
+
+\twocolwidtha{7cm}
+\begin{twocollist}\itemsep=0pt
+\twocolitem{{\bf Option}}{{\bf Value}}
+\twocolitem{gtk.tlw.can-set-transparent}{\helpref{wxTopLevelWindow::CanSetTransparent()}{wxtoplevelwindowcansettransparent} 
+method normally tries to detect automatically whether transparency for top
+level windows is currently supported, however this may sometimes fail and this
+option allows to override the automatic detection. Setting it to $1$ makes the
+transparency be always available (setting it can still fail, of course) and
+setting it to $0$ makes it always unavailable.}
+\end{twocollist}
+
 \wxheading{Mac}
 
 \twocolwidtha{7cm}
index 7227e4887fff368f4829b65e0132d5043e946b46..f47a53f8b8ff7e4f82611d362e6d4e84447ccf2b 100644 (file)
@@ -33,6 +33,7 @@
 
 #include "wx/gtk/private.h"
 #include "wx/evtloop.h"
+#include "wx/sysopt.h"
 
 #include <gtk/gtk.h>
 #include <gdk/gdkx.h>
@@ -1415,6 +1416,13 @@ bool wxTopLevelWindowGTK::SetTransparent(wxByte alpha)
 
 bool wxTopLevelWindowGTK::CanSetTransparent()
 {
+    // allow to override automatic detection as it's far from perfect
+    static const wxChar *SYSOPT_TRANSPARENT = wxT("gtk.tlw.can-set-transparent");
+    if ( wxSystemOptions::HasOption(SYSOPT_TRANSPARENT) )
+    {
+        return wxSystemOptions::GetOptionInt(SYSOPT_TRANSPARENT) != 0;
+    }
+
 #if GTK_CHECK_VERSION(2,10,0)
     if (!gtk_check_version(2,10,0))
     {