You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Panic on Linux when calling set_ignore_cursor_events during app setup. #143
In Tauri v2 on Linux, calling set_ignore_cursor_events() on a window before its underlying native display surface has been realized/mapped causes an unhandled panic inside TAO src/platform_impl/linux/event_loop.rs.
Specifically, TAO's WindowRequest::CursorIgnoreEvents handler attempts to query window.window() (which returns None prior to the window being drawn) and calls .unwrap() on it.
Check window.is_visible() to ensure the window is realized before requesting GTK to ignore cursor events:
This is irrespective of GTK of QT as it originates from tao GTK event loop when tries to fetch the native GDK surface pointer because GTK hasn't finished mapping window surface to display server yet it returns none, causing panic at unwrap() in src/platform_impl/linux/event_loop.rs:457.
From what i understand by reading the tao's code this is a low-level safety bug in tao's GTK implementation on linux as it assumes a created GtkWindow widget always has a initialized GdkWindow surface attached to it
changed the title [-]Panic on Linux when calling set_ignore_cursor_events during app setup (Linux/GTK)[/-][+]Panic on Linux when calling set_ignore_cursor_events during app setup (Linux)[/+]on Sep 17, 2026
changed the title [-]Panic on Linux when calling set_ignore_cursor_events during app setup (Linux)[/-][+]Panic on Linux when calling set_ignore_cursor_events during app setup.[/+]on Sep 17, 2026
Fixed in #147, now on main. The guard lives in pill::set_interactive itself rather than at each call site, so any future caller is covered too.
You're right that it's a bug in tao: it assumes a created GtkWindow always has a GdkWindow attached. Guarding on our side is the practical fix while that stands. Thanks both for the detail here.
Activity
Nurysso commentedon Sep 17, 2026
This is irrespective of GTK of QT as it originates from tao GTK event loop when tries to fetch the native GDK surface pointer because GTK hasn't finished mapping window surface to display server yet it returns none, causing panic at unwrap() in
src/platform_impl/linux/event_loop.rs:457.From what i understand by reading the tao's code this is a low-level safety bug in tao's GTK implementation on linux as it assumes a created GtkWindow widget always has a initialized GdkWindow surface attached to it
[-]Panic on Linux when calling set_ignore_cursor_events during app setup (Linux/GTK)[/-][+]Panic on Linux when calling set_ignore_cursor_events during app setup (Linux)[/+][-]Panic on Linux when calling set_ignore_cursor_events during app setup (Linux)[/-][+]Panic on Linux when calling set_ignore_cursor_events during app setup.[/+]karansinghgit commentedon Sep 22, 2026
Fixed in #147, now on
main. The guard lives inpill::set_interactiveitself rather than at each call site, so any future caller is covered too.You're right that it's a bug in tao: it assumes a created GtkWindow always has a GdkWindow attached. Guarding on our side is the practical fix while that stands. Thanks both for the detail here.