Skip to content

fix: Single instance - present existing window on reactivation#213

Open
ptcodes wants to merge 1 commit intoCachyOS:developfrom
ptcodes:fix/use-the-current-window
Open

fix: Single instance - present existing window on reactivation#213
ptcodes wants to merge 1 commit intoCachyOS:developfrom
ptcodes:fix/use-the-current-window

Conversation

@ptcodes
Copy link
Copy Markdown
Contributor

@ptcodes ptcodes commented Apr 3, 2026

When a second instance of the application was launched, GTK correctly routed the activate signal to the already-running instance, but connect_activate unconditionally called build_ui, creating a second window. Additionally, build_ui calls systemd_units::refresh_cache() which blocks the GTK main thread on D-Bus I/O, causing the first instance to hang.

Check if G_HELLO_WINDOW is already set in connect_activate and call window.present() to raise the existing window instead of rebuilding the UI.

Fixes #211

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

App breaking bug when changing language

1 participant