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
bool wxTopLevelWindowGTK::CanSetTransparent()
{
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);
int opcode, event, error;
// Check for the existence of a RGBA visual instead?
return XQueryExtension(gdk_x11_get_default_xdisplay (),
"Composite", &opcode, &event, &error);