Gtk.Widget.prototype.is_composited

function is_composited():Boolean {
    // Gjs wrapper for gtk_widget_is_composited()
}

Whether widget can rely on having its alpha channel drawn correctly. On X11 this function returns whether a compositing manager is running for widget's screen.

Please note that the semantics of this call will change in the future if used on a widget that has a composited window in its hierarchy (as set by Gdk.set_composited).

Since 2.10

Returns

true if the widget can rely on its alpha channel being drawn correctly.