window: plumb get_appearance on x11/wayland systems
Not sure what happened here: presumably a borked merge or something similar, but this commit allows `window:get_appearance` to return the actual appearance value on X11. Even though this plumbs the call through to Wayland, Wayland doesn't provide an equivalent concept so still always return Light, as is mentioned on our docs. closes: #1098
This commit is contained in:
1 parent
f3e5c337fd
commit
da455cafa1
2 files changed
+10
-1
No files matched your search
@@ -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
|
||||
|
||||
|
||||
@@ -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 {
|
||||
|
||||
Reference in new issue
Block a user