Skip to content

[pull] dev from tauri-apps:dev - #408

Merged
pull[bot] merged 2 commits into
code:devfrom
tauri-apps:dev
Aug 12, 2026
Merged

[pull] dev from tauri-apps:dev#408
pull[bot] merged 2 commits into
code:devfrom
tauri-apps:dev

Conversation

@pull

@pull pull Bot commented Aug 12, 2026

Copy link
Copy Markdown

See Commits and Changes for more details.


Created by pull[bot] (v2.0.0-alpha.4)

Can you help keep this open source service alive? 💖 Please sponsor : )

Legend-Master and others added 2 commits August 12, 2026 15:15
…15630)

* fix(runtime-wry): query monitors on main thread from runtime handle

WryHandle::primary_monitor, monitor_from_point and available_monitors
read the event loop's window target directly on the calling thread. That
window target is not thread safe, so calling these functions from a
background thread races with the UI thread and can segfault or corrupt
the heap.

Route the three queries through the event loop like cursor_position
already does, so the window target is only accessed on the main thread.

Closes #15170

* refactor(runtime-wry): use event_loop_window_getter! for monitor queries

Reuse the existing event_loop_window_getter! macro (as cursor_position does)
instead of hand-rolling the channel + send_user_message boilerplate in
primary_monitor, monitor_from_point and available_monitors. These methods
return bare Option/Vec, so a small closure absorbs the macro's internal `?`.

* Revert "refactor(runtime-wry): use event_loop_window_getter! for monitor queries"

This reverts commit fc2078b.

* fix(runtime-wry): return no monitors when event loop send fails

If send_user_message errors the event loop will never reply, so recv()
would block the calling thread forever. Return None / an empty Vec on a
send error instead of waiting.

* return results

* fix mock

---------

Co-authored-by: Tony <68118705+Legend-Master@users.noreply.github.com>
Co-authored-by: Tony <legendmastertony@gmail.com>
@pull pull Bot locked and limited conversation to collaborators Aug 12, 2026
@pull pull Bot added the ⤵️ pull label Aug 12, 2026
@pull
pull Bot merged commit d727d63 into code:dev Aug 12, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants