show-hide binding

This commit is contained in:
galister
2024-02-01 19:49:37 +01:00
parent 22f94671e2
commit 832e5a7ecb
7 changed files with 66 additions and 5 deletions

View File

@@ -114,7 +114,6 @@ where
OverlayData {
state: OverlayState {
name: Arc::from("kbd"),
show_hide: true,
size: (size.x as _, size.y as _),
grabbable: true,
spawn_scale: width,

View File

@@ -334,7 +334,6 @@ where
name: output.name.clone(),
size,
want_visible: session.show_screens.iter().any(|s| s == &*output.name),
show_hide: true,
grabbable: true,
spawn_scale: 1.5 * session.config.desktop_view_scale,
spawn_point: vec3a(0., 0.5, -1.),

View File

@@ -98,7 +98,8 @@ where
app.tasks.enqueue(TaskType::Overlay(
OverlaySelector::Name("kbd".into()),
Box::new(|_app, o| {
o.want_visible = !o.want_visible;
o.show_hide = !o.show_hide;
o.want_visible = o.show_hide;
}),
));
} else {
@@ -144,7 +145,8 @@ where
app.tasks.enqueue(TaskType::Overlay(
OverlaySelector::Id(scr_idx),
Box::new(|_app, o| {
o.want_visible = !o.want_visible;
o.show_hide = !o.show_hide;
o.want_visible = o.show_hide;
}),
));
} else {