diff options
Diffstat (limited to 'src/IconButton.cc')
-rw-r--r-- | src/IconButton.cc | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/src/IconButton.cc b/src/IconButton.cc index 7c70a63..6e7294e 100644 --- a/src/IconButton.cc +++ b/src/IconButton.cc | |||
@@ -24,7 +24,9 @@ | |||
24 | #include "IconbarTool.hh" | 24 | #include "IconbarTool.hh" |
25 | #include "IconbarTheme.hh" | 25 | #include "IconbarTheme.hh" |
26 | 26 | ||
27 | #include "FbAtoms.hh" | ||
27 | #include "Screen.hh" | 28 | #include "Screen.hh" |
29 | #include "Window.hh" | ||
28 | 30 | ||
29 | #include "FbTk/App.hh" | 31 | #include "FbTk/App.hh" |
30 | #include "FbTk/Command.hh" | 32 | #include "FbTk/Command.hh" |
@@ -36,6 +38,7 @@ | |||
36 | #include "config.h" | 38 | #include "config.h" |
37 | #endif // HAVE_CONFIG_H | 39 | #endif // HAVE_CONFIG_H |
38 | 40 | ||
41 | #include <X11/Xatom.h> | ||
39 | #include <X11/Xutil.h> | 42 | #include <X11/Xutil.h> |
40 | #ifdef SHAPE | 43 | #ifdef SHAPE |
41 | #include <X11/extensions/shape.h> | 44 | #include <X11/extensions/shape.h> |
@@ -86,11 +89,13 @@ void IconButton::exposeEvent(XExposeEvent &event) { | |||
86 | 89 | ||
87 | void IconButton::enterNotifyEvent(XCrossingEvent &ev) { | 90 | void IconButton::enterNotifyEvent(XCrossingEvent &ev) { |
88 | m_has_tooltip = true; | 91 | m_has_tooltip = true; |
92 | setCurrentIconbarItem(m_win.fbwindow()->clientWindow()); | ||
89 | showTooltip(); | 93 | showTooltip(); |
90 | } | 94 | } |
91 | 95 | ||
92 | void IconButton::leaveNotifyEvent(XCrossingEvent &ev) { | 96 | void IconButton::leaveNotifyEvent(XCrossingEvent &ev) { |
93 | m_has_tooltip = false; | 97 | m_has_tooltip = false; |
98 | setCurrentIconbarItem(None); | ||
94 | m_win.screen().hideTooltip(); | 99 | m_win.screen().hideTooltip(); |
95 | } | 100 | } |
96 | 101 | ||
@@ -282,3 +287,7 @@ bool IconButton::setOrientation(FbTk::Orientation orient) { | |||
282 | } | 287 | } |
283 | } | 288 | } |
284 | 289 | ||
290 | void IconButton::setCurrentIconbarItem(Window xid) { | ||
291 | m_win.screen().rootWindow().changeProperty(FbAtoms::instance()->getFluxboxCurrentIconbarItemAtom(), | ||
292 | XA_WINDOW, 32, PropModeReplace, reinterpret_cast<unsigned char*>(&xid), 1); | ||
293 | } | ||