|
|
|
@ -61,6 +61,13 @@ async fn move_window<R: Runtime>(window: tauri::Window<R>, position: Position) -
|
|
|
|
|
window.move_window(position)
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
#[cfg(feature = "tray-icon")]
|
|
|
|
|
#[tauri::command]
|
|
|
|
|
async fn move_window_constrained<R: Runtime>(window: tauri::Window<R>, position: Position) -> Result<()> {
|
|
|
|
|
window.move_window_constrained(position)
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
#[cfg(feature = "tray-icon")]
|
|
|
|
|
#[tauri::command]
|
|
|
|
|
fn set_tray_icon_state<R: Runtime>(
|
|
|
|
@ -80,6 +87,8 @@ pub fn init<R: Runtime>() -> TauriPlugin<R> {
|
|
|
|
|
let plugin = plugin::Builder::new("positioner").invoke_handler(tauri::generate_handler![
|
|
|
|
|
move_window,
|
|
|
|
|
#[cfg(feature = "tray-icon")]
|
|
|
|
|
move_window_constrained,
|
|
|
|
|
#[cfg(feature = "tray-icon")]
|
|
|
|
|
set_tray_icon_state
|
|
|
|
|
]);
|
|
|
|
|
|
|
|
|
|