Problem with mouse EventHandler on linux
- To: mathgroup at smc.vnet.net
- Subject: [mg104559] Problem with mouse EventHandler on linux
- From: Harrie Kraai <hakraai at xs4all.nl>
- Date: Wed, 4 Nov 2009 01:32:29 -0500 (EST)
Hi, I met the following problem with the EventHandler for mouse actions
on Linux (SuSE 10.?, kernel 2.6.16.46), Mathematica 7.0.1
DynamicModule[{a, b, c},
EventHandler[
Dynamic@ArrayPlot[{{a, b, c}}], {{"MouseDown",
1} :> (a = 1), {"MouseUp", 1} :> (a = 0), {"MouseDragged",
1} :> (Beep[]), {"MouseDown", 2} :> (b = 1), {"MouseUp",
2} :> (b = 0), {"MouseDragged", 2} :> (Beep[]), {"MouseDown",
3} :> (c = 1), {"MouseUp", 3} :> (c = 0), {"MouseDragged",
3} :> (Beep[])}], Initialization :> (a = 0; b = 0; c = 0;)]
The arrayplot represents pushed buttons. The problem is that the right
mouse button (2) signals a MouseUp immediately after a MouseDown, even
if you keep it down. The middle button/wheel, supposed to be button 3,
signals a MouseDown+MouseUp for button 1 when pushed down.
On Windows (XP) I noticed that that buttons 1 and 2 work correctly but 3
is completely ignored.
Can you reproduce this? Is this a bug?
HK