aboutsummaryrefslogtreecommitdiff
path: root/src/ArrowButton.cc
diff options
context:
space:
mode:
authorfluxgen <fluxgen>2003-05-17 11:30:59 (GMT)
committerfluxgen <fluxgen>2003-05-17 11:30:59 (GMT)
commit0e1eb7484118cfec7d065022d1391651ca70d7be (patch)
treeeb3a41c7f2e3ca304c9dbcecf971826c9802f989 /src/ArrowButton.cc
parent1d49072a767b6c3525906135330d1d715616574c (diff)
downloadfluxbox-0e1eb7484118cfec7d065022d1391651ca70d7be.zip
fluxbox-0e1eb7484118cfec7d065022d1391651ca70d7be.tar.bz2
fixed autohide bug on toolbar buttons
Diffstat (limited to 'src/ArrowButton.cc')
-rw-r--r--src/ArrowButton.cc23
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
34ArrowButton::ArrowButton(ArrowButton::Type arrow_type, 38ArrowButton::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
43void ArrowButton::clear() { 50void ArrowButton::clear() {
@@ -60,6 +67,16 @@ void ArrowButton::buttonReleaseEvent(XButtonEvent &event) {
60 drawArrow(); 67 drawArrow();
61} 68}
62 69
70void ArrowButton::enterNotifyEvent(XCrossingEvent &ce) {
71 if (m_mouse_handler)
72 m_mouse_handler->enterNotifyEvent(ce);
73}
74
75void 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*/