aboutsummaryrefslogtreecommitdiff
path: root/src/client/shell/input.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/client/shell/input.rs')
-rw-r--r--src/client/shell/input.rs22
1 files changed, 14 insertions, 8 deletions
diff --git a/src/client/shell/input.rs b/src/client/shell/input.rs
index dd7bf87d..41a9f64c 100644
--- a/src/client/shell/input.rs
+++ b/src/client/shell/input.rs
@@ -267,16 +267,22 @@ impl ClientShellState {
RawInputEvent::HostDefaultColor {
kind: crate::terminal_theme::DefaultColorKind::Background,
color,
- } if !self.host_appearance_explicit => {
- let appearance = color.inferred_appearance();
- self.host_appearance = Some(appearance);
- if self.config.theme_runtime.auto_switch {
- self.config.palette = crate::app::client_palette_for_appearance(
- &self.config.theme_runtime,
- appearance,
- );
+ } => {
+ if self.host_background != Some(color) {
+ self.host_background = Some(color);
outcome.repaint = true;
}
+ if !self.host_appearance_explicit {
+ let appearance = color.inferred_appearance();
+ self.host_appearance = Some(appearance);
+ if self.config.theme_runtime.auto_switch {
+ self.config.palette = crate::app::client_palette_for_appearance(
+ &self.config.theme_runtime,
+ appearance,
+ );
+ outcome.repaint = true;
+ }
+ }
}
RawInputEvent::HostDefaultColor { .. }
| RawInputEvent::HostPaletteColors { .. }