Skip to content

fix: popout/popup windows freeze when not focused#134

Open
Niketion wants to merge 1 commit into
flowsurface-rs:mainfrom
Niketion:fix/popout-window-freeze
Open

fix: popout/popup windows freeze when not focused#134
Niketion wants to merge 1 commit into
flowsurface-rs:mainfrom
Niketion:fix/popout-window-freeze

Conversation

@Niketion

@Niketion Niketion commented Jul 1, 2026

Copy link
Copy Markdown
Contributor

Problem

When a popup/popout window is focused, the main window stops updating visually, and vice versa. This makes the app feel broken when using multiple windows — whichever window isn't focused appears completely frozen.

Root Cause

The app tick/update loop uses iced::window::frames(), which only emits frame events for the currently focused window. When focus moves to a popout, the main window stops receiving frame events and vice versa.

Fix

Replace iced::window::frames() with iced::time::every(Duration::from_millis(16)) (~60fps), which fires on a wall-clock interval independent of window focus. All windows now keep updating regardless of which one is focused.

-        let tick = iced::window::frames().map(Message::Tick);
+        let tick = iced::time::every(Duration::from_millis(16)).map(Message::Tick);

Why 16ms

Matches roughly 60fps, consistent with the previous frame-driven behavior when a window was focused. The interval could be tuned further if needed (e.g. 33ms for ~30fps to reduce CPU usage).

…ndow freezing

When a popup/popout window is focused, the main window stops updating
visually, and vice versa. This happens because iced::window::frames()
only emits frame events for the currently focused window.

Replace it with iced::time::every(16ms) so all windows remain active and
keep updating regardless of focus state.
@Niketion

Niketion commented Jul 1, 2026

Copy link
Copy Markdown
Contributor Author

After discussing this with @akenshaw, we reached the conclusion that this PR is not applicable for now. We’ll reconsider it at a later time

root cause:
rust-windowing/winit#3648

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.

1 participant