tauri-plugin-desktop-underlay 0.2.1

Tauri plugin for attaching a window to desktop, below icons and above wallpaper.
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
use anyhow::Result;
use gdk::WindowTypeHint;
use gtk::ApplicationWindow;
use gtk::prelude::GtkWindowExt;

/// Set the window as a desktop underlay.
pub(super) unsafe fn set_underlay(gtk_window: ApplicationWindow) -> Result<()> {
    gtk_window.set_type_hint(WindowTypeHint::Desktop);
    Ok(())
}

/// Unset the window from being a desktop underlay.
pub(super) unsafe fn unset_underlay(gtk_window: ApplicationWindow) -> Result<()> {
    gtk_window.set_type_hint(WindowTypeHint::Normal);
    Ok(())
}