diff options
author | simonb <simonb> | 2006-06-24 14:05:19 (GMT) |
---|---|---|
committer | simonb <simonb> | 2006-06-24 14:05:19 (GMT) |
commit | 0b730c76b10babe20738067ae7aec5a102d451fe (patch) | |
tree | 727cc111eeffd9fe838a04d54da834b9d74b6905 /src/FbWinFrame.cc | |
parent | 1d0b23bd020c9185dc9cbf8952ab97a27f061be0 (diff) | |
download | fluxbox-0b730c76b10babe20738067ae7aec5a102d451fe.zip fluxbox-0b730c76b10babe20738067ae7aec5a102d451fe.tar.bz2 |
fix more x errors due to using an invalid background
Diffstat (limited to 'src/FbWinFrame.cc')
-rw-r--r-- | src/FbWinFrame.cc | 15 |
1 files changed, 12 insertions, 3 deletions
diff --git a/src/FbWinFrame.cc b/src/FbWinFrame.cc index 00583d7..9df9012 100644 --- a/src/FbWinFrame.cc +++ b/src/FbWinFrame.cc | |||
@@ -159,7 +159,9 @@ bool FbWinFrame::setTabMode(TabMode tabmode) { | |||
159 | m_tab_container.setOrientation(FbTk::ROT0); | 159 | m_tab_container.setOrientation(FbTk::ROT0); |
160 | if (m_tab_container.parent()->window() == m_screen.rootWindow().window()) { | 160 | if (m_tab_container.parent()->window() == m_screen.rootWindow().window()) { |
161 | m_layeritem.removeWindow(m_tab_container); | 161 | m_layeritem.removeWindow(m_tab_container); |
162 | m_tab_container.hide(); | ||
162 | m_tab_container.reparent(m_titlebar, m_label.x(), m_label.y()); | 163 | m_tab_container.reparent(m_titlebar, m_label.x(), m_label.y()); |
164 | m_tab_container.invalidateBackground(); | ||
163 | m_tab_container.resize(m_label.width(), m_label.height()); | 165 | m_tab_container.resize(m_label.width(), m_label.height()); |
164 | m_tab_container.raise(); | 166 | m_tab_container.raise(); |
165 | } | 167 | } |
@@ -424,10 +426,8 @@ void FbWinFrame::alignTabs() { | |||
424 | } | 426 | } |
425 | 427 | ||
426 | if (m_tab_container.parent()->window() != m_screen.rootWindow().window()) { | 428 | if (m_tab_container.parent()->window() != m_screen.rootWindow().window()) { |
427 | // because the label might be using the same cached pixmap as tab container! | ||
428 | renderTitlebar(); | ||
429 | applyTitlebar(); | ||
430 | m_tab_container.reparent(m_screen.rootWindow(), tabx, taby); | 429 | m_tab_container.reparent(m_screen.rootWindow(), tabx, taby); |
430 | m_label.clear(); | ||
431 | m_layeritem.addWindow(m_tab_container); | 431 | m_layeritem.addWindow(m_tab_container); |
432 | } else { | 432 | } else { |
433 | m_tab_container.move(tabx, taby); | 433 | m_tab_container.move(tabx, taby); |
@@ -1000,12 +1000,15 @@ void FbWinFrame::reconfigure() { | |||
1000 | 1000 | ||
1001 | // we do handle settings whether on or not so that if they get toggled | 1001 | // we do handle settings whether on or not so that if they get toggled |
1002 | // then things are ok... | 1002 | // then things are ok... |
1003 | m_handle.invalidateBackground(); | ||
1003 | m_handle.moveResize(-handle_bw, ypos, | 1004 | m_handle.moveResize(-handle_bw, ypos, |
1004 | m_window.width(), grip_height); | 1005 | m_window.width(), grip_height); |
1005 | 1006 | ||
1007 | m_grip_left.invalidateBackground(); | ||
1006 | m_grip_left.moveResize(-handle_bw, -handle_bw, | 1008 | m_grip_left.moveResize(-handle_bw, -handle_bw, |
1007 | grip_width, grip_height); | 1009 | grip_width, grip_height); |
1008 | 1010 | ||
1011 | m_grip_right.invalidateBackground(); | ||
1009 | m_grip_right.moveResize(m_handle.width() - grip_width - handle_bw, -handle_bw, | 1012 | m_grip_right.moveResize(m_handle.width() - grip_width - handle_bw, -handle_bw, |
1010 | grip_width, grip_height); | 1013 | grip_width, grip_height); |
1011 | 1014 | ||
@@ -1089,6 +1092,7 @@ void FbWinFrame::reconfigureTitlebar() { | |||
1089 | // if the titlebar grows in size, make sure the whole window does too | 1092 | // if the titlebar grows in size, make sure the whole window does too |
1090 | if (orig_height != title_height) | 1093 | if (orig_height != title_height) |
1091 | m_window.resize(m_window.width(), m_window.height()-orig_height+title_height); | 1094 | m_window.resize(m_window.width(), m_window.height()-orig_height+title_height); |
1095 | m_titlebar.invalidateBackground(); | ||
1092 | m_titlebar.moveResize(-m_titlebar.borderWidth(), -m_titlebar.borderWidth(), | 1096 | m_titlebar.moveResize(-m_titlebar.borderWidth(), -m_titlebar.borderWidth(), |
1093 | m_window.width(), title_height); | 1097 | m_window.width(), title_height); |
1094 | 1098 | ||
@@ -1097,6 +1101,8 @@ void FbWinFrame::reconfigureTitlebar() { | |||
1097 | unsigned int button_size = buttonHeight(); | 1101 | unsigned int button_size = buttonHeight(); |
1098 | m_button_size = button_size; | 1102 | m_button_size = button_size; |
1099 | for (size_t i=0; i < m_buttons_left.size(); i++, next_x += button_size + m_bevel) { | 1103 | for (size_t i=0; i < m_buttons_left.size(); i++, next_x += button_size + m_bevel) { |
1104 | // probably on theme reconfigure, leave bg alone for now | ||
1105 | m_buttons_left[i]->invalidateBackground(); | ||
1100 | m_buttons_left[i]->moveResize(next_x, m_bevel, | 1106 | m_buttons_left[i]->moveResize(next_x, m_bevel, |
1101 | button_size, button_size); | 1107 | button_size, button_size); |
1102 | } | 1108 | } |
@@ -1114,8 +1120,10 @@ void FbWinFrame::reconfigureTitlebar() { | |||
1114 | if (space_left <= 0) | 1120 | if (space_left <= 0) |
1115 | space_left = 1; | 1121 | space_left = 1; |
1116 | 1122 | ||
1123 | m_label.invalidateBackground(); | ||
1117 | m_label.moveResize(next_x, m_bevel, space_left, button_size); | 1124 | m_label.moveResize(next_x, m_bevel, space_left, button_size); |
1118 | 1125 | ||
1126 | m_tab_container.invalidateBackground(); | ||
1119 | if (m_tabmode == INTERNAL) | 1127 | if (m_tabmode == INTERNAL) |
1120 | m_tab_container.moveResize(next_x, m_bevel, | 1128 | m_tab_container.moveResize(next_x, m_bevel, |
1121 | space_left, button_size); | 1129 | space_left, button_size); |
@@ -1134,6 +1142,7 @@ void FbWinFrame::reconfigureTitlebar() { | |||
1134 | // finaly set new buttons to the right | 1142 | // finaly set new buttons to the right |
1135 | for (size_t i=0; i < m_buttons_right.size(); | 1143 | for (size_t i=0; i < m_buttons_right.size(); |
1136 | ++i, next_x += button_size + m_bevel) { | 1144 | ++i, next_x += button_size + m_bevel) { |
1145 | m_buttons_right[i]->invalidateBackground(); | ||
1137 | m_buttons_right[i]->moveResize(next_x, m_bevel, | 1146 | m_buttons_right[i]->moveResize(next_x, m_bevel, |
1138 | button_size, button_size); | 1147 | button_size, button_size); |
1139 | } | 1148 | } |