[wxGTK] Be pessimistic about transparency being visually shown in CanSetTransparent. With current code

CanSetTransparent will only return TRUE if gtk+ version is at least 2.10 AND there is a running compositing
manager that implements the _NET_WM_CM_Sn EWMH spec addition proposal (at this point only metacity GL based
compositor, afaik). This is for wxAUI to be able to implement dock preview correctly. In general these behaviours
needs some discussion.


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@40193 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Mart Raudsepp 2006-07-19 18:59:03 +00:00
parent 07e497070e
commit 60169b7a51

View File

@ -1349,8 +1349,22 @@ bool wxTopLevelWindowGTK::SetTransparent(wxByte alpha)
bool wxTopLevelWindowGTK::CanSetTransparent()
{
#if GTK_CHECK_VERSION(2,10,0)
if (!gtk_check_version(2,10,0))
{
if (gtk_widget_is_composited (m_widget))
return true;
}
else
#endif // In case of lower versions than gtk+-2.10.0 we could look for _NET_WM_CM_Sn ourselves
{
return false;
}
#if 0 // Don't be optimistic here for the sake of wxAUI
int opcode, event, error;
// Check for the existence of a RGBA visual instead?
return XQueryExtension(gdk_x11_get_default_xdisplay (),
"Composite", &opcode, &event, &error);
#endif
}