1
0
Fork 0
forked from wry/wry

control-center: add clients pane

This commit is contained in:
Julian Orth 2026-02-27 14:56:32 +01:00
parent 78d59927ee
commit aefd1fbbdb
6 changed files with 644 additions and 7 deletions

View file

@ -2,7 +2,8 @@ use {
crate::{
compositor::DISPLAY,
control_center::{
CcBehavior, ControlCenterInner, bool, combo_box_ui, grid, label, read_only_bool, tip,
CcBehavior, ControlCenterInner, bool, cc_clients::show_client_collapsible,
combo_box_ui, grid, label, read_only_bool, tip,
},
state::State,
utils::{errorfmt::ErrorFmt, oserror::OsError, static_text::StaticText},
@ -45,7 +46,7 @@ impl XwaylandPane {
res.push_str("Xwayland");
}
pub fn show(&mut self, _behavior: &mut CcBehavior<'_>, ui: &mut Ui) {
pub fn show(&mut self, behavior: &mut CcBehavior<'_>, ui: &mut Ui) {
let s = &self.state;
grid(ui, "settings", |ui| {
bool(ui, "Enabled", s.xwayland.enabled.get(), |b| {
@ -83,5 +84,8 @@ impl XwaylandPane {
{
log::error!("Could not kill Xwayland: {}", ErrorFmt(OsError::from(e)));
}
if let Some(client) = self.state.xwayland.client.get() {
show_client_collapsible(behavior, ui, &client);
}
}
}