only remove outside border when disabled by decoration mask

This commit is contained in:
Mark Tiefenbruck 2008-06-04 08:48:43 -07:00
parent ad6a7e48f4
commit a39e3e33b5
3 changed files with 10 additions and 6 deletions

View file

@ -1,5 +1,8 @@
(Format: Year/Month/Day) (Format: Year/Month/Day)
Changes for 1.1 Changes for 1.1
*08/06/04:
* Leave titlebar and handle borders alone with borderless windows (Mark)
FbWinFrame.cc/hh
*08/06/03: *08/06/03:
* Add -list-commands command line option, which prints a list of valid * Add -list-commands command line option, which prints a list of valid
fluxbox commands (Mark) fluxbox commands (Mark)

View file

@ -1460,8 +1460,8 @@ void FbWinFrame::applyDecorations() {
} }
bool FbWinFrame::setBorderWidth(bool do_move) { bool FbWinFrame::setBorderWidth(bool do_move) {
unsigned int border_width = m_decoration_mask & DECORM_BORDER ? unsigned int border_width = theme()->border().width();
theme()->border().width() : 0; unsigned int win_bw = m_decoration_mask & DECORM_BORDER ? border_width : 0;
if (border_width && if (border_width &&
theme()->border().color().pixel() != window().borderColor()) { theme()->border().color().pixel() != window().borderColor()) {
@ -1473,7 +1473,8 @@ bool FbWinFrame::setBorderWidth(bool do_move) {
tabcontainer().setBorderColor(theme()->border().color()); tabcontainer().setBorderColor(theme()->border().color());
} }
if (border_width == window().borderWidth()) if (border_width == handle().borderWidth() &&
win_bw == window().borderWidth())
return false; return false;
int grav_x=0, grav_y=0; int grav_x=0, grav_y=0;
@ -1490,7 +1491,7 @@ bool FbWinFrame::setBorderWidth(bool do_move) {
if (m_use_handle) if (m_use_handle)
bw_changes += static_cast<signed>(border_width - handle().borderWidth()); bw_changes += static_cast<signed>(border_width - handle().borderWidth());
window().setBorderWidth(border_width); window().setBorderWidth(win_bw);
setTabMode(NOTSET); setTabMode(NOTSET);

View file

@ -248,8 +248,8 @@ public:
bool isShaded() const { return m_shaded; } bool isShaded() const { return m_shaded; }
FocusableTheme<FbWinFrameTheme> &theme() const { return m_theme; } FocusableTheme<FbWinFrameTheme> &theme() const { return m_theme; }
/// @return titlebar height /// @return titlebar height
unsigned int titlebarHeight() const { return (m_use_titlebar?m_titlebar.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_window.borderWidth():0); } unsigned int handleHeight() const { return (m_use_handle?m_handle.height()+m_handle.borderWidth():0); }
/// @return size of button /// @return size of button
unsigned int buttonHeight() const; unsigned int buttonHeight() const;
bool externalTabMode() const { return m_tabmode == EXTERNAL && m_use_tabs; } bool externalTabMode() const { return m_tabmode == EXTERNAL && m_use_tabs; }