fix: expose display compositor availability

This commit is contained in:
Kevin Yue committed 2026-08-09 15:37:38 +08:00
1 parent fb82bb4b8d
commit 2910870371
1 file changed
+5
+5
View File
@@ -7,6 +7,11 @@ pub enum WindowTypeHint {
Utility,
}
#[cfg(any(target_os = "linux", target_os = "freebsd", target_os = "openbsd"))]
pub fn is_screen_composited() -> bool {
gtk::gdk::Screen::default().is_some_and(|screen| screen.is_composited())
}
#[cfg(any(target_os = "linux", target_os = "freebsd", target_os = "openbsd"))]
pub fn set_window_type_hint(window: &WebviewWindow, hint: WindowTypeHint) -> anyhow::Result<()> {
use gtk::{gdk, traits::GtkWindowExt};