Desktop: Fix minimize/restore animations on Windows (#3492)

fix minimize animation on win
This commit is contained in:
Timon
2025-12-18 15:53:36 +00:00
committed by GitHub
parent 14b8cdf4cb
commit 6f087eb981
4 changed files with 53 additions and 3 deletions
+7
View File
@@ -12,6 +12,9 @@ pub(crate) trait NativeWindow {
fn init() {}
fn configure(attributes: WindowAttributes, event_loop: &dyn ActiveEventLoop) -> WindowAttributes;
fn new(window: &dyn WinitWindow, app_event_scheduler: AppEventScheduler) -> Self;
fn can_render(&self) -> bool {
true
}
fn update_menu(&self, _entries: Vec<MenuItem>) {}
fn hide(&self) {}
fn hide_others(&self) {}
@@ -85,6 +88,10 @@ impl Window {
self.winit_window.pre_present_notify();
}
pub(crate) fn can_render(&self) -> bool {
self.native_handle.can_render()
}
pub(crate) fn surface_size(&self) -> winit::dpi::PhysicalSize<u32> {
self.winit_window.surface_size()
}