1
0
Fork 0
forked from wry/wry

seperate workspaces by monitor

This commit is contained in:
kossLAN 2026-05-16 18:34:20 -04:00
parent c555593ae2
commit a29937ebe8
No known key found for this signature in database
5 changed files with 44 additions and 20 deletions

View file

@ -105,6 +105,7 @@ use {
FoundNode, LatchListener, Node, NodeIds, NodeVisitorBase, OutputNode, PlaceholderNode,
TearingMode, TileState, ToplevelData, ToplevelIdentifier, ToplevelNode,
ToplevelNodeBase, Transform, VrrMode, WorkspaceDisplayOrder, WorkspaceNode,
WorkspaceNodeId,
WsMoveConfig, generic_node_visitor, move_ws_to_output,
},
udmabuf::UdmabufHolder,
@ -177,7 +178,7 @@ pub struct State {
pub input_device_ids: InputDeviceIds,
pub node_ids: NodeIds,
pub root: Rc<DisplayNode>,
pub workspaces: CopyHashMap<String, Rc<WorkspaceNode>>,
pub workspaces: CopyHashMap<WorkspaceNodeId, Rc<WorkspaceNode>>,
pub dummy_output: CloneCell<Option<Rc<OutputNode>>>,
pub backend_events: AsyncQueue<BackendEvent>,
pub input_device_handlers: RefCell<AHashMap<InputDeviceId, InputDeviceData>>,
@ -936,10 +937,10 @@ impl State {
name: &str,
output: Option<Rc<OutputNode>>,
) {
let ws = match self.workspaces.get(name) {
let output = output.unwrap_or_else(|| seat.get_fallback_output());
let ws = match output.find_workspace(name) {
Some(ws) => ws,
_ => {
let output = output.unwrap_or_else(|| seat.get_fallback_output());
if output.is_dummy {
log::warn!("Not showing workspace because seat is on dummy output");
return;