static positioning to also set global

This commit is contained in:
galister
2025-12-17 16:58:13 +09:00
parent b28c402ddf
commit 90bce4c369
4 changed files with 19 additions and 7 deletions

View File

@@ -38,6 +38,7 @@ pub fn new_pos_tab_handler(
Box::new(|_common, state| {
let positioning = state.pos;
Box::new(move |app, owc| {
owc.global = matches!(positioning, Positioning::Static);
let state = owc.active_state.as_mut().unwrap(); //want panic
state.positioning = positioning;
window::save_transform(state, app);

View File

@@ -20,7 +20,7 @@ use crate::{
BackendAttrib, BackendAttribValue, FrameMeta, OverlayBackend, OverlayEventData,
RenderResources, ShouldRender,
},
window::OverlayWindowConfig,
window::{OverlayCategory, OverlayWindowConfig},
},
};
use anyhow::Context;
@@ -86,6 +86,7 @@ pub fn create_keyboard(app: &mut AppState, wayland: bool) -> anyhow::Result<Over
Ok(OverlayWindowConfig {
name: KEYBOARD_NAME.into(),
category: OverlayCategory::Keyboard,
default_state: OverlayWindowState {
grabbable: true,
positioning: Positioning::Anchored,