srdusr
aboutsummaryrefslogtreecommitdiffstats
path: root/crates/platform/src
diff options
context:
space:
mode:
Diffstat (limited to 'crates/platform/src')
-rw-r--r--crates/platform/src/ipc/dispatch.rs9
-rw-r--r--crates/platform/src/ipc/types.rs2
2 files changed, 11 insertions, 0 deletions
diff --git a/crates/platform/src/ipc/dispatch.rs b/crates/platform/src/ipc/dispatch.rs
index 5a969c7..313a79c 100644
--- a/crates/platform/src/ipc/dispatch.rs
+++ b/crates/platform/src/ipc/dispatch.rs
@@ -27,6 +27,7 @@ pub(crate) fn handle_request(line: &[u8], wm: &std::rc::Rc<std::cell::RefCell<Wi
night_light: wm.color_filter == srdwm_core::ColorFilter::NightLight,
reading_mode: wm.color_filter == srdwm_core::ColorFilter::ReadingMode,
phone_mode: wm.phone_mode,
+ multi_cursor: wm.multi_cursor_enabled,
};
(serde_json::to_vec(&settings).unwrap_or_default(), false)
}
@@ -518,6 +519,14 @@ fn handle_set(req: &serde_json::Value, wm: &std::rc::Rc<std::cell::RefCell<Windo
wm.borrow_mut().phone_mode = v;
(ok(), true)
}
+ // `srd set multi_cursor <bool>` - live equivalent of `general.
+ // multi_cursor`. See `WindowManager::multi_cursor_enabled`'s own
+ // doc comment for why this is opt-in rather than always-on.
+ "multi_cursor" => {
+ let Some(v) = value.and_then(|v| v.as_bool()) else { return (err("multi_cursor needs a boolean value"), false) };
+ wm.borrow_mut().multi_cursor_enabled = v;
+ (ok(), true)
+ }
"blur" => (err("blur is not supported - no GPU shader path on this compositor's software renderer yet"), false),
// The two ported Hyprland `decoration:screen_shader` scripts --
// mutually exclusive by construction (`srdwm_core::ColorFilter` is
diff --git a/crates/platform/src/ipc/types.rs b/crates/platform/src/ipc/types.rs
index 08c2d7e..1dc95f6 100644
--- a/crates/platform/src/ipc/types.rs
+++ b/crates/platform/src/ipc/types.rs
@@ -148,6 +148,8 @@ pub(crate) struct SettingsResponse {
/// without a second, separate way to ask "is this a phone-shaped
/// session".
pub(crate) phone_mode: bool,
+ /// `WindowManager::multi_cursor_enabled`'s own doc comment.
+ pub(crate) multi_cursor: bool,
}
/// `"keyboard_layout"`'s one-shot reply shape - the active XKB layout's