summaryrefslogtreecommitdiff
path: root/src/clients/client.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/clients/client.rs')
-rw-r--r--src/clients/client.rs10
1 files changed, 8 insertions, 2 deletions
diff --git a/src/clients/client.rs b/src/clients/client.rs
index 17cfd4f..d4e2e88 100644
--- a/src/clients/client.rs
+++ b/src/clients/client.rs
@@ -1,7 +1,7 @@
use xcb::{
x::{
ChangeProperty, ChangeWindowAttributes, ConfigWindow, ConfigureNotifyEvent,
- ConfigureWindow, Cw, EventMask, MapWindow, SendEvent, SendEventDest, Window,
+ ConfigureWindow, Cw, EventMask, MapWindow, SendEvent, SendEventDest, StackMode, Window,
},
VoidCookieChecked, Xid,
};
@@ -113,7 +113,13 @@ impl Client {
}
/// Set the floating status.
- pub fn set_floating(&mut self, floating: bool) {
+ pub fn set_floating(&mut self, conn: &Connection<'_>, floating: bool) {
+ if floating != self.floating {
+ conn.send_request(&ConfigureWindow {
+ window: self.window,
+ value_list: &[ConfigWindow::StackMode(StackMode::Above)],
+ });
+ }
self.floating = floating;
}