feat(wm): implement Clone for State, Notification and NotificationEvent

This implements Clone for State, Notification and NotificationEvent to allow for the use of these
types in Rhai scripts.
This commit is contained in:
omark96 authored and Jeezy committed 2025-09-02 07:53:36 -07:00
1 parent 3dad77533b
commit 1db572f789
2 files changed
+3 -3

No files matched your search

+2 -2
View File
@@ -306,7 +306,7 @@ pub fn current_virtual_desktop() -> Option<Vec<u8>> {
current
}
#[derive(Debug, Serialize, Deserialize)]
#[derive(Clone, Debug, Serialize, Deserialize)]
#[cfg_attr(feature = "schemars", derive(schemars::JsonSchema))]
#[serde(untagged)]
pub enum NotificationEvent {
@@ -323,7 +323,7 @@ pub enum VirtualDesktopNotification {
LeftAssociatedVirtualDesktop,
}
#[derive(Debug, Serialize, Deserialize)]
#[derive(Clone, Debug, Serialize, Deserialize)]
#[cfg_attr(feature = "schemars", derive(schemars::JsonSchema))]
pub struct Notification {
pub event: NotificationEvent,
+1 -1
View File
@@ -126,7 +126,7 @@ pub struct WindowManager {
}
#[allow(clippy::struct_excessive_bools)]
#[derive(Debug, Serialize, Deserialize)]
#[derive(Clone, Debug, Serialize, Deserialize)]
#[cfg_attr(feature = "schemars", derive(schemars::JsonSchema))]
pub struct State {
pub monitors: Ring<Monitor>,