aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/IconButton.hh2
-rw-r--r--src/Window.cc16
-rw-r--r--src/Window.hh1
3 files changed, 14 insertions, 5 deletions
diff --git a/src/IconButton.hh b/src/IconButton.hh
index d3cb3d8..4bb57e7 100644
--- a/src/IconButton.hh
+++ b/src/IconButton.hh
@@ -66,6 +66,7 @@ public:
66 bool setOrientation(FbTk::Orientation orient); 66 bool setOrientation(FbTk::Orientation orient);
67 67
68 virtual unsigned int preferredWidth() const; 68 virtual unsigned int preferredWidth() const;
69 void showTooltip();
69 70
70 const FbTk::Signal<> &titleChanged() { return m_title_changed; } 71 const FbTk::Signal<> &titleChanged() { return m_title_changed; }
71 72
@@ -74,7 +75,6 @@ protected:
74private: 75private:
75 void reconfigAndClear(); 76 void reconfigAndClear();
76 void setupWindow(); 77 void setupWindow();
77 void showTooltip();
78 78
79 /// Refresh all pixmaps and windows 79 /// Refresh all pixmaps and windows
80 /// @param setup Wether to setup window again. 80 /// @param setup Wether to setup window again.
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()) &&
diff --git a/src/Window.hh b/src/Window.hh
index b6e56b2..0cfe73a 100644
--- a/src/Window.hh
+++ b/src/Window.hh
@@ -576,6 +576,7 @@ private:
576 WinClient *m_client; ///< current client 576 WinClient *m_client; ///< current client
577 typedef std::map<WinClient *, IconButton *> Client2ButtonMap; 577 typedef std::map<WinClient *, IconButton *> Client2ButtonMap;
578 Client2ButtonMap m_labelbuttons; 578 Client2ButtonMap m_labelbuttons;
579 bool m_has_tooltip;
579 580
580 SizeHints m_size_hint; 581 SizeHints m_size_hint;
581 struct { 582 struct {