Fix regression: use proper texture for the grips
Mathias Gumz akira@fluxbox.org
1 files changed,
8 insertions(+),
10 deletions(-)
jump to
M
src/FbWinFrame.cc
→
src/FbWinFrame.cc
@@ -95,7 +95,7 @@ ictl.removeImage(tmp);
} -void bg_pm_or_color(FbTk::FbWindow& win, Pixmap& pm, FbTk::Color& color) { +void bg_pm_or_color(FbTk::FbWindow& win, const Pixmap& pm, const FbTk::Color& color) { if (pm) { win.setBackgroundPixmap(pm); } else {@@ -855,12 +855,9 @@ if (m_use_handle && orig_handle_h != theme()->handleWidth())
m_window.resize(m_window.width(), m_window.height() - orig_handle_h + theme()->handleWidth()); - handle().resize(handle().width(), - theme()->handleWidth()); - gripLeft().resize(buttonHeight(), - theme()->handleWidth()); - gripRight().resize(gripLeft().width(), - gripLeft().height()); + handle().resize(handle().width(), theme()->handleWidth()); + gripLeft().resize(buttonHeight(), theme()->handleWidth()); + gripRight().resize(gripLeft().width(), gripLeft().height()); // align titlebar and render it if (m_use_titlebar) {@@ -1168,23 +1165,24 @@ uft->handleTexture(), m_imagectrl);
render(m_grip_face.color[FOCUS], m_grip_face.pm[FOCUS], m_grip_left.width(), m_grip_left.height(), - ft->handleTexture(), m_imagectrl); + ft->gripTexture(), m_imagectrl); render(m_grip_face.color[UNFOCUS], m_grip_face.pm[UNFOCUS], m_grip_left.width(), m_grip_left.height(), - uft->handleTexture(), m_imagectrl); + uft->gripTexture(), m_imagectrl); } void FbWinFrame::applyHandles() { bool f = m_state.focused; - int alpha = getAlpha(m_state.focused); + int alpha = getAlpha(f); m_handle.setAlpha(alpha); bg_pm_or_color(m_handle, m_handle_face.pm[f], m_handle_face.color[f]); m_grip_left.setAlpha(alpha); m_grip_right.setAlpha(alpha); + bg_pm_or_color(m_grip_left, m_grip_face.pm[f], m_grip_face.color[f]); bg_pm_or_color(m_grip_right, m_grip_face.pm[f], m_grip_face.color[f]); }