diff options
author | fluxgen <fluxgen> | 2003-05-17 11:30:59 (GMT) |
---|---|---|
committer | fluxgen <fluxgen> | 2003-05-17 11:30:59 (GMT) |
commit | 0e1eb7484118cfec7d065022d1391651ca70d7be (patch) | |
tree | eb3a41c7f2e3ca304c9dbcecf971826c9802f989 /src/ArrowButton.cc | |
parent | 1d49072a767b6c3525906135330d1d715616574c (diff) | |
download | fluxbox-0e1eb7484118cfec7d065022d1391651ca70d7be.zip fluxbox-0e1eb7484118cfec7d065022d1391651ca70d7be.tar.bz2 |
fixed autohide bug on toolbar buttons
Diffstat (limited to 'src/ArrowButton.cc')
-rw-r--r-- | src/ArrowButton.cc | 23 |
1 files changed, 20 insertions, 3 deletions
diff --git a/src/ArrowButton.cc b/src/ArrowButton.cc index bc44393..1d3d9fe 100644 --- a/src/ArrowButton.cc +++ b/src/ArrowButton.cc | |||
@@ -19,7 +19,7 @@ | |||
19 | // FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER | 19 | // FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER |
20 | // DEALINGS IN THE SOFTWARE. | 20 | // DEALINGS IN THE SOFTWARE. |
21 | 21 | ||
22 | // $Id: ArrowButton.cc,v 1.2 2003/04/27 01:54:18 fluxgen Exp $ | 22 | // $Id: ArrowButton.cc,v 1.3 2003/05/17 11:30:59 fluxgen Exp $ |
23 | 23 | ||
24 | #include "ArrowButton.hh" | 24 | #include "ArrowButton.hh" |
25 | 25 | ||
@@ -28,7 +28,11 @@ ArrowButton::ArrowButton(ArrowButton::Type arrow_type, | |||
28 | int x, int y, | 28 | int x, int y, |
29 | unsigned int width, unsigned int height): | 29 | unsigned int width, unsigned int height): |
30 | FbTk::Button(parent, x, y, width, height), | 30 | FbTk::Button(parent, x, y, width, height), |
31 | m_arrow_type(arrow_type) { | 31 | m_arrow_type(arrow_type), |
32 | m_mouse_handler(0) { | ||
33 | |||
34 | window().setEventMask(ExposureMask | ButtonPressMask | ButtonReleaseMask | | ||
35 | EnterWindowMask | LeaveWindowMask); | ||
32 | } | 36 | } |
33 | 37 | ||
34 | ArrowButton::ArrowButton(ArrowButton::Type arrow_type, | 38 | ArrowButton::ArrowButton(ArrowButton::Type arrow_type, |
@@ -36,8 +40,11 @@ ArrowButton::ArrowButton(ArrowButton::Type arrow_type, | |||
36 | int x, int y, | 40 | int x, int y, |
37 | unsigned int width, unsigned int height): | 41 | unsigned int width, unsigned int height): |
38 | FbTk::Button(screen_num, x, y, width, height), | 42 | FbTk::Button(screen_num, x, y, width, height), |
39 | m_arrow_type(arrow_type) { | 43 | m_arrow_type(arrow_type), |
44 | m_mouse_handler(0) { | ||
40 | 45 | ||
46 | window().setEventMask(ExposureMask | ButtonPressMask | ButtonReleaseMask | | ||
47 | EnterWindowMask | LeaveWindowMask); | ||
41 | } | 48 | } |
42 | 49 | ||
43 | void ArrowButton::clear() { | 50 | void ArrowButton::clear() { |
@@ -60,6 +67,16 @@ void ArrowButton::buttonReleaseEvent(XButtonEvent &event) { | |||
60 | drawArrow(); | 67 | drawArrow(); |
61 | } | 68 | } |
62 | 69 | ||
70 | void ArrowButton::enterNotifyEvent(XCrossingEvent &ce) { | ||
71 | if (m_mouse_handler) | ||
72 | m_mouse_handler->enterNotifyEvent(ce); | ||
73 | } | ||
74 | |||
75 | void ArrowButton::leaveNotifyEvent(XCrossingEvent &ce) { | ||
76 | if (m_mouse_handler) | ||
77 | m_mouse_handler->leaveNotifyEvent(ce); | ||
78 | } | ||
79 | |||
63 | /** | 80 | /** |
64 | redraws the arrow button | 81 | redraws the arrow button |
65 | */ | 82 | */ |