From 1a7a680bbc6b309ecbc24ac6921185fdd24366e7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Martin=20Gr=C3=A4=C3=9Flin?= Date: Tue, 22 Jul 2014 11:48:32 +0200 Subject: [PATCH] Improve defining the border settings For partially maximized windows we don't want any borders. --- windec/kdecoration2/breezedeco.cpp | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) diff --git a/windec/kdecoration2/breezedeco.cpp b/windec/kdecoration2/breezedeco.cpp index 8a3236c2..bd91d078 100644 --- a/windec/kdecoration2/breezedeco.cpp +++ b/windec/kdecoration2/breezedeco.cpp @@ -105,15 +105,10 @@ void Decoration::updateTitleRect() void Decoration::recalculateBorders() { - int left = 4; - int right = 4; + int left = client()->isMaximizedHorizontally() ? 0 : 4; + int right = client()->isMaximizedHorizontally() ? 0 : 4; int top = 25; - int bottom = 4; - if (client()->isMaximized()) { - left = 0; - right = 0; - bottom = 0; - } + int bottom = client()->isMaximizedVertically() ? 0 : 4; setBorders(left, right, top, bottom); }