1
0
Fork 0
forked from wry/wry

config: add seat to seat-based window management messages

This commit is contained in:
Julian Orth 2025-04-29 12:52:33 +02:00
parent bc6a9ad94d
commit 52994c085a
5 changed files with 127 additions and 123 deletions

View file

@ -333,12 +333,12 @@ impl Client {
self.send(&ClientMessage::GrabKb { kb, grab }); self.send(&ClientMessage::GrabKb { kb, grab });
} }
pub fn focus(&self, seat: Seat, direction: Direction) { pub fn seat_focus(&self, seat: Seat, direction: Direction) {
self.send(&ClientMessage::Focus { seat, direction }); self.send(&ClientMessage::SeatFocus { seat, direction });
} }
pub fn move_(&self, seat: Seat, direction: Direction) { pub fn seat_move(&self, seat: Seat, direction: Direction) {
self.send(&ClientMessage::Move { seat, direction }); self.send(&ClientMessage::SeatMove { seat, direction });
} }
pub fn unbind<T: Into<ModifiedKeySym>>(&self, seat: Seat, mod_sym: T) { pub fn unbind<T: Into<ModifiedKeySym>>(&self, seat: Seat, mod_sym: T) {
@ -367,8 +367,8 @@ impl Client {
seats seats
} }
pub fn mono(&self, seat: Seat) -> bool { pub fn seat_mono(&self, seat: Seat) -> bool {
let res = self.send_with_response(&ClientMessage::GetMono { seat }); let res = self.send_with_response(&ClientMessage::GetSeatMono { seat });
get_response!(res, false, GetMono { mono }); get_response!(res, false, GetMono { mono });
mono mono
} }
@ -450,12 +450,12 @@ impl Client {
self.send(&ClientMessage::ShowWorkspace { seat, workspace }); self.send(&ClientMessage::ShowWorkspace { seat, workspace });
} }
pub fn set_workspace(&self, seat: Seat, workspace: Workspace) { pub fn set_seat_workspace(&self, seat: Seat, workspace: Workspace) {
self.send(&ClientMessage::SetWorkspace { seat, workspace }); self.send(&ClientMessage::SetSeatWorkspace { seat, workspace });
} }
pub fn split(&self, seat: Seat) -> Axis { pub fn seat_split(&self, seat: Seat) -> Axis {
let res = self.send_with_response(&ClientMessage::GetSplit { seat }); let res = self.send_with_response(&ClientMessage::GetSeatSplit { seat });
get_response!(res, Axis::Horizontal, GetSplit { axis }); get_response!(res, Axis::Horizontal, GetSplit { axis });
axis axis
} }
@ -471,12 +471,12 @@ impl Client {
}); });
} }
pub fn set_fullscreen(&self, seat: Seat, fullscreen: bool) { pub fn set_seat_fullscreen(&self, seat: Seat, fullscreen: bool) {
self.send(&ClientMessage::SetFullscreen { seat, fullscreen }); self.send(&ClientMessage::SetSeatFullscreen { seat, fullscreen });
} }
pub fn get_fullscreen(&self, seat: Seat) -> bool { pub fn get_seat_fullscreen(&self, seat: Seat) -> bool {
let res = self.send_with_response(&ClientMessage::GetFullscreen { seat }); let res = self.send_with_response(&ClientMessage::GetSeatFullscreen { seat });
get_response!(res, false, GetFullscreen { fullscreen }); get_response!(res, false, GetFullscreen { fullscreen });
fullscreen fullscreen
} }
@ -495,18 +495,18 @@ impl Client {
font font
} }
pub fn get_floating(&self, seat: Seat) -> bool { pub fn get_seat_floating(&self, seat: Seat) -> bool {
let res = self.send_with_response(&ClientMessage::GetFloating { seat }); let res = self.send_with_response(&ClientMessage::GetSeatFloating { seat });
get_response!(res, false, GetFloating { floating }); get_response!(res, false, GetFloating { floating });
floating floating
} }
pub fn set_floating(&self, seat: Seat, floating: bool) { pub fn set_seat_floating(&self, seat: Seat, floating: bool) {
self.send(&ClientMessage::SetFloating { seat, floating }); self.send(&ClientMessage::SetSeatFloating { seat, floating });
} }
pub fn toggle_floating(&self, seat: Seat) { pub fn toggle_seat_floating(&self, seat: Seat) {
self.set_floating(seat, !self.get_floating(seat)); self.set_seat_floating(seat, !self.get_seat_floating(seat));
} }
pub fn reset_colors(&self) { pub fn reset_colors(&self) {
@ -548,8 +548,8 @@ impl Client {
self.send(&ClientMessage::SetSize { sized, size }) self.send(&ClientMessage::SetSize { sized, size })
} }
pub fn set_mono(&self, seat: Seat, mono: bool) { pub fn set_seat_mono(&self, seat: Seat, mono: bool) {
self.send(&ClientMessage::SetMono { seat, mono }); self.send(&ClientMessage::SetSeatMono { seat, mono });
} }
pub fn set_env(&self, key: &str, val: &str) { pub fn set_env(&self, key: &str, val: &str) {
@ -582,20 +582,20 @@ impl Client {
self.i3bar_separator.borrow().clone() self.i3bar_separator.borrow().clone()
} }
pub fn set_split(&self, seat: Seat, axis: Axis) { pub fn set_seat_split(&self, seat: Seat, axis: Axis) {
self.send(&ClientMessage::SetSplit { seat, axis }); self.send(&ClientMessage::SetSeatSplit { seat, axis });
} }
pub fn create_split(&self, seat: Seat, axis: Axis) { pub fn create_seat_split(&self, seat: Seat, axis: Axis) {
self.send(&ClientMessage::CreateSplit { seat, axis }); self.send(&ClientMessage::CreateSeatSplit { seat, axis });
} }
pub fn close(&self, seat: Seat) { pub fn seat_close(&self, seat: Seat) {
self.send(&ClientMessage::Close { seat }); self.send(&ClientMessage::SeatClose { seat });
} }
pub fn focus_parent(&self, seat: Seat) { pub fn focus_seat_parent(&self, seat: Seat) {
self.send(&ClientMessage::FocusParent { seat }); self.send(&ClientMessage::FocusSeatParent { seat });
} }
pub fn get_seat(&self, name: &str) -> Seat { pub fn get_seat(&self, name: &str) -> Seat {
@ -792,13 +792,13 @@ impl Client {
} }
pub fn get_pinned(&self, seat: Seat) -> bool { pub fn get_pinned(&self, seat: Seat) -> bool {
let res = self.send_with_response(&ClientMessage::GetFloatPinned { seat }); let res = self.send_with_response(&ClientMessage::GetSeatFloatPinned { seat });
get_response!(res, false, GetFloatPinned { pinned }); get_response!(res, false, GetFloatPinned { pinned });
pinned pinned
} }
pub fn set_pinned(&self, seat: Seat, pinned: bool) { pub fn set_pinned(&self, seat: Seat, pinned: bool) {
self.send(&ClientMessage::SetFloatPinned { seat, pinned }); self.send(&ClientMessage::SetSeatFloatPinned { seat, pinned });
} }
pub fn connector_connected(&self, connector: Connector) -> bool { pub fn connector_connected(&self, connector: Connector) -> bool {

View file

@ -129,20 +129,20 @@ pub enum ClientMessage<'a> {
rate: i32, rate: i32,
delay: i32, delay: i32,
}, },
GetSplit { GetSeatSplit {
seat: Seat, seat: Seat,
}, },
SetStatus { SetStatus {
status: &'a str, status: &'a str,
}, },
SetSplit { SetSeatSplit {
seat: Seat, seat: Seat,
axis: Axis, axis: Axis,
}, },
GetMono { GetSeatMono {
seat: Seat, seat: Seat,
}, },
SetMono { SetSeatMono {
seat: Seat, seat: Seat,
mono: bool, mono: bool,
}, },
@ -168,11 +168,11 @@ pub enum ClientMessage<'a> {
args: Vec<String>, args: Vec<String>,
env: Vec<(String, String)>, env: Vec<(String, String)>,
}, },
Focus { SeatFocus {
seat: Seat, seat: Seat,
direction: Direction, direction: Direction,
}, },
Move { SeatMove {
seat: Seat, seat: Seat,
direction: Direction, direction: Direction,
}, },
@ -196,20 +196,20 @@ pub enum ClientMessage<'a> {
colorable: Colorable, colorable: Colorable,
color: Color, color: Color,
}, },
CreateSplit { CreateSeatSplit {
seat: Seat, seat: Seat,
axis: Axis, axis: Axis,
}, },
Close { SeatClose {
seat: Seat, seat: Seat,
}, },
FocusParent { FocusSeatParent {
seat: Seat, seat: Seat,
}, },
GetFloating { GetSeatFloating {
seat: Seat, seat: Seat,
}, },
SetFloating { SetSeatFloating {
seat: Seat, seat: Seat,
floating: bool, floating: bool,
}, },
@ -261,7 +261,7 @@ pub enum ClientMessage<'a> {
seat: Seat, seat: Seat,
workspace: Workspace, workspace: Workspace,
}, },
SetWorkspace { SetSeatWorkspace {
seat: Seat, seat: Seat,
workspace: Workspace, workspace: Workspace,
}, },
@ -280,11 +280,11 @@ pub enum ClientMessage<'a> {
key: &'a str, key: &'a str,
val: &'a str, val: &'a str,
}, },
SetFullscreen { SetSeatFullscreen {
seat: Seat, seat: Seat,
fullscreen: bool, fullscreen: bool,
}, },
GetFullscreen { GetSeatFullscreen {
seat: Seat, seat: Seat,
}, },
GetDeviceConnectors { GetDeviceConnectors {
@ -546,10 +546,10 @@ pub enum ClientMessage<'a> {
above: bool, above: bool,
}, },
GetFloatAboveFullscreen, GetFloatAboveFullscreen,
GetFloatPinned { GetSeatFloatPinned {
seat: Seat, seat: Seat,
}, },
SetFloatPinned { SetSeatFloatPinned {
seat: Seat, seat: Seat,
pinned: bool, pinned: bool,
}, },

View file

@ -259,12 +259,12 @@ impl Seat {
/// Moves the keyboard focus of the seat in the specified direction. /// Moves the keyboard focus of the seat in the specified direction.
pub fn focus(self, direction: Direction) { pub fn focus(self, direction: Direction) {
get!().focus(self, direction) get!().seat_focus(self, direction)
} }
/// Moves the focused window in the specified direction. /// Moves the focused window in the specified direction.
pub fn move_(self, direction: Direction) { pub fn move_(self, direction: Direction) {
get!().move_(self, direction) get!().seat_move(self, direction)
} }
/// Sets the keymap of the seat. /// Sets the keymap of the seat.
@ -287,12 +287,12 @@ impl Seat {
/// Returns whether the parent-container of the currently focused window is in mono-mode. /// Returns whether the parent-container of the currently focused window is in mono-mode.
pub fn mono(self) -> bool { pub fn mono(self) -> bool {
get!(false).mono(self) get!(false).seat_mono(self)
} }
/// Sets whether the parent-container of the currently focused window is in mono-mode. /// Sets whether the parent-container of the currently focused window is in mono-mode.
pub fn set_mono(self, mono: bool) { pub fn set_mono(self, mono: bool) {
get!().set_mono(self, mono) get!().set_seat_mono(self, mono)
} }
/// Toggles whether the parent-container of the currently focused window is in mono-mode. /// Toggles whether the parent-container of the currently focused window is in mono-mode.
@ -302,12 +302,12 @@ impl Seat {
/// Returns the split axis of the parent-container of the currently focused window. /// Returns the split axis of the parent-container of the currently focused window.
pub fn split(self) -> Axis { pub fn split(self) -> Axis {
get!(Axis::Horizontal).split(self) get!(Axis::Horizontal).seat_split(self)
} }
/// Sets the split axis of the parent-container of the currently focused window. /// Sets the split axis of the parent-container of the currently focused window.
pub fn set_split(self, axis: Axis) { pub fn set_split(self, axis: Axis) {
get!().set_split(self, axis) get!().set_seat_split(self, axis)
} }
/// Toggles the split axis of the parent-container of the currently focused window. /// Toggles the split axis of the parent-container of the currently focused window.
@ -322,33 +322,33 @@ impl Seat {
/// Creates a new container with the specified split in place of the currently focused window. /// Creates a new container with the specified split in place of the currently focused window.
pub fn create_split(self, axis: Axis) { pub fn create_split(self, axis: Axis) {
get!().create_split(self, axis); get!().create_seat_split(self, axis);
} }
/// Focuses the parent node of the currently focused window. /// Focuses the parent node of the currently focused window.
pub fn focus_parent(self) { pub fn focus_parent(self) {
get!().focus_parent(self); get!().focus_seat_parent(self);
} }
/// Requests the currently focused window to be closed. /// Requests the currently focused window to be closed.
pub fn close(self) { pub fn close(self) {
get!().close(self); get!().seat_close(self);
} }
/// Returns whether the currently focused window is floating. /// Returns whether the currently focused window is floating.
pub fn get_floating(self) -> bool { pub fn get_floating(self) -> bool {
get!().get_floating(self) get!().get_seat_floating(self)
} }
/// Sets whether the currently focused window is floating. /// Sets whether the currently focused window is floating.
pub fn set_floating(self, floating: bool) { pub fn set_floating(self, floating: bool) {
get!().set_floating(self, floating); get!().set_seat_floating(self, floating);
} }
/// Toggles whether the currently focused window is floating. /// Toggles whether the currently focused window is floating.
/// ///
/// You can do the same by double-clicking on the header. /// You can do the same by double-clicking on the header.
pub fn toggle_floating(self) { pub fn toggle_floating(self) {
get!().toggle_floating(self); get!().toggle_seat_floating(self);
} }
/// Returns the workspace that is currently active on the output that contains the seat's /// Returns the workspace that is currently active on the output that contains the seat's
@ -377,22 +377,22 @@ impl Seat {
/// Moves the currently focused window to the workspace. /// Moves the currently focused window to the workspace.
pub fn set_workspace(self, workspace: Workspace) { pub fn set_workspace(self, workspace: Workspace) {
get!().set_workspace(self, workspace) get!().set_seat_workspace(self, workspace)
} }
/// Toggles whether the currently focused window is fullscreen. /// Toggles whether the currently focused window is fullscreen.
pub fn toggle_fullscreen(self) { pub fn toggle_fullscreen(self) {
let c = get!(); let c = get!();
c.set_fullscreen(self, !c.get_fullscreen(self)); c.set_seat_fullscreen(self, !c.get_seat_fullscreen(self));
} }
/// Returns whether the currently focused window is fullscreen. /// Returns whether the currently focused window is fullscreen.
pub fn fullscreen(self) -> bool { pub fn fullscreen(self) -> bool {
get!(false).get_fullscreen(self) get!(false).get_seat_fullscreen(self)
} }
/// Sets whether the currently focused window is fullscreen. /// Sets whether the currently focused window is fullscreen.
pub fn set_fullscreen(self, fullscreen: bool) { pub fn set_fullscreen(self, fullscreen: bool) {
get!().set_fullscreen(self, fullscreen) get!().set_seat_fullscreen(self, fullscreen)
} }
/// Disables the currently active pointer constraint on this seat. /// Disables the currently active pointer constraint on this seat.

View file

@ -299,7 +299,7 @@ impl ConfigProxyHandler {
self.state.config.set(Some(Rc::new(config))); self.state.config.set(Some(Rc::new(config)));
} }
fn handle_get_fullscreen(&self, seat: Seat) -> Result<(), CphError> { fn handle_get_seat_fullscreen(&self, seat: Seat) -> Result<(), CphError> {
let seat = self.get_seat(seat)?; let seat = self.get_seat(seat)?;
self.respond(Response::GetFullscreen { self.respond(Response::GetFullscreen {
fullscreen: seat.get_fullscreen(), fullscreen: seat.get_fullscreen(),
@ -307,7 +307,7 @@ impl ConfigProxyHandler {
Ok(()) Ok(())
} }
fn handle_set_fullscreen(&self, seat: Seat, fullscreen: bool) -> Result<(), CphError> { fn handle_set_seat_fullscreen(&self, seat: Seat, fullscreen: bool) -> Result<(), CphError> {
let seat = self.get_seat(seat)?; let seat = self.get_seat(seat)?;
seat.set_fullscreen(fullscreen); seat.set_fullscreen(fullscreen);
Ok(()) Ok(())
@ -484,19 +484,19 @@ impl ConfigProxyHandler {
Ok(()) Ok(())
} }
fn handle_close(&self, seat: Seat) -> Result<(), CphError> { fn handle_seat_close(&self, seat: Seat) -> Result<(), CphError> {
let seat = self.get_seat(seat)?; let seat = self.get_seat(seat)?;
seat.close(); seat.close();
Ok(()) Ok(())
} }
fn handle_focus(&self, seat: Seat, direction: Direction) -> Result<(), CphError> { fn handle_seat_focus(&self, seat: Seat, direction: Direction) -> Result<(), CphError> {
let seat = self.get_seat(seat)?; let seat = self.get_seat(seat)?;
seat.move_focus(direction.into()); seat.move_focus(direction.into());
Ok(()) Ok(())
} }
fn handle_move(&self, seat: Seat, direction: Direction) -> Result<(), CphError> { fn handle_seat_move(&self, seat: Seat, direction: Direction) -> Result<(), CphError> {
let seat = self.get_seat(seat)?; let seat = self.get_seat(seat)?;
seat.move_focused(direction.into()); seat.move_focused(direction.into());
Ok(()) Ok(())
@ -843,7 +843,7 @@ impl ConfigProxyHandler {
Ok(()) Ok(())
} }
fn handle_set_workspace(&self, seat: Seat, ws: Workspace) -> Result<(), CphError> { fn handle_set_seat_workspace(&self, seat: Seat, ws: Workspace) -> Result<(), CphError> {
let seat = self.get_seat(seat)?; let seat = self.get_seat(seat)?;
let name = self.get_workspace(ws)?; let name = self.get_workspace(ws)?;
let workspace = match self.state.workspaces.get(name.deref()) { let workspace = match self.state.workspaces.get(name.deref()) {
@ -1164,7 +1164,7 @@ impl ConfigProxyHandler {
} }
} }
fn handle_get_float_pinned(&self, seat: Seat) -> Result<(), CphError> { fn handle_get_seat_float_pinned(&self, seat: Seat) -> Result<(), CphError> {
let seat = self.get_seat(seat)?; let seat = self.get_seat(seat)?;
self.respond(Response::GetFloatPinned { self.respond(Response::GetFloatPinned {
pinned: seat.pinned(), pinned: seat.pinned(),
@ -1172,7 +1172,7 @@ impl ConfigProxyHandler {
Ok(()) Ok(())
} }
fn handle_set_float_pinned(&self, seat: Seat, pinned: bool) -> Result<(), CphError> { fn handle_set_seat_float_pinned(&self, seat: Seat, pinned: bool) -> Result<(), CphError> {
let seat = self.get_seat(seat)?; let seat = self.get_seat(seat)?;
seat.set_pinned(pinned); seat.set_pinned(pinned);
Ok(()) Ok(())
@ -1344,7 +1344,7 @@ impl ConfigProxyHandler {
} }
} }
fn handle_get_mono(&self, seat: Seat) -> Result<(), CphError> { fn handle_get_seat_mono(&self, seat: Seat) -> Result<(), CphError> {
let seat = self.get_seat(seat)?; let seat = self.get_seat(seat)?;
self.respond(Response::GetMono { self.respond(Response::GetMono {
mono: seat.get_mono().unwrap_or(false), mono: seat.get_mono().unwrap_or(false),
@ -1352,13 +1352,13 @@ impl ConfigProxyHandler {
Ok(()) Ok(())
} }
fn handle_set_mono(&self, seat: Seat, mono: bool) -> Result<(), CphError> { fn handle_set_seat_mono(&self, seat: Seat, mono: bool) -> Result<(), CphError> {
let seat = self.get_seat(seat)?; let seat = self.get_seat(seat)?;
seat.set_mono(mono); seat.set_mono(mono);
Ok(()) Ok(())
} }
fn handle_get_split(&self, seat: Seat) -> Result<(), CphError> { fn handle_get_seat_split(&self, seat: Seat) -> Result<(), CphError> {
let seat = self.get_seat(seat)?; let seat = self.get_seat(seat)?;
self.respond(Response::GetSplit { self.respond(Response::GetSplit {
axis: seat axis: seat
@ -1369,7 +1369,7 @@ impl ConfigProxyHandler {
Ok(()) Ok(())
} }
fn handle_set_split(&self, seat: Seat, axis: Axis) -> Result<(), CphError> { fn handle_set_seat_split(&self, seat: Seat, axis: Axis) -> Result<(), CphError> {
let seat = self.get_seat(seat)?; let seat = self.get_seat(seat)?;
seat.set_split(axis.into()); seat.set_split(axis.into());
Ok(()) Ok(())
@ -1472,13 +1472,13 @@ impl ConfigProxyHandler {
Ok(()) Ok(())
} }
fn handle_create_split(&self, seat: Seat, axis: Axis) -> Result<(), CphError> { fn handle_create_seat_split(&self, seat: Seat, axis: Axis) -> Result<(), CphError> {
let seat = self.get_seat(seat)?; let seat = self.get_seat(seat)?;
seat.create_split(axis.into()); seat.create_split(axis.into());
Ok(()) Ok(())
} }
fn handle_focus_parent(&self, seat: Seat) -> Result<(), CphError> { fn handle_focus_seat_parent(&self, seat: Seat) -> Result<(), CphError> {
let seat = self.get_seat(seat)?; let seat = self.get_seat(seat)?;
seat.focus_parent(); seat.focus_parent();
Ok(()) Ok(())
@ -1493,7 +1493,7 @@ impl ConfigProxyHandler {
self.state.backend.get().switch_to(vtnr); self.state.backend.get().switch_to(vtnr);
} }
fn handle_get_floating(&self, seat: Seat) -> Result<(), CphError> { fn handle_get_seat_floating(&self, seat: Seat) -> Result<(), CphError> {
let seat = self.get_seat(seat)?; let seat = self.get_seat(seat)?;
self.respond(Response::GetFloating { self.respond(Response::GetFloating {
floating: seat.get_floating().unwrap_or(false), floating: seat.get_floating().unwrap_or(false),
@ -1501,7 +1501,7 @@ impl ConfigProxyHandler {
Ok(()) Ok(())
} }
fn handle_set_floating(&self, seat: Seat, floating: bool) -> Result<(), CphError> { fn handle_set_seat_floating(&self, seat: Seat, floating: bool) -> Result<(), CphError> {
let seat = self.get_seat(seat)?; let seat = self.get_seat(seat)?;
seat.set_floating(floating); seat.set_floating(floating);
Ok(()) Ok(())
@ -1751,25 +1751,29 @@ impl ConfigProxyHandler {
ClientMessage::SetSeat { device, seat } => { ClientMessage::SetSeat { device, seat } => {
self.handle_set_seat(device, seat).wrn("set_seat")? self.handle_set_seat(device, seat).wrn("set_seat")?
} }
ClientMessage::GetMono { seat } => self.handle_get_mono(seat).wrn("get_mono")?, ClientMessage::GetSeatMono { seat } => {
ClientMessage::SetMono { seat, mono } => { self.handle_get_seat_mono(seat).wrn("get_seat_mono")?
self.handle_set_mono(seat, mono).wrn("set_mono")?
} }
ClientMessage::GetSplit { seat } => self.handle_get_split(seat).wrn("get_split")?, ClientMessage::SetSeatMono { seat, mono } => {
ClientMessage::SetSplit { seat, axis } => { self.handle_set_seat_mono(seat, mono).wrn("set_seat_mono")?
self.handle_set_split(seat, axis).wrn("set_split")?
} }
ClientMessage::GetSeatSplit { seat } => {
self.handle_get_seat_split(seat).wrn("get_seat_split")?
}
ClientMessage::SetSeatSplit { seat, axis } => self
.handle_set_seat_split(seat, axis)
.wrn("set_seat_split")?,
ClientMessage::AddShortcut { seat, mods, sym } => self ClientMessage::AddShortcut { seat, mods, sym } => self
.handle_add_shortcut(seat, Modifiers(!0), mods, sym) .handle_add_shortcut(seat, Modifiers(!0), mods, sym)
.wrn("add_shortcut")?, .wrn("add_shortcut")?,
ClientMessage::RemoveShortcut { seat, mods, sym } => self ClientMessage::RemoveShortcut { seat, mods, sym } => self
.handle_remove_shortcut(seat, mods, sym) .handle_remove_shortcut(seat, mods, sym)
.wrn("remove_shortcut")?, .wrn("remove_shortcut")?,
ClientMessage::Focus { seat, direction } => { ClientMessage::SeatFocus { seat, direction } => {
self.handle_focus(seat, direction).wrn("focus")? self.handle_seat_focus(seat, direction).wrn("seat_focus")?
} }
ClientMessage::Move { seat, direction } => { ClientMessage::SeatMove { seat, direction } => {
self.handle_move(seat, direction).wrn("move")? self.handle_seat_move(seat, direction).wrn("seat_move")?
} }
ClientMessage::GetInputDevices { seat } => self.handle_get_input_devices(seat), ClientMessage::GetInputDevices { seat } => self.handle_get_input_devices(seat),
ClientMessage::GetSeats => self.handle_get_seats(), ClientMessage::GetSeats => self.handle_get_seats(),
@ -1784,18 +1788,18 @@ impl ConfigProxyHandler {
ClientMessage::GetColor { colorable } => { ClientMessage::GetColor { colorable } => {
self.handle_get_color(colorable).wrn("get_color")? self.handle_get_color(colorable).wrn("get_color")?
} }
ClientMessage::CreateSplit { seat, axis } => { ClientMessage::CreateSeatSplit { seat, axis } => self
self.handle_create_split(seat, axis).wrn("create_split")? .handle_create_seat_split(seat, axis)
} .wrn("create_seat_split")?,
ClientMessage::FocusParent { seat } => { ClientMessage::FocusSeatParent { seat } => self
self.handle_focus_parent(seat).wrn("focus_parent")? .handle_focus_seat_parent(seat)
} .wrn("focus_seat_parent")?,
ClientMessage::GetFloating { seat } => { ClientMessage::GetSeatFloating { seat } => self
self.handle_get_floating(seat).wrn("get_floating")? .handle_get_seat_floating(seat)
} .wrn("get_seat_floating")?,
ClientMessage::SetFloating { seat, floating } => self ClientMessage::SetSeatFloating { seat, floating } => self
.handle_set_floating(seat, floating) .handle_set_seat_floating(seat, floating)
.wrn("set_floating")?, .wrn("set_seat_floating")?,
ClientMessage::Quit => self.handle_quit(), ClientMessage::Quit => self.handle_quit(),
ClientMessage::SwitchTo { vtnr } => self.handle_switch_to(vtnr), ClientMessage::SwitchTo { vtnr } => self.handle_switch_to(vtnr),
ClientMessage::HasCapability { device, cap } => self ClientMessage::HasCapability { device, cap } => self
@ -1823,9 +1827,9 @@ impl ConfigProxyHandler {
ClientMessage::ShowWorkspace { seat, workspace } => self ClientMessage::ShowWorkspace { seat, workspace } => self
.handle_show_workspace(seat, workspace) .handle_show_workspace(seat, workspace)
.wrn("show_workspace")?, .wrn("show_workspace")?,
ClientMessage::SetWorkspace { seat, workspace } => self ClientMessage::SetSeatWorkspace { seat, workspace } => self
.handle_set_workspace(seat, workspace) .handle_set_seat_workspace(seat, workspace)
.wrn("set_workspace")?, .wrn("set_seat_workspace")?,
ClientMessage::GetConnector { ty, idx } => { ClientMessage::GetConnector { ty, idx } => {
self.handle_get_connector(ty, idx).wrn("get_connector")? self.handle_get_connector(ty, idx).wrn("get_connector")?
} }
@ -1844,7 +1848,7 @@ impl ConfigProxyHandler {
ClientMessage::ConnectorSetEnabled { connector, enabled } => self ClientMessage::ConnectorSetEnabled { connector, enabled } => self
.handle_connector_set_enabled(connector, enabled) .handle_connector_set_enabled(connector, enabled)
.wrn("connector_set_enabled")?, .wrn("connector_set_enabled")?,
ClientMessage::Close { seat } => self.handle_close(seat).wrn("close")?, ClientMessage::SeatClose { seat } => self.handle_seat_close(seat).wrn("seat_close")?,
ClientMessage::SetStatus { status } => self.handle_set_status(status), ClientMessage::SetStatus { status } => self.handle_set_status(status),
ClientMessage::GetTimer { name } => self.handle_get_timer(name).wrn("get_timer")?, ClientMessage::GetTimer { name } => self.handle_get_timer(name).wrn("get_timer")?,
ClientMessage::RemoveTimer { timer } => { ClientMessage::RemoveTimer { timer } => {
@ -1858,12 +1862,12 @@ impl ConfigProxyHandler {
.handle_program_timer(timer, initial, periodic) .handle_program_timer(timer, initial, periodic)
.wrn("program_timer")?, .wrn("program_timer")?,
ClientMessage::SetEnv { key, val } => self.handle_set_env(key, val), ClientMessage::SetEnv { key, val } => self.handle_set_env(key, val),
ClientMessage::SetFullscreen { seat, fullscreen } => self ClientMessage::SetSeatFullscreen { seat, fullscreen } => self
.handle_set_fullscreen(seat, fullscreen) .handle_set_seat_fullscreen(seat, fullscreen)
.wrn("set_fullscreen")?, .wrn("set_seat_fullscreen")?,
ClientMessage::GetFullscreen { seat } => { ClientMessage::GetSeatFullscreen { seat } => self
self.handle_get_fullscreen(seat).wrn("get_fullscreen")? .handle_get_seat_fullscreen(seat)
} .wrn("get_seat_fullscreen")?,
ClientMessage::Reload => self.handle_reload(), ClientMessage::Reload => self.handle_reload(),
ClientMessage::GetDeviceConnectors { device } => self ClientMessage::GetDeviceConnectors { device } => self
.handle_get_connectors(Some(device), false) .handle_get_connectors(Some(device), false)
@ -2111,12 +2115,12 @@ impl ConfigProxyHandler {
self.handle_set_float_above_fullscreen(above) self.handle_set_float_above_fullscreen(above)
} }
ClientMessage::GetFloatAboveFullscreen => self.handle_get_float_above_fullscreen(), ClientMessage::GetFloatAboveFullscreen => self.handle_get_float_above_fullscreen(),
ClientMessage::GetFloatPinned { seat } => { ClientMessage::GetSeatFloatPinned { seat } => self
self.handle_get_float_pinned(seat).wrn("get_float_pinned")? .handle_get_seat_float_pinned(seat)
} .wrn("get_seat_float_pinned")?,
ClientMessage::SetFloatPinned { seat, pinned } => self ClientMessage::SetSeatFloatPinned { seat, pinned } => self
.handle_set_float_pinned(seat, pinned) .handle_set_seat_float_pinned(seat, pinned)
.wrn("set_float_pinned")?, .wrn("set_seat_float_pinned")?,
ClientMessage::SetShowFloatPinIcon { show } => { ClientMessage::SetShowFloatPinIcon { show } => {
self.handle_set_show_float_pin_icon(show) self.handle_set_show_float_pin_icon(show)
} }

View file

@ -214,14 +214,14 @@ impl TestConfig {
} }
pub fn create_split(&self, seat: SeatId, axis: Axis) -> TestResult { pub fn create_split(&self, seat: SeatId, axis: Axis) -> TestResult {
self.send(ClientMessage::CreateSplit { self.send(ClientMessage::CreateSeatSplit {
seat: Seat(seat.raw() as _), seat: Seat(seat.raw() as _),
axis, axis,
}) })
} }
pub fn set_mono(&self, seat: SeatId, mono: bool) -> TestResult { pub fn set_mono(&self, seat: SeatId, mono: bool) -> TestResult {
self.send(ClientMessage::SetMono { self.send(ClientMessage::SetSeatMono {
seat: Seat(seat.raw() as _), seat: Seat(seat.raw() as _),
mono, mono,
}) })
@ -248,14 +248,14 @@ impl TestConfig {
} }
pub fn focus(&self, seat: SeatId, direction: Direction) -> TestResult { pub fn focus(&self, seat: SeatId, direction: Direction) -> TestResult {
self.send(ClientMessage::Focus { self.send(ClientMessage::SeatFocus {
seat: Seat(seat.raw() as _), seat: Seat(seat.raw() as _),
direction, direction,
}) })
} }
pub fn set_fullscreen(&self, seat: SeatId, fs: bool) -> TestResult { pub fn set_fullscreen(&self, seat: SeatId, fs: bool) -> TestResult {
self.send(ClientMessage::SetFullscreen { self.send(ClientMessage::SetSeatFullscreen {
seat: Seat(seat.raw() as _), seat: Seat(seat.raw() as _),
fullscreen: fs, fullscreen: fs,
}) })
@ -270,7 +270,7 @@ impl TestConfig {
} }
pub fn set_floating(&self, seat: SeatId, floating: bool) -> TestResult { pub fn set_floating(&self, seat: SeatId, floating: bool) -> TestResult {
self.send(ClientMessage::SetFloating { self.send(ClientMessage::SetSeatFloating {
seat: Seat(seat.raw() as _), seat: Seat(seat.raw() as _),
floating, floating,
}) })