diff options
author | tcmal <me@aria.rip> | 2024-06-27 00:20:21 +0100 |
---|---|---|
committer | tcmal <me@aria.rip> | 2024-06-27 00:20:21 +0100 |
commit | 365ce9b436d347908b0c5263d4c73e7e8e352e7f (patch) | |
tree | 7c024eb9e37d50f9659556334f854f0230555d6c /src/clients/mod.rs | |
parent | 0e0725038dc645e4e0846f9a0de8d0b8a932e03d (diff) |
remove some outdated comments/todos
Diffstat (limited to 'src/clients/mod.rs')
-rw-r--r-- | src/clients/mod.rs | 10 |
1 files changed, 1 insertions, 9 deletions
diff --git a/src/clients/mod.rs b/src/clients/mod.rs index 76c30bb..58a5501 100644 --- a/src/clients/mod.rs +++ b/src/clients/mod.rs @@ -112,7 +112,6 @@ impl WM<'_> { pub struct ClientState { /// The current arranging function. /// This function is expected to ensure that all clients are the correct size, reconfigure them if needed, and map/unmap as needed. - /// The connection will be flushed after it is called. arrange: &'static dyn Fn(&mut MonitorInfo, &Connection<'_>), /// A client list for each monitor. @@ -124,7 +123,6 @@ pub struct ClientState { impl ClientState { /// Update the recorded monitors and monitor sizes, retiling if necessary. - /// This function sends multiple requests without checking them, so `conn.flush()` should be called after. pub fn update_geometry(&mut self, conn: &Connection<'_>) -> Result<()> { let mut dirty = false; if conn.active_extensions().any(|e| e == Extension::Xinerama) { @@ -172,7 +170,6 @@ impl ClientState { } /// Start managing the given window, adding it to the client list and ensuring its configuration is valid. - /// This function sends multiple requests without checking them, so `conn.flush()` should be called after. pub fn manage(&mut self, conn: &Connection<'_>, window: Window) { // TODO: inherit from parent if window is transient let mon = self.focused_mon(); @@ -231,7 +228,6 @@ impl ClientState { } /// Stop managing the given window, and also unset attributes unless `already_destroyed` is true. - /// This function sends multiple requests without checking them, so `conn.flush()` should be called after. pub fn unmanage(&mut self, conn: &Connection<'_>, window: Window, already_destroyed: bool) { let Some((mon, i)) = self.find_client_pos(window) else { return; @@ -251,12 +247,12 @@ impl ClientState { /// Refocus on the client with the given co-ordinates, setting X11 properties as required. /// If the given index is invalid, focus on the root instead. - /// This function sends multiple requests without checking them, so `conn.flush()` should be called after. pub fn refocus(&mut self, conn: &Connection<'_>, mon: usize, i: usize) { self.unfocus(conn); if let Some(new) = self.set_focused(mon, i) { new.set_border(conn, conn.colours.border_focused()); new.set_urgent(false); + new.sync_properties(conn, true); if !new.never_focus() { conn.send_request(&SetInputFocus { revert_to: InputFocus::PointerRoot, @@ -286,11 +282,9 @@ impl ClientState { } /// Unfocus the currently focused window, if it exists. - /// This function sends multiple requests without checking them, so `conn.flush()` should be called after. pub fn unfocus(&mut self, conn: &Connection<'_>) { if let Some(old) = self.focused_mut() { old.set_border(conn, conn.colours.border_normal()); - // TODO: clear some properties } } @@ -418,7 +412,6 @@ impl ClientState { } /// Rearrange all clients, reconfiguring them as needed. - /// This function sends multiple requests without checking them, so `conn.flush()` should be called after. pub fn rearrange(&mut self, conn: &Connection<'_>) { for mon in 0..self.monitor_count() { self.rearrange_monitor(conn, mon); @@ -426,7 +419,6 @@ impl ClientState { } /// Rearrange a specific monitor - /// This function sends multiple requests without checking them, so `conn.flush()` should be called after. fn rearrange_monitor(&mut self, conn: &Connection<'_>, mon: usize) { (self.arrange)(&mut self.mons[mon], conn); } |