mirror of
https://github.com/rustdesk/rustdesk.git
synced 2026-10-19 16:17:03 +00:00
On Linux, GTK destroys the window on a close request unless prevent-close is on. When the main window is the last active one, onActiveWindowChanged() turns prevent-close off and calls close(), yet onWindowClose() still went on to hide() the destroyed window, and the close event that close() emits re-entered onWindowClose() to save the frame through isMaximized(). The cm and install windows never turn prevent-close on, so their window is always gone by the time onWindowClose() runs. With window_manager before cf4aef05 those calls segfaulted in gtk_window_is_maximized; since then they fail with an unhandled PlatformException(window_destroyed). Return early in both places instead. Other platforms and sub windows keep the old path. Fixes #16512 Claude-Session: https://claude.ai/code/session_01WS1HTjp6UQuG43KEcQPq1R Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>