config: allow capturing only selected workspaces
This commit is contained in:
parent
de71be0674
commit
9c7299234a
14 changed files with 224 additions and 4 deletions
|
|
@ -287,6 +287,32 @@ impl Client {
|
|||
connector
|
||||
}
|
||||
|
||||
pub fn get_seat_workspace(&self, seat: Seat) -> Workspace {
|
||||
let res = self.send_with_response(&ClientMessage::GetSeatWorkspace { seat });
|
||||
get_response!(res, Workspace(0), GetSeatWorkspace { workspace });
|
||||
workspace
|
||||
}
|
||||
|
||||
pub fn set_default_workspace_capture(&self, capture: bool) {
|
||||
self.send(&ClientMessage::SetDefaultWorkspaceCapture { capture });
|
||||
}
|
||||
|
||||
pub fn set_workspace_capture(&self, workspace: Workspace, capture: bool) {
|
||||
self.send(&ClientMessage::SetWorkspaceCapture { workspace, capture });
|
||||
}
|
||||
|
||||
pub fn get_default_workspace_capture(&self) -> bool {
|
||||
let res = self.send_with_response(&ClientMessage::GetDefaultWorkspaceCapture);
|
||||
get_response!(res, true, GetDefaultWorkspaceCapture { capture });
|
||||
capture
|
||||
}
|
||||
|
||||
pub fn get_workspace_capture(&self, workspace: Workspace) -> bool {
|
||||
let res = self.send_with_response(&ClientMessage::GetWorkspaceCapture { workspace });
|
||||
get_response!(res, true, GetWorkspaceCapture { capture });
|
||||
capture
|
||||
}
|
||||
|
||||
pub fn show_workspace(&self, seat: Seat, workspace: Workspace) {
|
||||
self.send(&ClientMessage::ShowWorkspace { seat, workspace });
|
||||
}
|
||||
|
|
|
|||
|
|
@ -316,6 +316,20 @@ pub enum ClientMessage<'a> {
|
|||
MakeRenderDevice {
|
||||
device: DrmDevice,
|
||||
},
|
||||
GetSeatWorkspace {
|
||||
seat: Seat,
|
||||
},
|
||||
SetDefaultWorkspaceCapture {
|
||||
capture: bool,
|
||||
},
|
||||
GetDefaultWorkspaceCapture,
|
||||
SetWorkspaceCapture {
|
||||
workspace: Workspace,
|
||||
capture: bool,
|
||||
},
|
||||
GetWorkspaceCapture {
|
||||
workspace: Workspace,
|
||||
},
|
||||
}
|
||||
|
||||
#[derive(Encode, Decode, Debug)]
|
||||
|
|
@ -409,6 +423,15 @@ pub enum Response {
|
|||
width: i32,
|
||||
height: i32,
|
||||
},
|
||||
GetSeatWorkspace {
|
||||
workspace: Workspace,
|
||||
},
|
||||
GetDefaultWorkspaceCapture {
|
||||
capture: bool,
|
||||
},
|
||||
GetWorkspaceCapture {
|
||||
capture: bool,
|
||||
},
|
||||
}
|
||||
|
||||
#[derive(Encode, Decode, Debug)]
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue