summaryrefslogtreecommitdiffstats
path: root/otherlibs/graph
diff options
context:
space:
mode:
authorXavier Leroy <xavier.leroy@inria.fr>1999-11-08 16:59:58 +0000
committerXavier Leroy <xavier.leroy@inria.fr>1999-11-08 16:59:58 +0000
commit79fa527d00d1185f51c53b162823220d1cfa97d4 (patch)
tree7dbecbb0a225aa32c9beb28982e70e586789806c /otherlibs/graph
parent4c35991b46dca650dc4301d35a50bba16482971f (diff)
Accepter n'importe quel bouton
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@2479 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
Diffstat (limited to 'otherlibs/graph')
-rw-r--r--otherlibs/graph/events.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/otherlibs/graph/events.c b/otherlibs/graph/events.c
index 17a76845f..a5bf169e0 100644
--- a/otherlibs/graph/events.c
+++ b/otherlibs/graph/events.c
@@ -77,7 +77,8 @@ value gr_wait_event(value eventlist)
mouse_x = win_x;
mouse_y = win_y;
}
- button = modifiers & Button1Mask;
+ button = modifiers & (Button1Mask | Button2Mask | Button3Mask
+ | Button4Mask | Button5Mask);
if (!QueueIsEmpty) key = gr_queue[gr_head];
} else {
if ((mask & KeyPressMask) && !QueueIsEmpty) {
@@ -99,12 +100,14 @@ value gr_wait_event(value eventlist)
case ButtonRelease:
mouse_x = event.xbutton.x;
mouse_y = event.xbutton.y;
- button = event.type == ButtonPress;
+ button = (event.type == ButtonPress);
break;
case MotionNotify:
mouse_x = event.xmotion.x;
mouse_y = event.xmotion.y;
- button = event.xmotion.state & Button1Mask;
+ button = event.xmotion.state &
+ (Button1Mask | Button2Mask | Button3Mask
+ | Button4Mask | Button5Mask);
break;
case KeyPress:
gr_handle_simple_event(&event);