added gtk.tlw.can-set-transparency system option (replaces patch 1527017)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@45187 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -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:
|
||||
|
||||
|
@@ -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}
|
||||
|
@@ -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))
|
||||
{
|
||||
|
Reference in New Issue
Block a user