Remove inactive and superseded code

This commit is contained in:
Gergő Sályi 2024-01-02 18:58:59 +01:00
parent 3fc86cbf96
commit 67abbb9a37
2 changed files with 0 additions and 44 deletions

View file

@ -67,10 +67,6 @@ fn main()
let layer_shell = LayerShell::bind(&globals, &qh).unwrap(); let layer_shell = LayerShell::bind(&globals, &qh).unwrap();
let shm = Shm::bind(&globals, &qh).unwrap(); let shm = Shm::bind(&globals, &qh).unwrap();
// // Initialize slot pool with a minimum size (0 is not allowed)
// // it will be automatically resized later
// let shm_slot_pool = SlotPool::new(1, &shm).unwrap();
// Sync tools for sway ipc tasks // Sync tools for sway ipc tasks
let mut poll = Poll::new().unwrap(); let mut poll = Poll::new().unwrap();
let waker = Arc::new(Waker::new(poll.registry(), SWAY).unwrap()); let waker = Arc::new(Waker::new(poll.registry(), SWAY).unwrap());
@ -81,7 +77,6 @@ fn main()
registry_state: RegistryState::new(&globals), registry_state: RegistryState::new(&globals),
output_state: OutputState::new(&globals, &qh), output_state: OutputState::new(&globals, &qh),
shm, shm,
// shm_slot_pool,
layer_shell, layer_shell,
wallpaper_dir, wallpaper_dir,
pixel_format: None, pixel_format: None,

View file

@ -78,42 +78,3 @@ impl SwayConnectionTask
} }
} }
} }
// pub fn spawn_sway_events_loop_task(tx: Sender<WorkspaceVisible>, waker: Waker)
// {
// spawn(|| sway_events_loop_task(tx, waker));
// }
//
// pub fn sway_events_loop_task(tx: Sender<WorkspaceVisible>, waker: Waker)
// {
// let mut sway_conn = Connection::new()
// .expect("Failed to connect to sway socket");
//
// // Send the initial workspaces
// for workspace in sway_conn.get_workspaces().unwrap().into_iter() {
// if workspace.visible {
// tx.send(WorkspaceVisible {
// output: workspace.output,
// workspace_name: workspace.name,
// }).unwrap();
// }
// }
// waker.wake().unwrap();
//
// // Event loop
// let event_stream = sway_conn.subscribe([EventType::Workspace]).unwrap();
// for event_result in event_stream {
// let event = event_result.unwrap();
// let Event::Workspace(workspace_event) = event else {continue};
// if let WorkspaceChange::Focus = workspace_event.change {
// let current_workspace = workspace_event.current.unwrap();
//
// tx.send(WorkspaceVisible {
// output: current_workspace.output.unwrap(),
// workspace_name: current_workspace.name.unwrap(),
// }).unwrap();
//
// waker.wake().unwrap();
// }
// }
// }