From a39e3e33b5eece4c59a61c202152ad607e546d56 Mon Sep 17 00:00:00 2001 From: Mark Tiefenbruck Date: Wed, 4 Jun 2008 08:48:43 -0700 Subject: only remove outside border when disabled by decoration mask --- ChangeLog | 3 +++ src/FbWinFrame.cc | 9 +++++---- src/FbWinFrame.hh | 4 ++-- 3 files changed, 10 insertions(+), 6 deletions(-) diff --git a/ChangeLog b/ChangeLog index dc0e68b..a4750fd 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,8 @@ (Format: Year/Month/Day) Changes for 1.1 +*08/06/04: + * Leave titlebar and handle borders alone with borderless windows (Mark) + FbWinFrame.cc/hh *08/06/03: * Add -list-commands command line option, which prints a list of valid fluxbox commands (Mark) diff --git a/src/FbWinFrame.cc b/src/FbWinFrame.cc index 5dd9bca..afd5fb5 100644 --- a/src/FbWinFrame.cc +++ b/src/FbWinFrame.cc @@ -1460,8 +1460,8 @@ void FbWinFrame::applyDecorations() { } bool FbWinFrame::setBorderWidth(bool do_move) { - unsigned int border_width = m_decoration_mask & DECORM_BORDER ? - theme()->border().width() : 0; + unsigned int border_width = theme()->border().width(); + unsigned int win_bw = m_decoration_mask & DECORM_BORDER ? border_width : 0; if (border_width && theme()->border().color().pixel() != window().borderColor()) { @@ -1473,7 +1473,8 @@ bool FbWinFrame::setBorderWidth(bool do_move) { tabcontainer().setBorderColor(theme()->border().color()); } - if (border_width == window().borderWidth()) + if (border_width == handle().borderWidth() && + win_bw == window().borderWidth()) return false; int grav_x=0, grav_y=0; @@ -1490,7 +1491,7 @@ bool FbWinFrame::setBorderWidth(bool do_move) { if (m_use_handle) bw_changes += static_cast(border_width - handle().borderWidth()); - window().setBorderWidth(border_width); + window().setBorderWidth(win_bw); setTabMode(NOTSET); diff --git a/src/FbWinFrame.hh b/src/FbWinFrame.hh index f288253..e24612e 100644 --- a/src/FbWinFrame.hh +++ b/src/FbWinFrame.hh @@ -248,8 +248,8 @@ public: bool isShaded() const { return m_shaded; } FocusableTheme &theme() const { return m_theme; } /// @return titlebar height - unsigned int titlebarHeight() const { return (m_use_titlebar?m_titlebar.height()+m_window.borderWidth():0); } - unsigned int handleHeight() const { return (m_use_handle?m_handle.height()+m_window.borderWidth():0); } + unsigned int titlebarHeight() const { return (m_use_titlebar?m_titlebar.height()+m_titlebar.borderWidth():0); } + unsigned int handleHeight() const { return (m_use_handle?m_handle.height()+m_handle.borderWidth():0); } /// @return size of button unsigned int buttonHeight() const; bool externalTabMode() const { return m_tabmode == EXTERNAL && m_use_tabs; } -- cgit v0.11.2