summaryrefslogtreecommitdiff
path: root/src/clients/mod.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/clients/mod.rs')
-rw-r--r--src/clients/mod.rs20
1 files changed, 9 insertions, 11 deletions
diff --git a/src/clients/mod.rs b/src/clients/mod.rs
index 01f3205..7a06210 100644
--- a/src/clients/mod.rs
+++ b/src/clients/mod.rs
@@ -46,7 +46,7 @@ pub type ClientIdx = usize;
impl WM<'_> {
/// Perform configure requests if we're happy with them, or they're for an unmanaged window.
- pub(crate) fn handle_configure_request(&mut self, e: &ConfigureRequestEvent) -> Result<()> {
+ pub(crate) fn handle_configure_request(&mut self, e: &ConfigureRequestEvent) {
if let Some(c) = self.clients.find_client_mut(e.window()) {
// Always allow setting border width
if c.floating() {
@@ -65,26 +65,26 @@ impl WM<'_> {
c.configure_notify(&self.conn);
} else {
let (mut x, mut y, mut width, mut height, mut border_width) =
- (0_i32, 0_i32, 0_u32, 0_u32, 0_u32);
+ (0_i32, 0_i32, 1_u32, 1_u32, 0_u32);
if e.value_mask().contains(ConfigWindowMask::X) {
- x = e.x() as i32;
+ x = i32::from(e.x());
}
if e.value_mask().contains(ConfigWindowMask::Y) {
- y = e.y() as i32;
+ y = i32::from(e.y());
}
if e.value_mask().contains(ConfigWindowMask::HEIGHT) {
- height = e.height() as u32;
+ height = u32::from(e.height());
}
if e.value_mask().contains(ConfigWindowMask::WIDTH) {
- width = e.width() as u32;
+ width = u32::from(e.width());
}
if e.value_mask().contains(ConfigWindowMask::BORDER_WIDTH) {
- border_width = e.border_width() as u32;
+ border_width = u32::from(e.border_width());
}
// Configure it as requested, and sort the rest when we actually map the window
- self.conn.send_and_check_request(&ConfigureWindow {
+ self.conn.send_request(&ConfigureWindow {
window: e.window(),
value_list: &[
ConfigWindow::X(x),
@@ -94,10 +94,8 @@ impl WM<'_> {
ConfigWindow::BorderWidth(border_width),
ConfigWindow::StackMode(e.stack_mode()),
],
- })?;
+ });
}
-
- Ok(())
}
/// Update our monitor geometry if the root window is reconfigured