aboutsummaryrefslogtreecommitdiff
path: root/src/app
diff options
context:
space:
mode:
authorakbash <akbash@herdr.dev>2026-08-06 17:38:20 +0300
committerGitHub <noreply@github.com>2026-08-06 17:38:20 +0300
commit3825c0c30099dbe4cf19627b0525ce09f6580995 (patch)
tree7c2387374cc9150eaad170793bba0e0baa0a4068 /src/app
parentfae0b2365782c59a068fa32ee441afa64626de52 (diff)
fix(theme): refresh host appearance on focus (#2417)
* fix(theme): refresh host appearance on focus refs #2416 * fix(input): preserve split appearance replies refs #2416 * fix(input): retain fragmented appearance reports refs #2416 --------- Co-authored-by: akbash-bot <300245827+akbash-bot@users.noreply.github.com> Co-authored-by: Can Celik <ogulcancelik@gmail.com>
Diffstat (limited to 'src/app')
-rw-r--r--src/app/runtime.rs2
-rw-r--r--src/app/theme_sync.rs9
2 files changed, 11 insertions, 0 deletions
diff --git a/src/app/runtime.rs b/src/app/runtime.rs
index e05b9599..49420381 100644
--- a/src/app/runtime.rs
+++ b/src/app/runtime.rs
@@ -233,6 +233,8 @@ impl App {
changes_view
}
crate::raw_input::RawInputEvent::OuterFocusGained => {
+ #[cfg(not(windows))]
+ self.query_host_terminal_appearance();
self.send_outer_focus_event(crate::ghostty::FocusEvent::Gained);
if self.state.redraw_on_focus_gained {
self.request_repaint();
diff --git a/src/app/theme_sync.rs b/src/app/theme_sync.rs
index 32716ced..6bf06685 100644
--- a/src/app/theme_sync.rs
+++ b/src/app/theme_sync.rs
@@ -1,6 +1,15 @@
use super::App;
impl App {
+ #[cfg(not(windows))]
+ pub(super) fn query_host_terminal_appearance(&self) {
+ use std::io::Write;
+
+ let _ = std::io::stdout()
+ .write_all(crate::terminal_theme::HOST_COLOR_SCHEME_QUERY_SEQUENCE.as_bytes());
+ let _ = std::io::stdout().flush();
+ }
+
pub(super) fn query_host_terminal_theme(&self) {
use std::io::Write;