diff --git a/src/gtk/toplevel.cpp b/src/gtk/toplevel.cpp index f300b5ea56..3be043c44e 100644 --- a/src/gtk/toplevel.cpp +++ b/src/gtk/toplevel.cpp @@ -1641,16 +1641,22 @@ bool wxTopLevelWindowGTK::CanSetTransparent() 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 (wx_is_at_least_gtk2(10)) { + wxGCC_WARNING_SUPPRESS(deprecated-declarations) return gtk_widget_is_composited(m_widget) != 0; + wxGCC_WARNING_RESTORE() } else #endif // In case of lower versions than gtk+-2.10.0 we could look for _NET_WM_CM_Sn ourselves { return false; } +#endif #if 0 // Don't be optimistic here for the sake of wxAUI int opcode, event, error;