config: split request dispatch
This commit is contained in:
parent
b5b690d9cf
commit
899d39a320
2 changed files with 725 additions and 719 deletions
|
|
@ -87,6 +87,8 @@ use {
|
|||
uapi::{OwnedFd, c, fcntl_dupfd_cloexec},
|
||||
};
|
||||
|
||||
mod dispatch;
|
||||
|
||||
pub(super) struct ConfigProxyHandler {
|
||||
pub client_data: Cell<*const u8>,
|
||||
pub dropped: Cell<bool>,
|
||||
|
|
@ -2806,725 +2808,6 @@ impl ConfigProxyHandler {
|
|||
Ok(())
|
||||
}
|
||||
|
||||
pub fn handle_request(self: &Rc<Self>, msg: &ClientMessage<'_>) {
|
||||
if let Err(e) = self.handle_request_(msg) {
|
||||
log::error!("Could not handle client request: {}", ErrorFmt(e));
|
||||
}
|
||||
}
|
||||
|
||||
fn handle_request_(self: &Rc<Self>, request: &ClientMessage<'_>) -> Result<(), CphError> {
|
||||
let request = request.clone();
|
||||
match request {
|
||||
ClientMessage::Log {
|
||||
level,
|
||||
msg,
|
||||
file,
|
||||
line,
|
||||
} => self.handle_log_request(level, msg, file, line),
|
||||
ClientMessage::GetSeat { name } => self.handle_get_seat(name),
|
||||
ClientMessage::ParseKeymap { keymap } => {
|
||||
self.handle_parse_keymap(keymap).wrn("parse_keymap")?
|
||||
}
|
||||
ClientMessage::SeatSetKeymap { seat, keymap } => {
|
||||
self.handle_set_keymap(seat, keymap).wrn("set_keymap")?
|
||||
}
|
||||
ClientMessage::SeatGetRepeatRate { seat } => {
|
||||
self.handle_get_repeat_rate(seat).wrn("get_repeat_rate")?
|
||||
}
|
||||
ClientMessage::SeatSetRepeatRate { seat, rate, delay } => self
|
||||
.handle_set_repeat_rate(seat, rate, delay)
|
||||
.wrn("set_repeat_rate")?,
|
||||
ClientMessage::SetSeat { device, seat } => {
|
||||
self.handle_set_seat(device, seat).wrn("set_seat")?
|
||||
}
|
||||
ClientMessage::GetSeatMono { seat } => {
|
||||
self.handle_get_seat_mono(seat).wrn("get_seat_mono")?
|
||||
}
|
||||
ClientMessage::SetSeatMono { seat, mono } => {
|
||||
self.handle_set_seat_mono(seat, mono).wrn("set_seat_mono")?
|
||||
}
|
||||
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
|
||||
.handle_add_shortcut(seat, Modifiers(!0), mods, sym)
|
||||
.wrn("add_shortcut")?,
|
||||
ClientMessage::RemoveShortcut { seat, mods, sym } => self
|
||||
.handle_remove_shortcut(seat, mods, sym)
|
||||
.wrn("remove_shortcut")?,
|
||||
ClientMessage::SeatFocus { seat, direction } => {
|
||||
self.handle_seat_focus(seat, direction).wrn("seat_focus")?
|
||||
}
|
||||
ClientMessage::SeatMove { seat, direction } => {
|
||||
self.handle_seat_move(seat, direction).wrn("seat_move")?
|
||||
}
|
||||
ClientMessage::GetInputDevices { seat } => self.handle_get_input_devices(seat),
|
||||
ClientMessage::GetSeats => self.handle_get_seats(),
|
||||
ClientMessage::RemoveSeat { .. } => {}
|
||||
ClientMessage::Run { prog, args, env } => {
|
||||
self.handle_run(prog, args, env, vec![]).wrn("run")?
|
||||
}
|
||||
ClientMessage::GrabKb { kb, grab } => self.handle_grab(kb, grab).wrn("grab")?,
|
||||
ClientMessage::SetColor { colorable, color } => {
|
||||
self.handle_set_color(colorable, color).wrn("set_color")?
|
||||
}
|
||||
ClientMessage::GetColor { colorable } => {
|
||||
self.handle_get_color(colorable).wrn("get_color")?
|
||||
}
|
||||
ClientMessage::CreateSeatSplit { seat, axis } => self
|
||||
.handle_create_seat_split(seat, axis)
|
||||
.wrn("create_seat_split")?,
|
||||
ClientMessage::FocusSeatParent { seat } => self
|
||||
.handle_focus_seat_parent(seat)
|
||||
.wrn("focus_seat_parent")?,
|
||||
ClientMessage::GetSeatFloating { seat } => self
|
||||
.handle_get_seat_floating(seat)
|
||||
.wrn("get_seat_floating")?,
|
||||
ClientMessage::SetSeatFloating { seat, floating } => self
|
||||
.handle_set_seat_floating(seat, floating)
|
||||
.wrn("set_seat_floating")?,
|
||||
ClientMessage::Quit => self.handle_quit(),
|
||||
ClientMessage::SwitchTo { vtnr } => self.handle_switch_to(vtnr),
|
||||
ClientMessage::HasCapability { device, cap } => self
|
||||
.handle_has_capability(device, cap)
|
||||
.wrn("has_capability")?,
|
||||
ClientMessage::SetLeftHanded {
|
||||
device,
|
||||
left_handed,
|
||||
} => self
|
||||
.handle_set_left_handed(device, left_handed)
|
||||
.wrn("set_left_handed")?,
|
||||
ClientMessage::SetAccelProfile { device, profile } => self
|
||||
.handle_set_accel_profile(device, profile)
|
||||
.wrn("set_accel_profile")?,
|
||||
ClientMessage::SetAccelSpeed { device, speed } => self
|
||||
.handle_set_accel_speed(device, speed)
|
||||
.wrn("set_accel_speed")?,
|
||||
ClientMessage::SetTransformMatrix { device, matrix } => self
|
||||
.handle_set_transform_matrix(device, matrix)
|
||||
.wrn("set_transform_matrix")?,
|
||||
ClientMessage::GetDeviceName { device } => {
|
||||
self.handle_get_device_name(device).wrn("get_device_name")?
|
||||
}
|
||||
ClientMessage::GetWorkspace { name } => self.handle_get_workspace(name),
|
||||
ClientMessage::ShowWorkspace { seat, workspace } => self
|
||||
.handle_show_workspace(seat, workspace, None)
|
||||
.wrn("show_workspace")?,
|
||||
ClientMessage::SetSeatWorkspace { seat, workspace } => self
|
||||
.handle_set_seat_workspace(seat, workspace)
|
||||
.wrn("set_seat_workspace")?,
|
||||
ClientMessage::GetConnector { ty, idx } => {
|
||||
self.handle_get_connector(ty, idx).wrn("get_connector")?
|
||||
}
|
||||
ClientMessage::ConnectorConnected { connector } => self
|
||||
.handle_connector_connected(connector)
|
||||
.wrn("connector_connected")?,
|
||||
ClientMessage::ConnectorType { connector } => self
|
||||
.handle_connector_type(connector)
|
||||
.wrn("connector_type")?,
|
||||
ClientMessage::ConnectorMode { connector } => self
|
||||
.handle_connector_mode(connector)
|
||||
.wrn("connector_mode")?,
|
||||
ClientMessage::ConnectorSetPosition { connector, x, y } => self
|
||||
.handle_connector_set_position(connector, x, y)
|
||||
.wrn("connector_set_position")?,
|
||||
ClientMessage::ConnectorSetEnabled { connector, enabled } => self
|
||||
.handle_connector_set_enabled(connector, enabled)
|
||||
.wrn("connector_set_enabled")?,
|
||||
ClientMessage::SeatClose { seat } => self.handle_seat_close(seat).wrn("seat_close")?,
|
||||
ClientMessage::SetStatus { status } => self.handle_set_status(status),
|
||||
ClientMessage::GetTimer { name } => self.handle_get_timer(name).wrn("get_timer")?,
|
||||
ClientMessage::RemoveTimer { timer } => {
|
||||
self.handle_remove_timer(timer).wrn("remove_timer")?
|
||||
}
|
||||
ClientMessage::ProgramTimer {
|
||||
timer,
|
||||
initial,
|
||||
periodic,
|
||||
} => self
|
||||
.handle_program_timer(timer, initial, periodic)
|
||||
.wrn("program_timer")?,
|
||||
ClientMessage::SetEnv { key, val } => self.handle_set_env(key, val),
|
||||
ClientMessage::SetSeatFullscreen { seat, fullscreen } => self
|
||||
.handle_set_seat_fullscreen(seat, fullscreen)
|
||||
.wrn("set_seat_fullscreen")?,
|
||||
ClientMessage::GetSeatFullscreen { seat } => self
|
||||
.handle_get_seat_fullscreen(seat)
|
||||
.wrn("get_seat_fullscreen")?,
|
||||
ClientMessage::Reload => self.handle_reload(),
|
||||
ClientMessage::GetDeviceConnectors { device } => self
|
||||
.handle_get_connectors(Some(device), false)
|
||||
.wrn("get_device_connectors")?,
|
||||
ClientMessage::GetDrmDeviceSyspath { device } => self
|
||||
.handle_get_drm_device_syspath(device)
|
||||
.wrn("get_drm_device_syspath")?,
|
||||
ClientMessage::GetDrmDeviceVendor { device } => self
|
||||
.handle_get_drm_device_vendor(device)
|
||||
.wrn("get_drm_device_vendor")?,
|
||||
ClientMessage::GetDrmDeviceModel { device } => self
|
||||
.handle_get_drm_device_model(device)
|
||||
.wrn("get_drm_device_model")?,
|
||||
ClientMessage::GetDrmDevices => self.handle_get_drm_devices(),
|
||||
ClientMessage::GetDrmDevicePciId { device } => self
|
||||
.handle_get_drm_device_pci_id(device)
|
||||
.wrn("get_drm_device_pci_id")?,
|
||||
ClientMessage::ResetColors => self.handle_reset_colors(),
|
||||
ClientMessage::ResetSizes => self.handle_reset_sizes(),
|
||||
ClientMessage::GetSize { sized } => self.handle_get_size(sized).wrn("get_size")?,
|
||||
ClientMessage::SetSize { sized, size } => {
|
||||
self.handle_set_size(sized, size).wrn("set_size")?
|
||||
}
|
||||
ClientMessage::ResetFont => self.handle_reset_font(),
|
||||
ClientMessage::GetFont => self.handle_get_font(),
|
||||
ClientMessage::SetFont { font } => self.handle_set_font(font),
|
||||
ClientMessage::SetPxPerWheelScroll { device, px } => self
|
||||
.handle_set_px_per_wheel_scroll(device, px)
|
||||
.wrn("set_px_per_wheel_scroll")?,
|
||||
ClientMessage::ConnectorSetScale { connector, scale } => self
|
||||
.handle_connector_set_scale(connector, scale)
|
||||
.wrn("connector_set_scale")?,
|
||||
ClientMessage::ConnectorGetScale { connector } => self
|
||||
.handle_connector_get_scale(connector)
|
||||
.wrn("connector_get_scale")?,
|
||||
ClientMessage::ConnectorSize { connector } => self
|
||||
.handle_connector_size(connector)
|
||||
.wrn("connector_size")?,
|
||||
ClientMessage::SetCursorSize { seat, size } => self
|
||||
.handle_set_cursor_size(seat, size)
|
||||
.wrn("set_cursor_size")?,
|
||||
ClientMessage::SetTapEnabled { device, enabled } => self
|
||||
.handle_set_tap_enabled(device, enabled)
|
||||
.wrn("set_tap_enabled")?,
|
||||
ClientMessage::SetDragEnabled { device, enabled } => self
|
||||
.handle_set_drag_enabled(device, enabled)
|
||||
.wrn("set_drag_enabled")?,
|
||||
ClientMessage::SetDragLockEnabled { device, enabled } => self
|
||||
.handle_set_drag_lock_enabled(device, enabled)
|
||||
.wrn("set_drag_lock_enabled")?,
|
||||
ClientMessage::SetUseHardwareCursor {
|
||||
seat,
|
||||
use_hardware_cursor,
|
||||
} => self
|
||||
.handle_set_use_hardware_cursor(seat, use_hardware_cursor)
|
||||
.wrn("set_use_hardware_cursor")?,
|
||||
ClientMessage::DisablePointerConstraint { seat } => self
|
||||
.handle_disable_pointer_constraint(seat)
|
||||
.wrn("disable_pointer_constraint")?,
|
||||
ClientMessage::MakeRenderDevice { device } => self
|
||||
.handle_make_render_device(device)
|
||||
.wrn("make_render_device")?,
|
||||
ClientMessage::GetSeatCursorWorkspace { seat } => self
|
||||
.handle_get_seat_cursor_workspace(seat)
|
||||
.wrn("get_seat_cursor_workspace")?,
|
||||
ClientMessage::GetSeatKeyboardWorkspace { seat } => self
|
||||
.handle_get_seat_keyboard_workspace(seat)
|
||||
.wrn("get_seat_keyboard_workspace")?,
|
||||
ClientMessage::SetDefaultWorkspaceCapture { capture } => {
|
||||
self.handle_set_default_workspace_capture(capture)
|
||||
}
|
||||
ClientMessage::GetDefaultWorkspaceCapture => {
|
||||
self.handle_get_default_workspace_capture()
|
||||
}
|
||||
ClientMessage::SetWorkspaceCapture { workspace, capture } => self
|
||||
.handle_set_workspace_capture(workspace, capture)
|
||||
.wrn("set_workspace_capture")?,
|
||||
ClientMessage::GetWorkspaceCapture { workspace } => self
|
||||
.handle_get_workspace_capture(workspace)
|
||||
.wrn("get_workspace_capture")?,
|
||||
ClientMessage::SetNaturalScrollingEnabled { device, enabled } => self
|
||||
.handle_set_natural_scrolling_enabled(device, enabled)
|
||||
.wrn("set_natural_scrolling_enabled")?,
|
||||
ClientMessage::SetGfxApi { device, api } => {
|
||||
self.handle_set_gfx_api(device, api).wrn("set_gfx_api")?
|
||||
}
|
||||
ClientMessage::SetDirectScanoutEnabled { device, enabled } => self
|
||||
.handle_set_direct_scanout_enabled(device, enabled)
|
||||
.wrn("set_direct_scanout_enabled")?,
|
||||
ClientMessage::ConnectorSetTransform {
|
||||
connector,
|
||||
transform,
|
||||
} => self
|
||||
.handle_connector_set_transform(connector, transform)
|
||||
.wrn("connector_set_transform")?,
|
||||
ClientMessage::SetDoubleClickIntervalUsec { usec } => {
|
||||
self.handle_set_double_click_interval_usec(usec)
|
||||
}
|
||||
ClientMessage::SetDoubleClickDistance { dist } => {
|
||||
self.handle_set_double_click_distance(dist)
|
||||
}
|
||||
ClientMessage::ConnectorModes { connector } => self
|
||||
.handle_connector_modes(connector)
|
||||
.wrn("connector_modes")?,
|
||||
ClientMessage::ConnectorSetMode { connector, mode } => self
|
||||
.handle_connector_set_mode(connector, mode)
|
||||
.wrn("connector_set_mode")?,
|
||||
ClientMessage::AddPollable { fd } => {
|
||||
self.handle_add_pollable(fd).wrn("add_pollable")?
|
||||
}
|
||||
ClientMessage::RemovePollable { id } => self.handle_remove_pollable(id),
|
||||
ClientMessage::AddInterest { pollable, writable } => self
|
||||
.handle_add_interest(pollable, writable)
|
||||
.wrn("add_interest")?,
|
||||
ClientMessage::Run2 {
|
||||
prog,
|
||||
args,
|
||||
env,
|
||||
fds,
|
||||
} => self.handle_run(prog, args, env, fds).wrn("run")?,
|
||||
ClientMessage::DisableDefaultSeat => self.state.create_default_seat.set(false),
|
||||
ClientMessage::DestroyKeymap { keymap } => self.handle_destroy_keymap(keymap),
|
||||
ClientMessage::GetConnectorName { connector } => self
|
||||
.handle_connector_name(connector)
|
||||
.wrn("connector_name")?,
|
||||
ClientMessage::GetConnectorModel { connector } => self
|
||||
.handle_connector_model(connector)
|
||||
.wrn("connector_model")?,
|
||||
ClientMessage::GetConnectorManufacturer { connector } => self
|
||||
.handle_connector_manufacturer(connector)
|
||||
.wrn("connector_manufacturer")?,
|
||||
ClientMessage::GetConnectorSerialNumber { connector } => self
|
||||
.handle_connector_serial_number(connector)
|
||||
.wrn("connector_serial_number")?,
|
||||
ClientMessage::GetConnectors {
|
||||
device,
|
||||
connected_only,
|
||||
} => self
|
||||
.handle_get_connectors(device, connected_only)
|
||||
.wrn("get_connectors")?,
|
||||
ClientMessage::ConnectorGetPosition { connector } => self
|
||||
.handle_connector_get_position(connector)
|
||||
.wrn("connector_get_position")?,
|
||||
ClientMessage::GetConfigDir => self.handle_get_config_dir(),
|
||||
ClientMessage::GetWorkspaces => self.handle_get_workspaces(),
|
||||
ClientMessage::UnsetEnv { key } => self.handle_unset_env(key),
|
||||
ClientMessage::SetLogLevel { level } => self.handle_set_log_level(level),
|
||||
ClientMessage::GetDrmDeviceDevnode { device } => self
|
||||
.handle_get_drm_device_devnode(device)
|
||||
.wrn("get_drm_device_devnode")?,
|
||||
ClientMessage::GetInputDeviceSyspath { device } => self
|
||||
.handle_get_input_device_syspath(device)
|
||||
.wrn("get_input_device_syspath")?,
|
||||
ClientMessage::GetInputDeviceDevnode { device } => self
|
||||
.handle_get_input_device_devnode(device)
|
||||
.wrn("get_input_device_devnode")?,
|
||||
ClientMessage::SetIdle { timeout } => self.handle_set_idle(timeout),
|
||||
ClientMessage::SetKeyPressEnablesDpms { enabled } => {
|
||||
self.handle_set_key_press_enables_dpms(enabled)
|
||||
}
|
||||
ClientMessage::SetMouseMoveEnablesDpms { enabled } => {
|
||||
self.handle_set_mouse_move_enables_dpms(enabled)
|
||||
}
|
||||
ClientMessage::MoveToOutput {
|
||||
workspace,
|
||||
connector,
|
||||
} => self
|
||||
.handle_move_to_output(workspace, connector)
|
||||
.wrn("move_to_output")?,
|
||||
ClientMessage::SetExplicitSyncEnabled { enabled } => {
|
||||
self.handle_set_explicit_sync_enabled(enabled)
|
||||
}
|
||||
ClientMessage::DeviceSetKeymap { device, keymap } => self
|
||||
.handle_set_device_keymap(device, keymap)
|
||||
.wrn("set_device_keymap")?,
|
||||
ClientMessage::SetForward { seat, forward } => {
|
||||
self.handle_set_forward(seat, forward).wrn("set_forward")?
|
||||
}
|
||||
ClientMessage::AddShortcut2 {
|
||||
seat,
|
||||
mod_mask,
|
||||
mods,
|
||||
sym,
|
||||
} => self
|
||||
.handle_add_shortcut(seat, mod_mask, mods, sym)
|
||||
.wrn("add_shortcut")?,
|
||||
ClientMessage::SetFocusFollowsMouseMode { seat, mode } => self
|
||||
.handle_set_focus_follows_mouse_mode(seat, mode)
|
||||
.wrn("set_focus_follows_mouse_mode")?,
|
||||
ClientMessage::SetInputDeviceConnector {
|
||||
input_device,
|
||||
connector,
|
||||
} => self
|
||||
.handle_set_input_device_connector(input_device, connector)
|
||||
.wrn("set_input_device_connector")?,
|
||||
ClientMessage::RemoveInputMapping { input_device } => self
|
||||
.handle_remove_input_mapping(input_device)
|
||||
.wrn("remove_input_mapping")?,
|
||||
ClientMessage::SetWindowManagementEnabled { seat, enabled } => self
|
||||
.handle_set_window_management_enabled(seat, enabled)
|
||||
.wrn("set_window_management_enabled")?,
|
||||
ClientMessage::SetVrrMode { connector, mode } => self
|
||||
.handle_set_vrr_mode(connector, mode)
|
||||
.wrn("set_vrr_mode")?,
|
||||
ClientMessage::SetVrrCursorHz { connector, hz } => self
|
||||
.handle_set_vrr_cursor_hz(connector, hz)
|
||||
.wrn("set_vrr_cursor_hz")?,
|
||||
ClientMessage::SetTearingMode { connector, mode } => self
|
||||
.handle_set_tearing_mode(connector, mode)
|
||||
.wrn("set_tearing_mode")?,
|
||||
ClientMessage::SetCalibrationMatrix { device, matrix } => self
|
||||
.handle_set_calibration_matrix(device, matrix)
|
||||
.wrn("set_calibration_matrix")?,
|
||||
ClientMessage::SetEiSocketEnabled { enabled } => {
|
||||
self.handle_set_ei_socket_enabled(enabled)
|
||||
}
|
||||
ClientMessage::ConnectorSetFormat { connector, format } => self
|
||||
.handle_connector_set_format(connector, format)
|
||||
.wrn("connector_set_format")?,
|
||||
ClientMessage::SetFlipMargin { device, margin } => self
|
||||
.handle_set_flip_margin(device, margin)
|
||||
.wrn("set_flip_margin")?,
|
||||
ClientMessage::SetUiDragEnabled { enabled } => self.handle_set_ui_drag_enabled(enabled),
|
||||
ClientMessage::SetUiDragThreshold { threshold } => {
|
||||
self.handle_set_ui_drag_threshold(threshold)
|
||||
}
|
||||
ClientMessage::SetAnimationsEnabled { enabled } => {
|
||||
self.handle_set_animations_enabled(enabled)
|
||||
}
|
||||
ClientMessage::SetAnimationDurationMs { duration_ms } => {
|
||||
self.handle_set_animation_duration_ms(duration_ms)
|
||||
}
|
||||
ClientMessage::SetAnimationCurve { curve } => self.handle_set_animation_curve(curve),
|
||||
ClientMessage::SetAnimationStyle { style } => self.handle_set_animation_style(style),
|
||||
ClientMessage::SetAnimationCubicBezier { x1, y1, x2, y2 } => {
|
||||
self.handle_set_animation_cubic_bezier(x1, y1, x2, y2)
|
||||
}
|
||||
ClientMessage::SetXScalingMode { mode } => self
|
||||
.handle_set_x_scaling_mode(mode)
|
||||
.wrn("set_x_scaling_mode")?,
|
||||
ClientMessage::SetIdleGracePeriod { period } => {
|
||||
self.handle_set_idle_grace_period(period)
|
||||
}
|
||||
ClientMessage::SetColorManagementEnabled { enabled } => {
|
||||
self.handle_set_color_management_enabled(enabled)
|
||||
}
|
||||
ClientMessage::ConnectorSetColors {
|
||||
connector,
|
||||
color_space,
|
||||
eotf,
|
||||
} => self
|
||||
.handle_connector_set_colors(connector, color_space, eotf)
|
||||
.wrn("connector_set_colors")?,
|
||||
ClientMessage::ConnectorSetBrightness {
|
||||
connector,
|
||||
brightness,
|
||||
} => self
|
||||
.handle_connector_set_brightness(connector, brightness)
|
||||
.wrn("connector_set_brightness")?,
|
||||
ClientMessage::SetFloatAboveFullscreen { above } => {
|
||||
self.handle_set_float_above_fullscreen(above)
|
||||
}
|
||||
ClientMessage::GetFloatAboveFullscreen => self.handle_get_float_above_fullscreen(),
|
||||
ClientMessage::GetSeatFloatPinned { seat } => self
|
||||
.handle_get_seat_float_pinned(seat)
|
||||
.wrn("get_seat_float_pinned")?,
|
||||
ClientMessage::SetSeatFloatPinned { seat, pinned } => self
|
||||
.handle_set_seat_float_pinned(seat, pinned)
|
||||
.wrn("set_seat_float_pinned")?,
|
||||
ClientMessage::SetShowFloatPinIcon { show } => {
|
||||
self.handle_set_show_float_pin_icon(show)
|
||||
}
|
||||
ClientMessage::GetConnectorActiveWorkspace { connector } => self
|
||||
.handle_get_connector_active_workspace(connector)
|
||||
.wrn("get_connector_active_workspace")?,
|
||||
ClientMessage::GetConnectorWorkspaces { connector } => self
|
||||
.handle_get_connector_workspaces(connector)
|
||||
.wrn("get_connector_workspaces")?,
|
||||
ClientMessage::GetWorkspaceConnector { workspace } => self
|
||||
.handle_get_workspace_connector(workspace)
|
||||
.wrn("get_workspace_connector")?,
|
||||
ClientMessage::GetConnectorInDirection {
|
||||
connector,
|
||||
direction,
|
||||
} => self
|
||||
.handle_get_connector_in_direction(connector, direction)
|
||||
.wrn("get_connector_in_direction")?,
|
||||
ClientMessage::GetClients => self.handle_get_clients(),
|
||||
ClientMessage::ClientExists { client } => self.handle_client_exists(client),
|
||||
ClientMessage::ClientIsXwayland { client } => self
|
||||
.handle_client_is_xwayland(client)
|
||||
.wrn("client_is_xwayland")?,
|
||||
ClientMessage::ClientKill { client } => self.handle_client_kill(client),
|
||||
ClientMessage::WindowExists { window } => self.handle_window_exists(window),
|
||||
ClientMessage::GetWorkspaceWindow { workspace } => self
|
||||
.handle_get_workspace_window(workspace)
|
||||
.wrn("get_workspace_window")?,
|
||||
ClientMessage::GetSeatKeyboardWindow { seat } => self
|
||||
.handle_get_seat_keyboard_window(seat)
|
||||
.wrn("get_seat_keyboard_window")?,
|
||||
ClientMessage::SeatFocusWindow { seat, window } => self
|
||||
.handle_seat_focus_window(seat, window)
|
||||
.wrn("seat_focus_window")?,
|
||||
ClientMessage::GetWindowTitle { window } => self
|
||||
.handle_get_window_title(window)
|
||||
.wrn("get_window_title")?,
|
||||
ClientMessage::GetWindowType { window } => {
|
||||
self.handle_get_window_type(window).wrn("get_window_type")?
|
||||
}
|
||||
ClientMessage::GetWindowId { window } => {
|
||||
self.handle_get_window_id(window).wrn("get_window_id")?
|
||||
}
|
||||
ClientMessage::GetWindowParent { window } => self
|
||||
.handle_get_window_parent(window)
|
||||
.wrn("get_window_parent")?,
|
||||
ClientMessage::GetWindowWorkspace { window } => self
|
||||
.handle_get_window_workspace(window)
|
||||
.wrn("get_window_workspace")?,
|
||||
ClientMessage::GetWindowChildren { window } => self
|
||||
.handle_get_window_children(window)
|
||||
.wrn("get_window_children")?,
|
||||
ClientMessage::GetWindowSplit { window } => self
|
||||
.handle_get_window_split(window)
|
||||
.wrn("get_window_split")?,
|
||||
ClientMessage::SetWindowSplit { window, axis } => self
|
||||
.handle_set_window_split(window, axis)
|
||||
.wrn("set_window_split")?,
|
||||
ClientMessage::GetWindowMono { window } => {
|
||||
self.handle_get_window_mono(window).wrn("get_window_mono")?
|
||||
}
|
||||
ClientMessage::SetWindowMono { window, mono } => self
|
||||
.handle_set_window_mono(window, mono)
|
||||
.wrn("set_window_mono")?,
|
||||
ClientMessage::WindowMove { window, direction } => self
|
||||
.handle_window_move(window, direction)
|
||||
.wrn("window_move")?,
|
||||
ClientMessage::CreateWindowSplit { window, axis } => self
|
||||
.handle_create_window_split(window, axis)
|
||||
.wrn("create_window_split")?,
|
||||
ClientMessage::WindowClose { window } => {
|
||||
self.handle_window_close(window).wrn("close_window")?
|
||||
}
|
||||
ClientMessage::GetWindowFloating { window } => self
|
||||
.handle_get_window_floating(window)
|
||||
.wrn("get_window_floating")?,
|
||||
ClientMessage::SetWindowFloating { window, floating } => self
|
||||
.handle_set_window_floating(window, floating)
|
||||
.wrn("set_window_floating")?,
|
||||
ClientMessage::SetWindowWorkspace { window, workspace } => self
|
||||
.handle_set_window_workspace(window, workspace)
|
||||
.wrn("set_window_workspace")?,
|
||||
ClientMessage::SetWindowFullscreen { window, fullscreen } => self
|
||||
.handle_set_window_fullscreen(window, fullscreen)
|
||||
.wrn("set_window_fullscreen")?,
|
||||
ClientMessage::GetWindowFullscreen { window } => self
|
||||
.handle_get_window_fullscreen(window)
|
||||
.wrn("get_window_fullscreen")?,
|
||||
ClientMessage::GetWindowFloatPinned { window } => self
|
||||
.handle_get_window_float_pinned(window)
|
||||
.wrn("get_window_float_pinned")?,
|
||||
ClientMessage::SetWindowFloatPinned { window, pinned } => self
|
||||
.handle_set_window_float_pinned(window, pinned)
|
||||
.wrn("set_window_float_pinned")?,
|
||||
ClientMessage::GetWindowIsVisible { window } => self
|
||||
.handle_get_window_is_visible(window)
|
||||
.wrn("get_window_is_visible")?,
|
||||
ClientMessage::GetWindowClient { window } => self
|
||||
.handle_get_window_client(window)
|
||||
.wrn("get_window_client")?,
|
||||
ClientMessage::CreateClientMatcher { criterion } => self
|
||||
.handle_create_client_matcher(criterion)
|
||||
.wrn("create_window_matcher")?,
|
||||
ClientMessage::DestroyClientMatcher { matcher } => {
|
||||
self.handle_destroy_client_matcher(matcher)
|
||||
}
|
||||
ClientMessage::EnableClientMatcherEvents { matcher } => self
|
||||
.handle_enable_client_matcher_events(matcher)
|
||||
.wrn("enable_window_matcher_events")?,
|
||||
ClientMessage::CreateWindowMatcher { criterion } => self
|
||||
.handle_create_window_matcher(criterion)
|
||||
.wrn("create_window_matcher")?,
|
||||
ClientMessage::DestroyWindowMatcher { matcher } => {
|
||||
self.handle_destroy_window_matcher(matcher)
|
||||
}
|
||||
ClientMessage::EnableWindowMatcherEvents { matcher } => self
|
||||
.handle_enable_window_matcher_events(matcher)
|
||||
.wrn("enable_window_matcher_events")?,
|
||||
ClientMessage::SetWindowMatcherAutoFocus {
|
||||
matcher,
|
||||
auto_focus,
|
||||
} => self
|
||||
.handle_set_window_matcher_auto_focus(matcher, auto_focus)
|
||||
.wrn("set_window_matcher_auto_focus")?,
|
||||
ClientMessage::SetWindowMatcherInitialTileState {
|
||||
matcher,
|
||||
tile_state,
|
||||
} => self
|
||||
.handle_set_window_matcher_initial_tile_state(matcher, tile_state)
|
||||
.wrn("set_window_matcher_initial_tile_state")?,
|
||||
ClientMessage::SetPointerRevertKey { seat, key } => self
|
||||
.handle_set_pointer_revert_key(seat, key)
|
||||
.wrn("set_pointer_revert_key")?,
|
||||
ClientMessage::SetClickMethod { device, method } => self
|
||||
.handle_set_click_method(device, method)
|
||||
.wrn("set_click_method")?,
|
||||
ClientMessage::SetMiddleButtonEmulationEnabled { device, enabled } => self
|
||||
.handle_set_middle_button_emulation_enabled(device, enabled)
|
||||
.wrn("set_middle_button_emulation_enabled")?,
|
||||
ClientMessage::GetContentType { window } => self
|
||||
.handle_get_content_type(window)
|
||||
.wrn("get_content_type")?,
|
||||
ClientMessage::SetShowBar { show } => self.handle_set_show_bar(show),
|
||||
ClientMessage::GetShowBar => self.handle_get_show_bar(),
|
||||
ClientMessage::SetShowTitles { show } => self.handle_set_show_titles(show),
|
||||
ClientMessage::GetShowTitles => self.handle_get_show_titles(),
|
||||
ClientMessage::SetFloatingTitles { floating } => {
|
||||
self.handle_set_floating_titles(floating)
|
||||
}
|
||||
ClientMessage::GetFloatingTitles => self.handle_get_floating_titles(),
|
||||
ClientMessage::SetBarPosition { position } => self
|
||||
.handle_set_bar_position(position)
|
||||
.wrn("set_bar_position")?,
|
||||
ClientMessage::GetBarPosition => self.handle_get_bar_position(),
|
||||
ClientMessage::SetCornerRadius { radius } => self.handle_set_corner_radius(radius),
|
||||
ClientMessage::GetCornerRadius => self.handle_get_corner_radius(),
|
||||
ClientMessage::SeatFocusHistory { seat, timeline } => self
|
||||
.handle_seat_focus_history(seat, timeline)
|
||||
.wrn("seat_focus_history")?,
|
||||
ClientMessage::SeatFocusHistorySetOnlyVisible { seat, only_visible } => self
|
||||
.handle_seat_focus_history_set_only_visible(seat, only_visible)
|
||||
.wrn("seat_focus_history_set_only_visible")?,
|
||||
ClientMessage::SeatFocusHistorySetSameWorkspace {
|
||||
seat,
|
||||
same_workspace,
|
||||
} => self
|
||||
.handle_seat_focus_history_set_same_workspace(seat, same_workspace)
|
||||
.wrn("seat_focus_history_set_same_workspace")?,
|
||||
ClientMessage::SeatFocusLayerRel { seat, direction } => self
|
||||
.handle_seat_focus_layer_rel(seat, direction)
|
||||
.wrn("seat_focus_layer_rel")?,
|
||||
ClientMessage::SeatFocusTiles { seat } => {
|
||||
self.handle_seat_focus_tiles(seat).wrn("seat_focus_tiles")?
|
||||
}
|
||||
ClientMessage::SeatFocusFloats { seat } => self
|
||||
.handle_seat_focus_floats(seat)
|
||||
.wrn("seat_focus_floats")?,
|
||||
ClientMessage::SeatToggleFocusFloatTiled { seat } => self
|
||||
.handle_seat_toggle_focus_float_tiled(seat)
|
||||
.wrn("seat_toggle_focus_float_tiled")?,
|
||||
ClientMessage::SetMiddleClickPasteEnabled { enabled } => {
|
||||
self.handle_set_middle_click_paste_enabled(enabled)
|
||||
}
|
||||
ClientMessage::SetWorkspaceDisplayOrder { order } => {
|
||||
self.handle_set_workspace_display_order(order)
|
||||
}
|
||||
ClientMessage::SeatCreateMark { seat, kc } => self
|
||||
.handle_seat_create_mark(seat, kc)
|
||||
.wrn("seat_create_mark")?,
|
||||
ClientMessage::SeatJumpToMark { seat, kc } => self
|
||||
.handle_seat_jump_to_mark(seat, kc)
|
||||
.wrn("seat_jump_to_mark")?,
|
||||
ClientMessage::SeatCopyMark { seat, src, dst } => self
|
||||
.handle_seat_copy_mark(seat, src, dst)
|
||||
.wrn("seat_copy_mark")?,
|
||||
ClientMessage::ConnectorSetBlendSpace {
|
||||
connector,
|
||||
blend_space,
|
||||
} => self
|
||||
.handle_connector_set_blend_space(connector, blend_space)
|
||||
.wrn("connector_set_blend_space")?,
|
||||
ClientMessage::SetBarFont { font } => self.handle_set_bar_font(font),
|
||||
ClientMessage::SetTitleFont { font } => self.handle_set_title_font(font),
|
||||
ClientMessage::ShowWorkspaceOn {
|
||||
seat,
|
||||
workspace,
|
||||
connector,
|
||||
} => self
|
||||
.handle_show_workspace(seat, workspace, Some(connector))
|
||||
.wrn("show_workspace_on")?,
|
||||
ClientMessage::SeatSetSimpleImEnabled { seat, enabled } => self
|
||||
.handle_seat_set_simple_im_enabled(seat, enabled)
|
||||
.wrn("seat_set_simple_im_enabled")?,
|
||||
ClientMessage::SeatGetSimpleImEnabled { seat } => self
|
||||
.handle_seat_get_simple_im_enabled(seat)
|
||||
.wrn("seat_get_simple_im_enabled")?,
|
||||
ClientMessage::SeatReloadSimpleIm { seat } => self
|
||||
.handle_seat_reload_simple_im(seat)
|
||||
.wrn("seat_reload_simple_im")?,
|
||||
ClientMessage::SeatEnableUnicodeInput { seat } => self
|
||||
.handle_seat_enable_unicode_input(seat)
|
||||
.wrn("seat_enable_unicode_input")?,
|
||||
ClientMessage::SeatWarpMouseToFocus { seat } => self
|
||||
.handle_seat_warp_mouse_to_focus(seat)
|
||||
.wrn("seat_warp_mouse_to_focus")?,
|
||||
ClientMessage::SeatSetMouseFollowsFocus { seat, enabled } => self
|
||||
.handle_seat_set_mouse_follows_focus(seat, enabled)
|
||||
.wrn("seat_set_mouse_follows_focus")?,
|
||||
ClientMessage::ConnectorSetUseNativeGamut {
|
||||
connector,
|
||||
use_native_gamut,
|
||||
} => self
|
||||
.handle_connector_set_use_native_gamut(connector, use_native_gamut)
|
||||
.wrn("connector_set_use_native_gamut")?,
|
||||
ClientMessage::KeymapFromNames {
|
||||
rules,
|
||||
model,
|
||||
groups,
|
||||
options,
|
||||
} => self
|
||||
.handle_keymap_from_names(rules, model, groups, options)
|
||||
.wrn("keymap_from_names")?,
|
||||
ClientMessage::SetFallbackOutputMode { seat, mode } => self
|
||||
.handle_set_fallback_output_mode(seat, mode)
|
||||
.wrn("set_fallback_output_mode")?,
|
||||
ClientMessage::SetXWaylandEnabled { enabled } => self
|
||||
.handle_set_x_wayland_enabled(enabled)
|
||||
.wrn("set_x_wayland_enabled")?,
|
||||
ClientMessage::ConnectorSupportsArbitraryModes { connector } => self
|
||||
.handle_connector_supports_arbitrary_modes(connector)
|
||||
.wrn("connector_supports_arbitrary_modes")?,
|
||||
ClientMessage::GetConnectorByName { name } => self.handle_get_connector_by_name(name),
|
||||
ClientMessage::CreateVirtualOutput { name } => self.handle_create_virtual_output(name),
|
||||
ClientMessage::RemoveVirtualOutput { name } => self.handle_remove_virtual_output(name),
|
||||
ClientMessage::CleanLogsOlderThan { time } => self.handle_clean_logs_older_than(time),
|
||||
ClientMessage::WindowResize {
|
||||
window,
|
||||
dx1,
|
||||
dy1,
|
||||
dx2,
|
||||
dy2,
|
||||
} => self
|
||||
.handle_window_resize(window, dx1, dy1, dx2, dy2)
|
||||
.wrn("window_resize")?,
|
||||
ClientMessage::SeatToggleTab { seat } => {
|
||||
self.handle_seat_toggle_tab(seat).wrn("seat_toggle_tab")?
|
||||
}
|
||||
ClientMessage::SeatMakeGroup {
|
||||
seat,
|
||||
axis,
|
||||
ephemeral,
|
||||
} => self
|
||||
.handle_seat_make_group(seat, axis, ephemeral)
|
||||
.wrn("seat_make_group")?,
|
||||
ClientMessage::SeatChangeGroupOpposite { seat } => self
|
||||
.handle_seat_change_group_opposite(seat)
|
||||
.wrn("seat_change_group_opposite")?,
|
||||
ClientMessage::SeatEqualize { seat, recursive } => self
|
||||
.handle_seat_equalize(seat, recursive)
|
||||
.wrn("seat_equalize")?,
|
||||
ClientMessage::SetAutotile { enabled } => {
|
||||
self.state.theme.autotile_enabled.set(enabled);
|
||||
}
|
||||
ClientMessage::SeatToggleExpand { .. } => {
|
||||
// Removed feature; kept for binary protocol compatibility.
|
||||
}
|
||||
ClientMessage::SetTabTitleAlign { align } => {
|
||||
use crate::theme::TabTitleAlign;
|
||||
let val = match align {
|
||||
1 => TabTitleAlign::Center,
|
||||
2 => TabTitleAlign::End,
|
||||
_ => TabTitleAlign::Start,
|
||||
};
|
||||
self.state.theme.tab_title_align.set(val);
|
||||
}
|
||||
ClientMessage::SeatMoveTab { seat, right } => self
|
||||
.handle_seat_move_tab(seat, right)
|
||||
.wrn("seat_move_tab")?,
|
||||
}
|
||||
Ok(())
|
||||
}
|
||||
|
||||
pub fn auto_focus(&self, data: &ToplevelData) -> bool {
|
||||
for matcher in self.window_matcher_no_auto_focus.lock().values() {
|
||||
if matcher.node.pull(data) {
|
||||
|
|
|
|||
723
src/config/handler/dispatch.rs
Normal file
723
src/config/handler/dispatch.rs
Normal file
|
|
@ -0,0 +1,723 @@
|
|||
use super::*;
|
||||
|
||||
impl ConfigProxyHandler {
|
||||
pub fn handle_request(self: &Rc<Self>, msg: &ClientMessage<'_>) {
|
||||
if let Err(e) = self.handle_request_(msg) {
|
||||
log::error!("Could not handle client request: {}", ErrorFmt(e));
|
||||
}
|
||||
}
|
||||
|
||||
fn handle_request_(self: &Rc<Self>, request: &ClientMessage<'_>) -> Result<(), CphError> {
|
||||
let request = request.clone();
|
||||
match request {
|
||||
ClientMessage::Log {
|
||||
level,
|
||||
msg,
|
||||
file,
|
||||
line,
|
||||
} => self.handle_log_request(level, msg, file, line),
|
||||
ClientMessage::GetSeat { name } => self.handle_get_seat(name),
|
||||
ClientMessage::ParseKeymap { keymap } => {
|
||||
self.handle_parse_keymap(keymap).wrn("parse_keymap")?
|
||||
}
|
||||
ClientMessage::SeatSetKeymap { seat, keymap } => {
|
||||
self.handle_set_keymap(seat, keymap).wrn("set_keymap")?
|
||||
}
|
||||
ClientMessage::SeatGetRepeatRate { seat } => {
|
||||
self.handle_get_repeat_rate(seat).wrn("get_repeat_rate")?
|
||||
}
|
||||
ClientMessage::SeatSetRepeatRate { seat, rate, delay } => self
|
||||
.handle_set_repeat_rate(seat, rate, delay)
|
||||
.wrn("set_repeat_rate")?,
|
||||
ClientMessage::SetSeat { device, seat } => {
|
||||
self.handle_set_seat(device, seat).wrn("set_seat")?
|
||||
}
|
||||
ClientMessage::GetSeatMono { seat } => {
|
||||
self.handle_get_seat_mono(seat).wrn("get_seat_mono")?
|
||||
}
|
||||
ClientMessage::SetSeatMono { seat, mono } => {
|
||||
self.handle_set_seat_mono(seat, mono).wrn("set_seat_mono")?
|
||||
}
|
||||
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
|
||||
.handle_add_shortcut(seat, Modifiers(!0), mods, sym)
|
||||
.wrn("add_shortcut")?,
|
||||
ClientMessage::RemoveShortcut { seat, mods, sym } => self
|
||||
.handle_remove_shortcut(seat, mods, sym)
|
||||
.wrn("remove_shortcut")?,
|
||||
ClientMessage::SeatFocus { seat, direction } => {
|
||||
self.handle_seat_focus(seat, direction).wrn("seat_focus")?
|
||||
}
|
||||
ClientMessage::SeatMove { seat, direction } => {
|
||||
self.handle_seat_move(seat, direction).wrn("seat_move")?
|
||||
}
|
||||
ClientMessage::GetInputDevices { seat } => self.handle_get_input_devices(seat),
|
||||
ClientMessage::GetSeats => self.handle_get_seats(),
|
||||
ClientMessage::RemoveSeat { .. } => {}
|
||||
ClientMessage::Run { prog, args, env } => {
|
||||
self.handle_run(prog, args, env, vec![]).wrn("run")?
|
||||
}
|
||||
ClientMessage::GrabKb { kb, grab } => self.handle_grab(kb, grab).wrn("grab")?,
|
||||
ClientMessage::SetColor { colorable, color } => {
|
||||
self.handle_set_color(colorable, color).wrn("set_color")?
|
||||
}
|
||||
ClientMessage::GetColor { colorable } => {
|
||||
self.handle_get_color(colorable).wrn("get_color")?
|
||||
}
|
||||
ClientMessage::CreateSeatSplit { seat, axis } => self
|
||||
.handle_create_seat_split(seat, axis)
|
||||
.wrn("create_seat_split")?,
|
||||
ClientMessage::FocusSeatParent { seat } => self
|
||||
.handle_focus_seat_parent(seat)
|
||||
.wrn("focus_seat_parent")?,
|
||||
ClientMessage::GetSeatFloating { seat } => self
|
||||
.handle_get_seat_floating(seat)
|
||||
.wrn("get_seat_floating")?,
|
||||
ClientMessage::SetSeatFloating { seat, floating } => self
|
||||
.handle_set_seat_floating(seat, floating)
|
||||
.wrn("set_seat_floating")?,
|
||||
ClientMessage::Quit => self.handle_quit(),
|
||||
ClientMessage::SwitchTo { vtnr } => self.handle_switch_to(vtnr),
|
||||
ClientMessage::HasCapability { device, cap } => self
|
||||
.handle_has_capability(device, cap)
|
||||
.wrn("has_capability")?,
|
||||
ClientMessage::SetLeftHanded {
|
||||
device,
|
||||
left_handed,
|
||||
} => self
|
||||
.handle_set_left_handed(device, left_handed)
|
||||
.wrn("set_left_handed")?,
|
||||
ClientMessage::SetAccelProfile { device, profile } => self
|
||||
.handle_set_accel_profile(device, profile)
|
||||
.wrn("set_accel_profile")?,
|
||||
ClientMessage::SetAccelSpeed { device, speed } => self
|
||||
.handle_set_accel_speed(device, speed)
|
||||
.wrn("set_accel_speed")?,
|
||||
ClientMessage::SetTransformMatrix { device, matrix } => self
|
||||
.handle_set_transform_matrix(device, matrix)
|
||||
.wrn("set_transform_matrix")?,
|
||||
ClientMessage::GetDeviceName { device } => {
|
||||
self.handle_get_device_name(device).wrn("get_device_name")?
|
||||
}
|
||||
ClientMessage::GetWorkspace { name } => self.handle_get_workspace(name),
|
||||
ClientMessage::ShowWorkspace { seat, workspace } => self
|
||||
.handle_show_workspace(seat, workspace, None)
|
||||
.wrn("show_workspace")?,
|
||||
ClientMessage::SetSeatWorkspace { seat, workspace } => self
|
||||
.handle_set_seat_workspace(seat, workspace)
|
||||
.wrn("set_seat_workspace")?,
|
||||
ClientMessage::GetConnector { ty, idx } => {
|
||||
self.handle_get_connector(ty, idx).wrn("get_connector")?
|
||||
}
|
||||
ClientMessage::ConnectorConnected { connector } => self
|
||||
.handle_connector_connected(connector)
|
||||
.wrn("connector_connected")?,
|
||||
ClientMessage::ConnectorType { connector } => self
|
||||
.handle_connector_type(connector)
|
||||
.wrn("connector_type")?,
|
||||
ClientMessage::ConnectorMode { connector } => self
|
||||
.handle_connector_mode(connector)
|
||||
.wrn("connector_mode")?,
|
||||
ClientMessage::ConnectorSetPosition { connector, x, y } => self
|
||||
.handle_connector_set_position(connector, x, y)
|
||||
.wrn("connector_set_position")?,
|
||||
ClientMessage::ConnectorSetEnabled { connector, enabled } => self
|
||||
.handle_connector_set_enabled(connector, enabled)
|
||||
.wrn("connector_set_enabled")?,
|
||||
ClientMessage::SeatClose { seat } => self.handle_seat_close(seat).wrn("seat_close")?,
|
||||
ClientMessage::SetStatus { status } => self.handle_set_status(status),
|
||||
ClientMessage::GetTimer { name } => self.handle_get_timer(name).wrn("get_timer")?,
|
||||
ClientMessage::RemoveTimer { timer } => {
|
||||
self.handle_remove_timer(timer).wrn("remove_timer")?
|
||||
}
|
||||
ClientMessage::ProgramTimer {
|
||||
timer,
|
||||
initial,
|
||||
periodic,
|
||||
} => self
|
||||
.handle_program_timer(timer, initial, periodic)
|
||||
.wrn("program_timer")?,
|
||||
ClientMessage::SetEnv { key, val } => self.handle_set_env(key, val),
|
||||
ClientMessage::SetSeatFullscreen { seat, fullscreen } => self
|
||||
.handle_set_seat_fullscreen(seat, fullscreen)
|
||||
.wrn("set_seat_fullscreen")?,
|
||||
ClientMessage::GetSeatFullscreen { seat } => self
|
||||
.handle_get_seat_fullscreen(seat)
|
||||
.wrn("get_seat_fullscreen")?,
|
||||
ClientMessage::Reload => self.handle_reload(),
|
||||
ClientMessage::GetDeviceConnectors { device } => self
|
||||
.handle_get_connectors(Some(device), false)
|
||||
.wrn("get_device_connectors")?,
|
||||
ClientMessage::GetDrmDeviceSyspath { device } => self
|
||||
.handle_get_drm_device_syspath(device)
|
||||
.wrn("get_drm_device_syspath")?,
|
||||
ClientMessage::GetDrmDeviceVendor { device } => self
|
||||
.handle_get_drm_device_vendor(device)
|
||||
.wrn("get_drm_device_vendor")?,
|
||||
ClientMessage::GetDrmDeviceModel { device } => self
|
||||
.handle_get_drm_device_model(device)
|
||||
.wrn("get_drm_device_model")?,
|
||||
ClientMessage::GetDrmDevices => self.handle_get_drm_devices(),
|
||||
ClientMessage::GetDrmDevicePciId { device } => self
|
||||
.handle_get_drm_device_pci_id(device)
|
||||
.wrn("get_drm_device_pci_id")?,
|
||||
ClientMessage::ResetColors => self.handle_reset_colors(),
|
||||
ClientMessage::ResetSizes => self.handle_reset_sizes(),
|
||||
ClientMessage::GetSize { sized } => self.handle_get_size(sized).wrn("get_size")?,
|
||||
ClientMessage::SetSize { sized, size } => {
|
||||
self.handle_set_size(sized, size).wrn("set_size")?
|
||||
}
|
||||
ClientMessage::ResetFont => self.handle_reset_font(),
|
||||
ClientMessage::GetFont => self.handle_get_font(),
|
||||
ClientMessage::SetFont { font } => self.handle_set_font(font),
|
||||
ClientMessage::SetPxPerWheelScroll { device, px } => self
|
||||
.handle_set_px_per_wheel_scroll(device, px)
|
||||
.wrn("set_px_per_wheel_scroll")?,
|
||||
ClientMessage::ConnectorSetScale { connector, scale } => self
|
||||
.handle_connector_set_scale(connector, scale)
|
||||
.wrn("connector_set_scale")?,
|
||||
ClientMessage::ConnectorGetScale { connector } => self
|
||||
.handle_connector_get_scale(connector)
|
||||
.wrn("connector_get_scale")?,
|
||||
ClientMessage::ConnectorSize { connector } => self
|
||||
.handle_connector_size(connector)
|
||||
.wrn("connector_size")?,
|
||||
ClientMessage::SetCursorSize { seat, size } => self
|
||||
.handle_set_cursor_size(seat, size)
|
||||
.wrn("set_cursor_size")?,
|
||||
ClientMessage::SetTapEnabled { device, enabled } => self
|
||||
.handle_set_tap_enabled(device, enabled)
|
||||
.wrn("set_tap_enabled")?,
|
||||
ClientMessage::SetDragEnabled { device, enabled } => self
|
||||
.handle_set_drag_enabled(device, enabled)
|
||||
.wrn("set_drag_enabled")?,
|
||||
ClientMessage::SetDragLockEnabled { device, enabled } => self
|
||||
.handle_set_drag_lock_enabled(device, enabled)
|
||||
.wrn("set_drag_lock_enabled")?,
|
||||
ClientMessage::SetUseHardwareCursor {
|
||||
seat,
|
||||
use_hardware_cursor,
|
||||
} => self
|
||||
.handle_set_use_hardware_cursor(seat, use_hardware_cursor)
|
||||
.wrn("set_use_hardware_cursor")?,
|
||||
ClientMessage::DisablePointerConstraint { seat } => self
|
||||
.handle_disable_pointer_constraint(seat)
|
||||
.wrn("disable_pointer_constraint")?,
|
||||
ClientMessage::MakeRenderDevice { device } => self
|
||||
.handle_make_render_device(device)
|
||||
.wrn("make_render_device")?,
|
||||
ClientMessage::GetSeatCursorWorkspace { seat } => self
|
||||
.handle_get_seat_cursor_workspace(seat)
|
||||
.wrn("get_seat_cursor_workspace")?,
|
||||
ClientMessage::GetSeatKeyboardWorkspace { seat } => self
|
||||
.handle_get_seat_keyboard_workspace(seat)
|
||||
.wrn("get_seat_keyboard_workspace")?,
|
||||
ClientMessage::SetDefaultWorkspaceCapture { capture } => {
|
||||
self.handle_set_default_workspace_capture(capture)
|
||||
}
|
||||
ClientMessage::GetDefaultWorkspaceCapture => {
|
||||
self.handle_get_default_workspace_capture()
|
||||
}
|
||||
ClientMessage::SetWorkspaceCapture { workspace, capture } => self
|
||||
.handle_set_workspace_capture(workspace, capture)
|
||||
.wrn("set_workspace_capture")?,
|
||||
ClientMessage::GetWorkspaceCapture { workspace } => self
|
||||
.handle_get_workspace_capture(workspace)
|
||||
.wrn("get_workspace_capture")?,
|
||||
ClientMessage::SetNaturalScrollingEnabled { device, enabled } => self
|
||||
.handle_set_natural_scrolling_enabled(device, enabled)
|
||||
.wrn("set_natural_scrolling_enabled")?,
|
||||
ClientMessage::SetGfxApi { device, api } => {
|
||||
self.handle_set_gfx_api(device, api).wrn("set_gfx_api")?
|
||||
}
|
||||
ClientMessage::SetDirectScanoutEnabled { device, enabled } => self
|
||||
.handle_set_direct_scanout_enabled(device, enabled)
|
||||
.wrn("set_direct_scanout_enabled")?,
|
||||
ClientMessage::ConnectorSetTransform {
|
||||
connector,
|
||||
transform,
|
||||
} => self
|
||||
.handle_connector_set_transform(connector, transform)
|
||||
.wrn("connector_set_transform")?,
|
||||
ClientMessage::SetDoubleClickIntervalUsec { usec } => {
|
||||
self.handle_set_double_click_interval_usec(usec)
|
||||
}
|
||||
ClientMessage::SetDoubleClickDistance { dist } => {
|
||||
self.handle_set_double_click_distance(dist)
|
||||
}
|
||||
ClientMessage::ConnectorModes { connector } => self
|
||||
.handle_connector_modes(connector)
|
||||
.wrn("connector_modes")?,
|
||||
ClientMessage::ConnectorSetMode { connector, mode } => self
|
||||
.handle_connector_set_mode(connector, mode)
|
||||
.wrn("connector_set_mode")?,
|
||||
ClientMessage::AddPollable { fd } => {
|
||||
self.handle_add_pollable(fd).wrn("add_pollable")?
|
||||
}
|
||||
ClientMessage::RemovePollable { id } => self.handle_remove_pollable(id),
|
||||
ClientMessage::AddInterest { pollable, writable } => self
|
||||
.handle_add_interest(pollable, writable)
|
||||
.wrn("add_interest")?,
|
||||
ClientMessage::Run2 {
|
||||
prog,
|
||||
args,
|
||||
env,
|
||||
fds,
|
||||
} => self.handle_run(prog, args, env, fds).wrn("run")?,
|
||||
ClientMessage::DisableDefaultSeat => self.state.create_default_seat.set(false),
|
||||
ClientMessage::DestroyKeymap { keymap } => self.handle_destroy_keymap(keymap),
|
||||
ClientMessage::GetConnectorName { connector } => self
|
||||
.handle_connector_name(connector)
|
||||
.wrn("connector_name")?,
|
||||
ClientMessage::GetConnectorModel { connector } => self
|
||||
.handle_connector_model(connector)
|
||||
.wrn("connector_model")?,
|
||||
ClientMessage::GetConnectorManufacturer { connector } => self
|
||||
.handle_connector_manufacturer(connector)
|
||||
.wrn("connector_manufacturer")?,
|
||||
ClientMessage::GetConnectorSerialNumber { connector } => self
|
||||
.handle_connector_serial_number(connector)
|
||||
.wrn("connector_serial_number")?,
|
||||
ClientMessage::GetConnectors {
|
||||
device,
|
||||
connected_only,
|
||||
} => self
|
||||
.handle_get_connectors(device, connected_only)
|
||||
.wrn("get_connectors")?,
|
||||
ClientMessage::ConnectorGetPosition { connector } => self
|
||||
.handle_connector_get_position(connector)
|
||||
.wrn("connector_get_position")?,
|
||||
ClientMessage::GetConfigDir => self.handle_get_config_dir(),
|
||||
ClientMessage::GetWorkspaces => self.handle_get_workspaces(),
|
||||
ClientMessage::UnsetEnv { key } => self.handle_unset_env(key),
|
||||
ClientMessage::SetLogLevel { level } => self.handle_set_log_level(level),
|
||||
ClientMessage::GetDrmDeviceDevnode { device } => self
|
||||
.handle_get_drm_device_devnode(device)
|
||||
.wrn("get_drm_device_devnode")?,
|
||||
ClientMessage::GetInputDeviceSyspath { device } => self
|
||||
.handle_get_input_device_syspath(device)
|
||||
.wrn("get_input_device_syspath")?,
|
||||
ClientMessage::GetInputDeviceDevnode { device } => self
|
||||
.handle_get_input_device_devnode(device)
|
||||
.wrn("get_input_device_devnode")?,
|
||||
ClientMessage::SetIdle { timeout } => self.handle_set_idle(timeout),
|
||||
ClientMessage::SetKeyPressEnablesDpms { enabled } => {
|
||||
self.handle_set_key_press_enables_dpms(enabled)
|
||||
}
|
||||
ClientMessage::SetMouseMoveEnablesDpms { enabled } => {
|
||||
self.handle_set_mouse_move_enables_dpms(enabled)
|
||||
}
|
||||
ClientMessage::MoveToOutput {
|
||||
workspace,
|
||||
connector,
|
||||
} => self
|
||||
.handle_move_to_output(workspace, connector)
|
||||
.wrn("move_to_output")?,
|
||||
ClientMessage::SetExplicitSyncEnabled { enabled } => {
|
||||
self.handle_set_explicit_sync_enabled(enabled)
|
||||
}
|
||||
ClientMessage::DeviceSetKeymap { device, keymap } => self
|
||||
.handle_set_device_keymap(device, keymap)
|
||||
.wrn("set_device_keymap")?,
|
||||
ClientMessage::SetForward { seat, forward } => {
|
||||
self.handle_set_forward(seat, forward).wrn("set_forward")?
|
||||
}
|
||||
ClientMessage::AddShortcut2 {
|
||||
seat,
|
||||
mod_mask,
|
||||
mods,
|
||||
sym,
|
||||
} => self
|
||||
.handle_add_shortcut(seat, mod_mask, mods, sym)
|
||||
.wrn("add_shortcut")?,
|
||||
ClientMessage::SetFocusFollowsMouseMode { seat, mode } => self
|
||||
.handle_set_focus_follows_mouse_mode(seat, mode)
|
||||
.wrn("set_focus_follows_mouse_mode")?,
|
||||
ClientMessage::SetInputDeviceConnector {
|
||||
input_device,
|
||||
connector,
|
||||
} => self
|
||||
.handle_set_input_device_connector(input_device, connector)
|
||||
.wrn("set_input_device_connector")?,
|
||||
ClientMessage::RemoveInputMapping { input_device } => self
|
||||
.handle_remove_input_mapping(input_device)
|
||||
.wrn("remove_input_mapping")?,
|
||||
ClientMessage::SetWindowManagementEnabled { seat, enabled } => self
|
||||
.handle_set_window_management_enabled(seat, enabled)
|
||||
.wrn("set_window_management_enabled")?,
|
||||
ClientMessage::SetVrrMode { connector, mode } => self
|
||||
.handle_set_vrr_mode(connector, mode)
|
||||
.wrn("set_vrr_mode")?,
|
||||
ClientMessage::SetVrrCursorHz { connector, hz } => self
|
||||
.handle_set_vrr_cursor_hz(connector, hz)
|
||||
.wrn("set_vrr_cursor_hz")?,
|
||||
ClientMessage::SetTearingMode { connector, mode } => self
|
||||
.handle_set_tearing_mode(connector, mode)
|
||||
.wrn("set_tearing_mode")?,
|
||||
ClientMessage::SetCalibrationMatrix { device, matrix } => self
|
||||
.handle_set_calibration_matrix(device, matrix)
|
||||
.wrn("set_calibration_matrix")?,
|
||||
ClientMessage::SetEiSocketEnabled { enabled } => {
|
||||
self.handle_set_ei_socket_enabled(enabled)
|
||||
}
|
||||
ClientMessage::ConnectorSetFormat { connector, format } => self
|
||||
.handle_connector_set_format(connector, format)
|
||||
.wrn("connector_set_format")?,
|
||||
ClientMessage::SetFlipMargin { device, margin } => self
|
||||
.handle_set_flip_margin(device, margin)
|
||||
.wrn("set_flip_margin")?,
|
||||
ClientMessage::SetUiDragEnabled { enabled } => self.handle_set_ui_drag_enabled(enabled),
|
||||
ClientMessage::SetUiDragThreshold { threshold } => {
|
||||
self.handle_set_ui_drag_threshold(threshold)
|
||||
}
|
||||
ClientMessage::SetAnimationsEnabled { enabled } => {
|
||||
self.handle_set_animations_enabled(enabled)
|
||||
}
|
||||
ClientMessage::SetAnimationDurationMs { duration_ms } => {
|
||||
self.handle_set_animation_duration_ms(duration_ms)
|
||||
}
|
||||
ClientMessage::SetAnimationCurve { curve } => self.handle_set_animation_curve(curve),
|
||||
ClientMessage::SetAnimationStyle { style } => self.handle_set_animation_style(style),
|
||||
ClientMessage::SetAnimationCubicBezier { x1, y1, x2, y2 } => {
|
||||
self.handle_set_animation_cubic_bezier(x1, y1, x2, y2)
|
||||
}
|
||||
ClientMessage::SetXScalingMode { mode } => self
|
||||
.handle_set_x_scaling_mode(mode)
|
||||
.wrn("set_x_scaling_mode")?,
|
||||
ClientMessage::SetIdleGracePeriod { period } => {
|
||||
self.handle_set_idle_grace_period(period)
|
||||
}
|
||||
ClientMessage::SetColorManagementEnabled { enabled } => {
|
||||
self.handle_set_color_management_enabled(enabled)
|
||||
}
|
||||
ClientMessage::ConnectorSetColors {
|
||||
connector,
|
||||
color_space,
|
||||
eotf,
|
||||
} => self
|
||||
.handle_connector_set_colors(connector, color_space, eotf)
|
||||
.wrn("connector_set_colors")?,
|
||||
ClientMessage::ConnectorSetBrightness {
|
||||
connector,
|
||||
brightness,
|
||||
} => self
|
||||
.handle_connector_set_brightness(connector, brightness)
|
||||
.wrn("connector_set_brightness")?,
|
||||
ClientMessage::SetFloatAboveFullscreen { above } => {
|
||||
self.handle_set_float_above_fullscreen(above)
|
||||
}
|
||||
ClientMessage::GetFloatAboveFullscreen => self.handle_get_float_above_fullscreen(),
|
||||
ClientMessage::GetSeatFloatPinned { seat } => self
|
||||
.handle_get_seat_float_pinned(seat)
|
||||
.wrn("get_seat_float_pinned")?,
|
||||
ClientMessage::SetSeatFloatPinned { seat, pinned } => self
|
||||
.handle_set_seat_float_pinned(seat, pinned)
|
||||
.wrn("set_seat_float_pinned")?,
|
||||
ClientMessage::SetShowFloatPinIcon { show } => {
|
||||
self.handle_set_show_float_pin_icon(show)
|
||||
}
|
||||
ClientMessage::GetConnectorActiveWorkspace { connector } => self
|
||||
.handle_get_connector_active_workspace(connector)
|
||||
.wrn("get_connector_active_workspace")?,
|
||||
ClientMessage::GetConnectorWorkspaces { connector } => self
|
||||
.handle_get_connector_workspaces(connector)
|
||||
.wrn("get_connector_workspaces")?,
|
||||
ClientMessage::GetWorkspaceConnector { workspace } => self
|
||||
.handle_get_workspace_connector(workspace)
|
||||
.wrn("get_workspace_connector")?,
|
||||
ClientMessage::GetConnectorInDirection {
|
||||
connector,
|
||||
direction,
|
||||
} => self
|
||||
.handle_get_connector_in_direction(connector, direction)
|
||||
.wrn("get_connector_in_direction")?,
|
||||
ClientMessage::GetClients => self.handle_get_clients(),
|
||||
ClientMessage::ClientExists { client } => self.handle_client_exists(client),
|
||||
ClientMessage::ClientIsXwayland { client } => self
|
||||
.handle_client_is_xwayland(client)
|
||||
.wrn("client_is_xwayland")?,
|
||||
ClientMessage::ClientKill { client } => self.handle_client_kill(client),
|
||||
ClientMessage::WindowExists { window } => self.handle_window_exists(window),
|
||||
ClientMessage::GetWorkspaceWindow { workspace } => self
|
||||
.handle_get_workspace_window(workspace)
|
||||
.wrn("get_workspace_window")?,
|
||||
ClientMessage::GetSeatKeyboardWindow { seat } => self
|
||||
.handle_get_seat_keyboard_window(seat)
|
||||
.wrn("get_seat_keyboard_window")?,
|
||||
ClientMessage::SeatFocusWindow { seat, window } => self
|
||||
.handle_seat_focus_window(seat, window)
|
||||
.wrn("seat_focus_window")?,
|
||||
ClientMessage::GetWindowTitle { window } => self
|
||||
.handle_get_window_title(window)
|
||||
.wrn("get_window_title")?,
|
||||
ClientMessage::GetWindowType { window } => {
|
||||
self.handle_get_window_type(window).wrn("get_window_type")?
|
||||
}
|
||||
ClientMessage::GetWindowId { window } => {
|
||||
self.handle_get_window_id(window).wrn("get_window_id")?
|
||||
}
|
||||
ClientMessage::GetWindowParent { window } => self
|
||||
.handle_get_window_parent(window)
|
||||
.wrn("get_window_parent")?,
|
||||
ClientMessage::GetWindowWorkspace { window } => self
|
||||
.handle_get_window_workspace(window)
|
||||
.wrn("get_window_workspace")?,
|
||||
ClientMessage::GetWindowChildren { window } => self
|
||||
.handle_get_window_children(window)
|
||||
.wrn("get_window_children")?,
|
||||
ClientMessage::GetWindowSplit { window } => self
|
||||
.handle_get_window_split(window)
|
||||
.wrn("get_window_split")?,
|
||||
ClientMessage::SetWindowSplit { window, axis } => self
|
||||
.handle_set_window_split(window, axis)
|
||||
.wrn("set_window_split")?,
|
||||
ClientMessage::GetWindowMono { window } => {
|
||||
self.handle_get_window_mono(window).wrn("get_window_mono")?
|
||||
}
|
||||
ClientMessage::SetWindowMono { window, mono } => self
|
||||
.handle_set_window_mono(window, mono)
|
||||
.wrn("set_window_mono")?,
|
||||
ClientMessage::WindowMove { window, direction } => self
|
||||
.handle_window_move(window, direction)
|
||||
.wrn("window_move")?,
|
||||
ClientMessage::CreateWindowSplit { window, axis } => self
|
||||
.handle_create_window_split(window, axis)
|
||||
.wrn("create_window_split")?,
|
||||
ClientMessage::WindowClose { window } => {
|
||||
self.handle_window_close(window).wrn("close_window")?
|
||||
}
|
||||
ClientMessage::GetWindowFloating { window } => self
|
||||
.handle_get_window_floating(window)
|
||||
.wrn("get_window_floating")?,
|
||||
ClientMessage::SetWindowFloating { window, floating } => self
|
||||
.handle_set_window_floating(window, floating)
|
||||
.wrn("set_window_floating")?,
|
||||
ClientMessage::SetWindowWorkspace { window, workspace } => self
|
||||
.handle_set_window_workspace(window, workspace)
|
||||
.wrn("set_window_workspace")?,
|
||||
ClientMessage::SetWindowFullscreen { window, fullscreen } => self
|
||||
.handle_set_window_fullscreen(window, fullscreen)
|
||||
.wrn("set_window_fullscreen")?,
|
||||
ClientMessage::GetWindowFullscreen { window } => self
|
||||
.handle_get_window_fullscreen(window)
|
||||
.wrn("get_window_fullscreen")?,
|
||||
ClientMessage::GetWindowFloatPinned { window } => self
|
||||
.handle_get_window_float_pinned(window)
|
||||
.wrn("get_window_float_pinned")?,
|
||||
ClientMessage::SetWindowFloatPinned { window, pinned } => self
|
||||
.handle_set_window_float_pinned(window, pinned)
|
||||
.wrn("set_window_float_pinned")?,
|
||||
ClientMessage::GetWindowIsVisible { window } => self
|
||||
.handle_get_window_is_visible(window)
|
||||
.wrn("get_window_is_visible")?,
|
||||
ClientMessage::GetWindowClient { window } => self
|
||||
.handle_get_window_client(window)
|
||||
.wrn("get_window_client")?,
|
||||
ClientMessage::CreateClientMatcher { criterion } => self
|
||||
.handle_create_client_matcher(criterion)
|
||||
.wrn("create_window_matcher")?,
|
||||
ClientMessage::DestroyClientMatcher { matcher } => {
|
||||
self.handle_destroy_client_matcher(matcher)
|
||||
}
|
||||
ClientMessage::EnableClientMatcherEvents { matcher } => self
|
||||
.handle_enable_client_matcher_events(matcher)
|
||||
.wrn("enable_window_matcher_events")?,
|
||||
ClientMessage::CreateWindowMatcher { criterion } => self
|
||||
.handle_create_window_matcher(criterion)
|
||||
.wrn("create_window_matcher")?,
|
||||
ClientMessage::DestroyWindowMatcher { matcher } => {
|
||||
self.handle_destroy_window_matcher(matcher)
|
||||
}
|
||||
ClientMessage::EnableWindowMatcherEvents { matcher } => self
|
||||
.handle_enable_window_matcher_events(matcher)
|
||||
.wrn("enable_window_matcher_events")?,
|
||||
ClientMessage::SetWindowMatcherAutoFocus {
|
||||
matcher,
|
||||
auto_focus,
|
||||
} => self
|
||||
.handle_set_window_matcher_auto_focus(matcher, auto_focus)
|
||||
.wrn("set_window_matcher_auto_focus")?,
|
||||
ClientMessage::SetWindowMatcherInitialTileState {
|
||||
matcher,
|
||||
tile_state,
|
||||
} => self
|
||||
.handle_set_window_matcher_initial_tile_state(matcher, tile_state)
|
||||
.wrn("set_window_matcher_initial_tile_state")?,
|
||||
ClientMessage::SetPointerRevertKey { seat, key } => self
|
||||
.handle_set_pointer_revert_key(seat, key)
|
||||
.wrn("set_pointer_revert_key")?,
|
||||
ClientMessage::SetClickMethod { device, method } => self
|
||||
.handle_set_click_method(device, method)
|
||||
.wrn("set_click_method")?,
|
||||
ClientMessage::SetMiddleButtonEmulationEnabled { device, enabled } => self
|
||||
.handle_set_middle_button_emulation_enabled(device, enabled)
|
||||
.wrn("set_middle_button_emulation_enabled")?,
|
||||
ClientMessage::GetContentType { window } => self
|
||||
.handle_get_content_type(window)
|
||||
.wrn("get_content_type")?,
|
||||
ClientMessage::SetShowBar { show } => self.handle_set_show_bar(show),
|
||||
ClientMessage::GetShowBar => self.handle_get_show_bar(),
|
||||
ClientMessage::SetShowTitles { show } => self.handle_set_show_titles(show),
|
||||
ClientMessage::GetShowTitles => self.handle_get_show_titles(),
|
||||
ClientMessage::SetFloatingTitles { floating } => {
|
||||
self.handle_set_floating_titles(floating)
|
||||
}
|
||||
ClientMessage::GetFloatingTitles => self.handle_get_floating_titles(),
|
||||
ClientMessage::SetBarPosition { position } => self
|
||||
.handle_set_bar_position(position)
|
||||
.wrn("set_bar_position")?,
|
||||
ClientMessage::GetBarPosition => self.handle_get_bar_position(),
|
||||
ClientMessage::SetCornerRadius { radius } => self.handle_set_corner_radius(radius),
|
||||
ClientMessage::GetCornerRadius => self.handle_get_corner_radius(),
|
||||
ClientMessage::SeatFocusHistory { seat, timeline } => self
|
||||
.handle_seat_focus_history(seat, timeline)
|
||||
.wrn("seat_focus_history")?,
|
||||
ClientMessage::SeatFocusHistorySetOnlyVisible { seat, only_visible } => self
|
||||
.handle_seat_focus_history_set_only_visible(seat, only_visible)
|
||||
.wrn("seat_focus_history_set_only_visible")?,
|
||||
ClientMessage::SeatFocusHistorySetSameWorkspace {
|
||||
seat,
|
||||
same_workspace,
|
||||
} => self
|
||||
.handle_seat_focus_history_set_same_workspace(seat, same_workspace)
|
||||
.wrn("seat_focus_history_set_same_workspace")?,
|
||||
ClientMessage::SeatFocusLayerRel { seat, direction } => self
|
||||
.handle_seat_focus_layer_rel(seat, direction)
|
||||
.wrn("seat_focus_layer_rel")?,
|
||||
ClientMessage::SeatFocusTiles { seat } => {
|
||||
self.handle_seat_focus_tiles(seat).wrn("seat_focus_tiles")?
|
||||
}
|
||||
ClientMessage::SeatFocusFloats { seat } => self
|
||||
.handle_seat_focus_floats(seat)
|
||||
.wrn("seat_focus_floats")?,
|
||||
ClientMessage::SeatToggleFocusFloatTiled { seat } => self
|
||||
.handle_seat_toggle_focus_float_tiled(seat)
|
||||
.wrn("seat_toggle_focus_float_tiled")?,
|
||||
ClientMessage::SetMiddleClickPasteEnabled { enabled } => {
|
||||
self.handle_set_middle_click_paste_enabled(enabled)
|
||||
}
|
||||
ClientMessage::SetWorkspaceDisplayOrder { order } => {
|
||||
self.handle_set_workspace_display_order(order)
|
||||
}
|
||||
ClientMessage::SeatCreateMark { seat, kc } => self
|
||||
.handle_seat_create_mark(seat, kc)
|
||||
.wrn("seat_create_mark")?,
|
||||
ClientMessage::SeatJumpToMark { seat, kc } => self
|
||||
.handle_seat_jump_to_mark(seat, kc)
|
||||
.wrn("seat_jump_to_mark")?,
|
||||
ClientMessage::SeatCopyMark { seat, src, dst } => self
|
||||
.handle_seat_copy_mark(seat, src, dst)
|
||||
.wrn("seat_copy_mark")?,
|
||||
ClientMessage::ConnectorSetBlendSpace {
|
||||
connector,
|
||||
blend_space,
|
||||
} => self
|
||||
.handle_connector_set_blend_space(connector, blend_space)
|
||||
.wrn("connector_set_blend_space")?,
|
||||
ClientMessage::SetBarFont { font } => self.handle_set_bar_font(font),
|
||||
ClientMessage::SetTitleFont { font } => self.handle_set_title_font(font),
|
||||
ClientMessage::ShowWorkspaceOn {
|
||||
seat,
|
||||
workspace,
|
||||
connector,
|
||||
} => self
|
||||
.handle_show_workspace(seat, workspace, Some(connector))
|
||||
.wrn("show_workspace_on")?,
|
||||
ClientMessage::SeatSetSimpleImEnabled { seat, enabled } => self
|
||||
.handle_seat_set_simple_im_enabled(seat, enabled)
|
||||
.wrn("seat_set_simple_im_enabled")?,
|
||||
ClientMessage::SeatGetSimpleImEnabled { seat } => self
|
||||
.handle_seat_get_simple_im_enabled(seat)
|
||||
.wrn("seat_get_simple_im_enabled")?,
|
||||
ClientMessage::SeatReloadSimpleIm { seat } => self
|
||||
.handle_seat_reload_simple_im(seat)
|
||||
.wrn("seat_reload_simple_im")?,
|
||||
ClientMessage::SeatEnableUnicodeInput { seat } => self
|
||||
.handle_seat_enable_unicode_input(seat)
|
||||
.wrn("seat_enable_unicode_input")?,
|
||||
ClientMessage::SeatWarpMouseToFocus { seat } => self
|
||||
.handle_seat_warp_mouse_to_focus(seat)
|
||||
.wrn("seat_warp_mouse_to_focus")?,
|
||||
ClientMessage::SeatSetMouseFollowsFocus { seat, enabled } => self
|
||||
.handle_seat_set_mouse_follows_focus(seat, enabled)
|
||||
.wrn("seat_set_mouse_follows_focus")?,
|
||||
ClientMessage::ConnectorSetUseNativeGamut {
|
||||
connector,
|
||||
use_native_gamut,
|
||||
} => self
|
||||
.handle_connector_set_use_native_gamut(connector, use_native_gamut)
|
||||
.wrn("connector_set_use_native_gamut")?,
|
||||
ClientMessage::KeymapFromNames {
|
||||
rules,
|
||||
model,
|
||||
groups,
|
||||
options,
|
||||
} => self
|
||||
.handle_keymap_from_names(rules, model, groups, options)
|
||||
.wrn("keymap_from_names")?,
|
||||
ClientMessage::SetFallbackOutputMode { seat, mode } => self
|
||||
.handle_set_fallback_output_mode(seat, mode)
|
||||
.wrn("set_fallback_output_mode")?,
|
||||
ClientMessage::SetXWaylandEnabled { enabled } => self
|
||||
.handle_set_x_wayland_enabled(enabled)
|
||||
.wrn("set_x_wayland_enabled")?,
|
||||
ClientMessage::ConnectorSupportsArbitraryModes { connector } => self
|
||||
.handle_connector_supports_arbitrary_modes(connector)
|
||||
.wrn("connector_supports_arbitrary_modes")?,
|
||||
ClientMessage::GetConnectorByName { name } => self.handle_get_connector_by_name(name),
|
||||
ClientMessage::CreateVirtualOutput { name } => self.handle_create_virtual_output(name),
|
||||
ClientMessage::RemoveVirtualOutput { name } => self.handle_remove_virtual_output(name),
|
||||
ClientMessage::CleanLogsOlderThan { time } => self.handle_clean_logs_older_than(time),
|
||||
ClientMessage::WindowResize {
|
||||
window,
|
||||
dx1,
|
||||
dy1,
|
||||
dx2,
|
||||
dy2,
|
||||
} => self
|
||||
.handle_window_resize(window, dx1, dy1, dx2, dy2)
|
||||
.wrn("window_resize")?,
|
||||
ClientMessage::SeatToggleTab { seat } => {
|
||||
self.handle_seat_toggle_tab(seat).wrn("seat_toggle_tab")?
|
||||
}
|
||||
ClientMessage::SeatMakeGroup {
|
||||
seat,
|
||||
axis,
|
||||
ephemeral,
|
||||
} => self
|
||||
.handle_seat_make_group(seat, axis, ephemeral)
|
||||
.wrn("seat_make_group")?,
|
||||
ClientMessage::SeatChangeGroupOpposite { seat } => self
|
||||
.handle_seat_change_group_opposite(seat)
|
||||
.wrn("seat_change_group_opposite")?,
|
||||
ClientMessage::SeatEqualize { seat, recursive } => self
|
||||
.handle_seat_equalize(seat, recursive)
|
||||
.wrn("seat_equalize")?,
|
||||
ClientMessage::SetAutotile { enabled } => {
|
||||
self.state.theme.autotile_enabled.set(enabled);
|
||||
}
|
||||
ClientMessage::SeatToggleExpand { .. } => {
|
||||
// Removed feature; kept for binary protocol compatibility.
|
||||
}
|
||||
ClientMessage::SetTabTitleAlign { align } => {
|
||||
use crate::theme::TabTitleAlign;
|
||||
let val = match align {
|
||||
1 => TabTitleAlign::Center,
|
||||
2 => TabTitleAlign::End,
|
||||
_ => TabTitleAlign::Start,
|
||||
};
|
||||
self.state.theme.tab_title_align.set(val);
|
||||
}
|
||||
ClientMessage::SeatMoveTab { seat, right } => self
|
||||
.handle_seat_move_tab(seat, right)
|
||||
.wrn("seat_move_tab")?,
|
||||
}
|
||||
Ok(())
|
||||
}
|
||||
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue