1
0
Fork 0
forked from wry/wry

all: split reusable components into workspace crates

This commit is contained in:
kossLAN 2026-05-29 09:14:53 -04:00
parent 2a079ed800
commit 657e7ce2f7
No known key found for this signature in database
225 changed files with 7422 additions and 17602 deletions

View file

@ -23,7 +23,7 @@ use {
},
backends::dummy::DummyBackend,
cli::RunArgs,
client::{Client, ClientCaps, ClientId, Clients, NUM_CACHED_SERIAL_RANGES, SerialRange},
client::{Client, ClientId, Clients, NUM_CACHED_SERIAL_RANGES, SerialRange},
clientmem::ClientMemOffset,
cmm::{
cmm_description::ColorDescription, cmm_manager::ColorManager,
@ -109,7 +109,6 @@ use {
renderer::Renderer,
scale::Scale,
security_context_acceptor::SecurityContextAcceptors,
tagged_acceptor::TaggedAcceptors,
theme::{BarPosition, Color, Theme, ThemeColor, ThemeSized},
time::Time,
tree::{
@ -315,7 +314,6 @@ pub struct State {
pub serial: NumCell<u64>,
pub run_toplevel: Rc<RunToplevel>,
pub config_dir: Option<String>,
pub config_file_id: NumCell<u64>,
pub tracker: Tracker<Self>,
pub data_offer_ids: DataOfferIds,
pub data_source_ids: DataSourceIds,
@ -346,7 +344,6 @@ pub struct State {
pub keyboard_state_ids: KeyboardStateIds,
pub physical_keyboard_ids: PhysicalKeyboardIds,
pub security_context_acceptors: SecurityContextAcceptors,
pub tagged_acceptors: TaggedAcceptors,
pub cursor_user_group_ids: CursorUserGroupIds,
pub cursor_user_ids: CursorUserIds,
pub cursor_user_groups: CopyHashMap<CursorUserGroupId, Rc<CursorUserGroup>>,
@ -1253,7 +1250,6 @@ impl State {
self.workspace_watchers.clear();
self.toplevel_lists.clear();
self.security_context_acceptors.clear();
self.tagged_acceptors.clear();
self.slow_clients.clear();
for h in self.input_device_handlers.borrow_mut().drain_values() {
h.async_event.clear();
@ -2298,17 +2294,6 @@ impl State {
}
}
pub fn update_capabilities(
&self,
data: &Rc<Client>,
bounding_caps: ClientCaps,
set_bounding_caps: bool,
) {
if let Some(config) = self.config.get() {
config.update_capabilities(data, bounding_caps, set_bounding_caps);
}
}
pub fn find_output_in_direction(
&self,
source_output: &OutputNode,
@ -2480,13 +2465,7 @@ impl State {
pub fn reload_config(self: &Rc<Self>) {
log::info!("Reloading config");
let config = match ConfigProxy::from_config_dir(self) {
Ok(c) => c,
Err(e) => {
log::error!("Cannot reload config: {}", ErrorFmt(e));
return;
}
};
let config = ConfigProxy::default(self);
if let Some(config) = self.config.take() {
config.destroy();
for seat in self.globals.seats.lock().values() {
@ -2781,31 +2760,31 @@ mod tests {
#[test]
fn layout_animation_candidates_coalesce_duplicate_nodes() {
let source = MultiphaseHierarchyPosition {
parent: Some(NodeId(10)),
parent: Some(NodeId(10).into()),
depth: 2,
sibling_index: Some(1),
..Default::default()
};
let intermediate = MultiphaseHierarchyPosition {
parent: Some(NodeId(11)),
parent: Some(NodeId(11).into()),
depth: 1,
sibling_index: Some(0),
..Default::default()
};
let target = MultiphaseHierarchyPosition {
parent: Some(NodeId(12)),
parent: Some(NodeId(12).into()),
depth: 0,
sibling_index: Some(2),
..Default::default()
};
let second_source = MultiphaseHierarchyPosition {
parent: Some(NodeId(20)),
parent: Some(NodeId(20).into()),
depth: 1,
sibling_index: Some(0),
..Default::default()
};
let second_target = MultiphaseHierarchyPosition {
parent: Some(NodeId(20)),
parent: Some(NodeId(20).into()),
depth: 1,
sibling_index: Some(1),
..Default::default()