all repos — fluxbox @ 706ec5c262dd8b99238d1db4871e6de071cf2624

custom fork of the fluxbox windowmanager

show/hide tooltip if title length changes enough while mouse is over the iconbutton
Mark Tiefenbruck mark@fluxbox.org
commit

706ec5c262dd8b99238d1db4871e6de071cf2624

parent

a97ba40053c446ae1fb19f5cd381b4188adac22f

1 files changed, 7 insertions(+), 8 deletions(-)

jump to
M src/IconButton.ccsrc/IconButton.cc

@@ -119,6 +119,8 @@ xoffset = m_icon_window.x() + m_icon_window.width() + 1;

if (FbTk::TextButton::textExceeds(xoffset)) m_win.screen().showTooltip(m_win.title()); + else + m_win.screen().hideTooltip(); } void IconButton::clear() {

@@ -238,14 +240,11 @@ setupWindow();

} else { m_icon_window.clear(); } - // if the title was changed AND the tooltip window is visible AND - // we have had an enter notify event ( without the leave notify ) - // update the text inside it - if (subj == &m_win.titleSig() && - m_has_tooltip && - m_win.screen().tooltipWindow().isVisible()) { - m_win.screen().tooltipWindow().updateText(m_win.title()); - } + + // if the title was changed AND the mouse is over *this, + // update the tooltip + if (subj == &m_win.titleSig() && m_has_tooltip) + showTooltip(); }