diff --git a/docs/changelog.md b/docs/changelog.md index 80845a5d3..0813d8099 100644 --- a/docs/changelog.md +++ b/docs/changelog.md @@ -24,6 +24,7 @@ As features stabilize some brief notes about them will accumulate here. * Changed: X11: we now allow matching visuals with >= 8 bits per rgb value. Previously, we only matched exactly 8 bits. This improve compatibility with systems that have the COMPOSITE extension disabled. Thanks to [@shizeeg](https://github.com/shizeeg)! [#1083](https://github.com/wez/wezterm/pull/1083) * Fixed: macOS: `send_composed_key_when_left_alt_is_pressed` and `send_composed_key_when_right_alt_is_pressed` are now respected when `use_ime=true`. Thanks to [@jakelinnzy](https://github.com/jakelinnzy)! [#1096](https://github.com/wez/wezterm/pull/1096) * Fixed: X11: jittery resize with some window managers [#1051](https://github.com/wez/wezterm/issues/1051) +* Fixed: X11: [window:get_appearance](config/lua/window/get_appearance.md) now actually returns Dark when the theme is dark. [#1098](https://github.com/wez/wezterm/issues/1098) ### 20210814-124438-54e29167 diff --git a/window/src/os/x_and_wayland.rs b/window/src/os/x_and_wayland.rs index bbb405a0f..641e751dd 100644 --- a/window/src/os/x_and_wayland.rs +++ b/window/src/os/x_and_wayland.rs @@ -7,7 +7,7 @@ use crate::os::wayland::connection::WaylandConnection; use crate::os::wayland::window::WaylandWindow; use crate::os::x11::connection::XConnection; use crate::os::x11::window::XWindow; -use crate::{Clipboard, MouseCursor, Rect, ScreenPoint, WindowEvent, WindowOps}; +use crate::{Appearance, Clipboard, MouseCursor, Rect, ScreenPoint, WindowEvent, WindowOps}; use async_trait::async_trait; use config::ConfigHandle; use promise::*; @@ -121,6 +121,14 @@ impl ConnectionOps for Connection { Self::Wayland(w) => w.run_message_loop(), } } + + fn get_appearance(&self) -> Appearance { + match self { + Self::X11(x) => x.get_appearance(), + #[cfg(feature = "wayland")] + Self::Wayland(w) => w.get_appearance(), + } + } } impl Window {