aboutsummaryrefslogtreecommitdiff
path: root/src/FbWinFrame.cc
diff options
context:
space:
mode:
authorMark Tiefenbruck <mark@fluxbox.org>2007-12-23 21:33:10 (GMT)
committerMark Tiefenbruck <mark@fluxbox.org>2007-12-23 21:33:10 (GMT)
commitfbc305ca80e352240b32b833e8388fb9aa99fa72 (patch)
treeea1c7d2f66b8ede4209f7299a228f36f98086393 /src/FbWinFrame.cc
parent1b48b749b9a376c883ff4cc2ca3e807ac85cf21f (diff)
downloadfluxbox-fbc305ca80e352240b32b833e8388fb9aa99fa72.zip
fluxbox-fbc305ca80e352240b32b833e8388fb9aa99fa72.tar.bz2
added focused/unfocused borders to styles
Diffstat (limited to 'src/FbWinFrame.cc')
-rw-r--r--src/FbWinFrame.cc18
1 files changed, 12 insertions, 6 deletions
diff --git a/src/FbWinFrame.cc b/src/FbWinFrame.cc
index 266ddea..e96b72f 100644
--- a/src/FbWinFrame.cc
+++ b/src/FbWinFrame.cc
@@ -127,7 +127,7 @@ bool FbWinFrame::setTabMode(TabMode tabmode) {
127 if (tabmode == EXTERNAL) { 127 if (tabmode == EXTERNAL) {
128 m_label.show(); 128 m_label.show();
129 m_tab_container.setBorderWidth(m_window.borderWidth()); 129 m_tab_container.setBorderWidth(m_window.borderWidth());
130 m_tab_container.setBorderColor(theme().border().color()); 130 m_tab_container.setBorderColor(theme().border(m_focused).color());
131 m_tab_container.setEventMask( 131 m_tab_container.setEventMask(
132 ButtonPressMask | ButtonReleaseMask | 132 ButtonPressMask | ButtonReleaseMask |
133 ButtonMotionMask | ExposureMask | 133 ButtonMotionMask | ExposureMask |
@@ -498,6 +498,12 @@ void FbWinFrame::setFocus(bool newvalue) {
498 } 498 }
499 } 499 }
500 500
501 if (m_decoration_mask & DECORM_BORDER &&
502 (theme().border(true).width() != theme().border(false).width() ||
503 theme().border(true).color().pixel() !=
504 theme().border(false).color().pixel()))
505 setBorderWidth(theme().border(newvalue).width());
506
501 applyAll(); 507 applyAll();
502 clearAll(); 508 clearAll();
503} 509}
@@ -1487,21 +1493,21 @@ void FbWinFrame::setBorderWidth(unsigned int border_width) {
1487 bw_changes += static_cast<signed>(border_width - handle().borderWidth()); 1493 bw_changes += static_cast<signed>(border_width - handle().borderWidth());
1488 1494
1489 window().setBorderWidth(border_width); 1495 window().setBorderWidth(border_width);
1490 window().setBorderColor(theme().border().color()); 1496 window().setBorderColor(theme().border(m_focused).color());
1491 1497
1492 setTabMode(NOTSET); 1498 setTabMode(NOTSET);
1493 1499
1494 titlebar().setBorderWidth(border_width); 1500 titlebar().setBorderWidth(border_width);
1495 titlebar().setBorderColor(theme().border().color()); 1501 titlebar().setBorderColor(theme().border(m_focused).color());
1496 1502
1497 handle().setBorderWidth(border_width); 1503 handle().setBorderWidth(border_width);
1498 handle().setBorderColor(theme().border().color()); 1504 handle().setBorderColor(theme().border(m_focused).color());
1499 1505
1500 gripLeft().setBorderWidth(border_width); 1506 gripLeft().setBorderWidth(border_width);
1501 gripLeft().setBorderColor(theme().border().color()); 1507 gripLeft().setBorderColor(theme().border(m_focused).color());
1502 1508
1503 gripRight().setBorderWidth(border_width); 1509 gripRight().setBorderWidth(border_width);
1504 gripRight().setBorderColor(theme().border().color()); 1510 gripRight().setBorderColor(theme().border(m_focused).color());
1505 1511
1506 if (bw_changes != 0) 1512 if (bw_changes != 0)
1507 resize(width(), height() + bw_changes); 1513 resize(width(), height() + bw_changes);