gtk(wayland): fallback when on-demand mode isn't supported

This shouldn't be a real problem anymore since as of now (May 2025)
all major compositors support at least version 4, but let's do this
just in case.
This commit is contained in:
Leah Amelia Chen
2025-05-30 14:44:29 +02:00
parent 4d18c06804
commit 6fac355363
2 changed files with 11 additions and 1 deletions

View File

@@ -27,6 +27,10 @@ pub fn isSupported() bool {
return c.gtk_layer_is_supported() != 0;
}
pub fn getProtocolVersion() c_uint {
return c.gtk_layer_get_protocol_version();
}
pub fn initForWindow(window: *gtk.Window) void {
c.gtk_layer_init_for_window(@ptrCast(window));
}