1
1
mirror of https://github.com/wez/wezterm.git synced 2024-08-17 02:00:25 +03:00

fix(wayland): ensure repaint event is sent in show

Fix: https://github.com/wez/wezterm/issues/5103
This commit is contained in:
fioncat 2024-04-04 22:42:29 +08:00 committed by Wez Furlong
parent 7554ef6570
commit 1266912629

View File

@ -544,6 +544,17 @@ impl WaylandWindowInner {
return;
}
// If the do_paint function has been called previously, calling it again will not
// trigger the NeedRepaint event. This results in the window not being displayed
// correctly after show is called.
// Therefore, when frame_callback is set to some, it indicates that do_paint has
// been called before. We need to trigger the Repaint event again to ensure the
// window is displayed correctly.
// Fix: https://github.com/wez/wezterm/issues/5103
if self.frame_callback.is_some() {
self.events.dispatch(WindowEvent::NeedRepaint);
}
self.do_paint().unwrap();
}