Avoid gtk_widget_is_composited() with GTK+4

This commit is contained in:
Paul Cornett
2017-12-19 21:43:16 -08:00
parent 72fe3a1d07
commit 1235c7bb74

View File

@@ -1641,16 +1641,22 @@ bool wxTopLevelWindowGTK::CanSetTransparent()
return wxSystemOptions::GetOptionInt(SYSOPT_TRANSPARENT) != 0; return wxSystemOptions::GetOptionInt(SYSOPT_TRANSPARENT) != 0;
} }
#ifdef __WXGTK4__
return gdk_display_is_composited(gtk_widget_get_display(m_widget)) != 0;
#else
#if GTK_CHECK_VERSION(2,10,0) #if GTK_CHECK_VERSION(2,10,0)
if (wx_is_at_least_gtk2(10)) if (wx_is_at_least_gtk2(10))
{ {
wxGCC_WARNING_SUPPRESS(deprecated-declarations)
return gtk_widget_is_composited(m_widget) != 0; return gtk_widget_is_composited(m_widget) != 0;
wxGCC_WARNING_RESTORE()
} }
else else
#endif // In case of lower versions than gtk+-2.10.0 we could look for _NET_WM_CM_Sn ourselves #endif // In case of lower versions than gtk+-2.10.0 we could look for _NET_WM_CM_Sn ourselves
{ {
return false; return false;
} }
#endif
#if 0 // Don't be optimistic here for the sake of wxAUI #if 0 // Don't be optimistic here for the sake of wxAUI
int opcode, event, error; int opcode, event, error;