mirror of
https://github.com/wez/wezterm.git
synced 2024-11-27 12:23:46 +03:00
defer loading background until after rescaling in config reload
render metrics might be adjusted by the scaling logic, so we should load the background after resizing.
This commit is contained in:
parent
f6d8b309c0
commit
d2905d53b1
@ -1553,13 +1553,6 @@ impl TermWindow {
|
||||
self.config = config.clone();
|
||||
self.palette.take();
|
||||
|
||||
self.window_background = reload_background_image(
|
||||
&config,
|
||||
&self.window_background,
|
||||
&self.dimensions,
|
||||
&self.render_metrics,
|
||||
);
|
||||
|
||||
let mux = Mux::get();
|
||||
let window = match mux.get_window(self.mux_window_id) {
|
||||
Some(window) => window,
|
||||
@ -1644,6 +1637,15 @@ impl TermWindow {
|
||||
window.invalidate();
|
||||
}
|
||||
|
||||
// Do this after we've potentially adjusted scaling based on config/padding
|
||||
// and window size
|
||||
self.window_background = reload_background_image(
|
||||
&config,
|
||||
&self.window_background,
|
||||
&self.dimensions,
|
||||
&self.render_metrics,
|
||||
);
|
||||
|
||||
self.invalidate_modal();
|
||||
self.emit_window_event("window-config-reloaded", None);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user