Adds support for cosmic-workspace-v2 pin, unpin, move_after, and move_before requests. Both features need some work with workspaces span displays mode, so that will need more fixes later. We also want to generate a unique id for pinned workspaces to send in the ext-workspace-v1 protocol. But that isn't a strict requirement for anything. So I haven't yet fully implemented that. We'll also want to persist other things, like workspace naming when that's added. Overall, though, with separate workspaces per display, this is working pretty well.
27 lines
826 B
Rust
27 lines
826 B
Rust
// SPDX-License-Identifier: GPL-3.0-only
|
|
|
|
use serde::{Deserialize, Serialize};
|
|
|
|
#[derive(Debug, Deserialize, Serialize, Copy, Clone, PartialEq, Eq, PartialOrd, Ord, Hash)]
|
|
pub struct EdidProduct {
|
|
pub manufacturer: [char; 3],
|
|
pub product: u16,
|
|
pub serial: Option<u32>,
|
|
pub manufacture_week: i32,
|
|
pub manufacture_year: i32,
|
|
pub model_year: Option<i32>,
|
|
}
|
|
|
|
#[cfg(feature = "libdisplay-info")]
|
|
impl From<libdisplay_info::edid::VendorProduct> for EdidProduct {
|
|
fn from(vp: libdisplay_info::edid::VendorProduct) -> Self {
|
|
Self {
|
|
manufacturer: vp.manufacturer,
|
|
product: vp.product,
|
|
serial: vp.serial,
|
|
manufacture_week: vp.manufacture_week,
|
|
manufacture_year: vp.manufacture_year,
|
|
model_year: vp.model_year,
|
|
}
|
|
}
|
|
}
|