Hey, I am currently developing an application with Tauri and facing an issue with the set_cursor_visible function. Despite setting it to false, the cursor remains visible at all times, regardless of its position relative to the application window. This issue occurs on both Windows and macOS platforms.
Here's the relevant part of my code:
#[tauri::command]
async fn show_minor_window(app: tauri::AppHandle, content: String) {
if let Some(window) = app.get_window("minor") {
window.show().expect("error while showing window");
let new_size = Size::Physical(PhysicalSize { width: 100, height: 100 });
window.set_size(new_size).expect("error while setting window size");
window.set_cursor_visible(false).expect("error while setting cursor visibility");
}
}
And here is the window configuration from my tauri.conf.json:
"windows": [
{
"label": "main",
"title": "colorOpus",
"width": 600,
"height": 800
},
{
"label": "minor",
"width": 100,
"height": 100,
"resizable": false,
"alwaysOnTop": true,
"skipTaskbar": true,
"decorations": false,
"visible": false,
"transparent": true,
"url": "http://localhost:5173/minor"
}
],
"allowlist": {
"all": true,
"window": {
"all": true,
"setCursorVisible": false
}
}
I have already ensured that the setCursorVisible capability is enabled in the allowlist. I am looking for any insights or suggestions on why set_cursor_visible(false) might not be functioning as expected. Any help would be greatly appreciated!