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.rs25
1 files changed, 19 insertions, 6 deletions
diff --git a/src/clients/mod.rs b/src/clients/mod.rs
index 04355fd..7fdb739 100644
--- a/src/clients/mod.rs
+++ b/src/clients/mod.rs
@@ -10,13 +10,12 @@ use crate::{
};
use xcb::{
x::{
- self, ChangeProperty, ConfigWindow, ConfigureNotifyEvent, ConfigureRequestEvent,
- ConfigureWindow, DeleteProperty, DestroyNotifyEvent, Drawable, EventMask, GetGeometry,
- GetWindowAttributes, InputFocus, MapRequestEvent, PropMode, SetInputFocus,
- UnmapNotifyEvent, Window,
+ self, ChangeProperty, ConfigWindow, ConfigWindowMask, ConfigureNotifyEvent,
+ ConfigureRequestEvent, ConfigureWindow, DeleteProperty, DestroyNotifyEvent, Drawable,
+ EventMask, GetGeometry, GetWindowAttributes, InputFocus, MapRequestEvent, PropMode,
+ SetInputFocus, UnmapNotifyEvent, Window,
},
- xinerama::{self},
- BaseEvent, Extension,
+ xinerama, BaseEvent, Extension,
};
pub use client::*;
@@ -38,6 +37,20 @@ 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<()> {
if let Some(c) = self.clients.find_client_mut(e.window()) {
+ // Always allow setting border width
+ if c.floating() {
+ c.set_geom_from(&self.conn, e);
+ } else if e.value_mask().contains(ConfigWindowMask::BORDER_WIDTH) {
+ c.set_geom(
+ &self.conn,
+ c.x(),
+ c.y(),
+ c.height(),
+ c.width(),
+ e.border_width(),
+ );
+ }
+
// TODO: Allow changing some properties:
// - Border width
// - Size and position if floating