slint-ui / slint

Slint is a declarative GUI toolkit to build native user interfaces for Rust, C++, or JavaScript apps.
https://slint.dev
Other
16.93k stars 566 forks source link

Skia renderer panics when UAC shows. #2707

Closed Berrysoft closed 1 year ago

Berrysoft commented 1 year ago

The skia renderer panics when a UAC dialog shows.

thread 'main' panicked at 'Error presenting d3d swap chain: 87a0001', C:\Users\Straw\.cargo\registry\src\github.com-1ecc6299db9ec823\i-slint-renderer-skia-1.0.2\d3d_surface.rs:168:13

I don't know why, maybe it should just fail there when UAC shows:)

tronical commented 1 year ago

You’re right, panic is not a good option here. It might be safe to ignore when this happens.

tronical commented 1 year ago

The error code is DXGI_STATUS_OCCLUDED, which means we should try again later and ignore this, indeed.

tronical commented 1 year ago

Fixed in https://github.com/slint-ui/slint/commit/5d641a17f6628d83a4057551bbb1ece64582758a