diff options
author | Thomas Lübking <thomas.luebking@gmail.com> | 2016-09-13 19:06:40 (GMT) |
---|---|---|
committer | Mathias Gumz <akira@fluxbox.org> | 2016-09-21 18:52:14 (GMT) |
commit | c69d5afb64b3ce90190cd5e0515020afb48a8b39 (patch) | |
tree | 854d625157c86643e815e4df2bbc834c09a91464 /src/Window.cc | |
parent | bc1ad61a7d6f10debc5781032e428f297a6b2fad (diff) | |
download | fluxbox-c69d5afb64b3ce90190cd5e0515020afb48a8b39.zip fluxbox-c69d5afb64b3ce90190cd5e0515020afb48a8b39.tar.bz2 |
show tooltips for tabs
on the run (yes sucks, sorry) fixes a bug where windows were not
activated on hovering the tab (for focus-follows-mouse policies)
REQUEST: 95
The iconbar already shows tooltips and I doubt the claim that (untabbed)
titlebars are "often" too short for the window title.
Diffstat (limited to 'src/Window.cc')
-rw-r--r-- | src/Window.cc | 16 |
1 files changed, 12 insertions, 4 deletions
diff --git a/src/Window.cc b/src/Window.cc index 5eaf0d5..1e32bd5 100644 --- a/src/Window.cc +++ b/src/Window.cc | |||
@@ -2774,10 +2774,13 @@ void FluxboxWindow::enterNotifyEvent(XCrossingEvent &ev) { | |||
2774 | Fluxbox::instance()->keys()->doAction(ev.type, ev.state, 0, | 2774 | Fluxbox::instance()->keys()->doAction(ev.type, ev.state, 0, |
2775 | Keys::ON_WINDOW, m_client); | 2775 | Keys::ON_WINDOW, m_client); |
2776 | 2776 | ||
2777 | WinClient *client = 0; | 2777 | // determine if we're in a label button (tab) |
2778 | if (screen().focusControl().isMouseTabFocus()) { | 2778 | WinClient *client = winClientOfLabelButtonWindow(ev.window); |
2779 | // determine if we're in a label button (tab) | 2779 | if (client) { |
2780 | client = winClientOfLabelButtonWindow(ev.window); | 2780 | if (IconButton *tab = m_labelbuttons[client]) { |
2781 | m_has_tooltip = true; | ||
2782 | tab->showTooltip(); | ||
2783 | } | ||
2781 | } | 2784 | } |
2782 | 2785 | ||
2783 | if (ev.window == frame().window() || | 2786 | if (ev.window == frame().window() || |
@@ -2818,6 +2821,11 @@ void FluxboxWindow::leaveNotifyEvent(XCrossingEvent &ev) { | |||
2818 | return; | 2821 | return; |
2819 | } | 2822 | } |
2820 | 2823 | ||
2824 | if (m_has_tooltip) { | ||
2825 | m_has_tooltip = false; | ||
2826 | screen().hideTooltip(); | ||
2827 | } | ||
2828 | |||
2821 | // still inside? | 2829 | // still inside? |
2822 | if (ev.x_root > frame().x() && ev.y_root > frame().y() && | 2830 | if (ev.x_root > frame().x() && ev.y_root > frame().y() && |
2823 | ev.x_root <= (int)(frame().x() + frame().width()) && | 2831 | ev.x_root <= (int)(frame().x() + frame().width()) && |