aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorMathias Gumz <akira@fluxbox.org>2015-02-01 08:40:49 (GMT)
committerMathias Gumz <akira@fluxbox.org>2015-02-01 08:40:49 (GMT)
commitc207226a3211c3010c8cb40692da7409b635e763 (patch)
treeec4422a636e269557c75533789adbb24cfe2397f /src
parente1359adfd064d12bbf2bfb899ee99f07c2c7c712 (diff)
downloadfluxbox-c207226a3211c3010c8cb40692da7409b635e763.zip
fluxbox-c207226a3211c3010c8cb40692da7409b635e763.tar.bz2
Fix regression: use proper texture for the grips
Diffstat (limited to 'src')
-rw-r--r--src/FbWinFrame.cc18
1 files changed, 8 insertions, 10 deletions
diff --git a/src/FbWinFrame.cc b/src/FbWinFrame.cc
index 873276f..caf3ce3 100644
--- a/src/FbWinFrame.cc
+++ b/src/FbWinFrame.cc
@@ -95,7 +95,7 @@ void render(FbTk::Color &col, Pixmap &pm, unsigned int width, unsigned int heigh
95 95
96} 96}
97 97
98void bg_pm_or_color(FbTk::FbWindow& win, Pixmap& pm, FbTk::Color& color) { 98void bg_pm_or_color(FbTk::FbWindow& win, const Pixmap& pm, const FbTk::Color& color) {
99 if (pm) { 99 if (pm) {
100 win.setBackgroundPixmap(pm); 100 win.setBackgroundPixmap(pm);
101 } else { 101 } else {
@@ -855,12 +855,9 @@ void FbWinFrame::reconfigure() {
855 m_window.resize(m_window.width(), m_window.height() - 855 m_window.resize(m_window.width(), m_window.height() -
856 orig_handle_h + theme()->handleWidth()); 856 orig_handle_h + theme()->handleWidth());
857 857
858 handle().resize(handle().width(), 858 handle().resize(handle().width(), theme()->handleWidth());
859 theme()->handleWidth()); 859 gripLeft().resize(buttonHeight(), theme()->handleWidth());
860 gripLeft().resize(buttonHeight(), 860 gripRight().resize(gripLeft().width(), gripLeft().height());
861 theme()->handleWidth());
862 gripRight().resize(gripLeft().width(),
863 gripLeft().height());
864 861
865 // align titlebar and render it 862 // align titlebar and render it
866 if (m_use_titlebar) { 863 if (m_use_titlebar) {
@@ -1168,23 +1165,24 @@ void FbWinFrame::renderHandles() {
1168 1165
1169 render(m_grip_face.color[FOCUS], m_grip_face.pm[FOCUS], 1166 render(m_grip_face.color[FOCUS], m_grip_face.pm[FOCUS],
1170 m_grip_left.width(), m_grip_left.height(), 1167 m_grip_left.width(), m_grip_left.height(),
1171 ft->handleTexture(), m_imagectrl); 1168 ft->gripTexture(), m_imagectrl);
1172 1169
1173 render(m_grip_face.color[UNFOCUS], m_grip_face.pm[UNFOCUS], 1170 render(m_grip_face.color[UNFOCUS], m_grip_face.pm[UNFOCUS],
1174 m_grip_left.width(), m_grip_left.height(), 1171 m_grip_left.width(), m_grip_left.height(),
1175 uft->handleTexture(), m_imagectrl); 1172 uft->gripTexture(), m_imagectrl);
1176} 1173}
1177 1174
1178void FbWinFrame::applyHandles() { 1175void FbWinFrame::applyHandles() {
1179 1176
1180 bool f = m_state.focused; 1177 bool f = m_state.focused;
1181 int alpha = getAlpha(m_state.focused); 1178 int alpha = getAlpha(f);
1182 1179
1183 m_handle.setAlpha(alpha); 1180 m_handle.setAlpha(alpha);
1184 bg_pm_or_color(m_handle, m_handle_face.pm[f], m_handle_face.color[f]); 1181 bg_pm_or_color(m_handle, m_handle_face.pm[f], m_handle_face.color[f]);
1185 1182
1186 m_grip_left.setAlpha(alpha); 1183 m_grip_left.setAlpha(alpha);
1187 m_grip_right.setAlpha(alpha); 1184 m_grip_right.setAlpha(alpha);
1185
1188 bg_pm_or_color(m_grip_left, m_grip_face.pm[f], m_grip_face.color[f]); 1186 bg_pm_or_color(m_grip_left, m_grip_face.pm[f], m_grip_face.color[f]);
1189 bg_pm_or_color(m_grip_right, m_grip_face.pm[f], m_grip_face.color[f]); 1187 bg_pm_or_color(m_grip_right, m_grip_face.pm[f], m_grip_face.color[f]);
1190} 1188}