Many thanks Tadej!

event->button works fine. 

Here is trace info for left, right and simulated mid buttons:

 mousebuttonDOWN (x,y)=(10,14)state 0 btn=1
 mousebuttonUP (x,y)=(10,14)state 100 button=1
 
 mousebuttonDOWN (x,y)=(9,14)state 0 btn=3
 mousebuttonUP (x,y)=(9,14)state 400 button=3
 
 mousebuttonDOWN (x,y)=(9,14)state 0 btn=2
 mousebuttonUP (x,y)=(9,14)state 200 button=3
 mousebuttonUP (x,y)=(9,14)state 200 button=2

It shows state is not set on any ButtonDown event, ButtonUP works for left and 
right button but not for simulated mid button (should only be one UP event for 
button 2).

Should this behaviour be considered a bug?


--- On Thu, 14/1/10, Tadej Borovšak <[email protected]> wrote:

From: Tadej Borovšak <[email protected]>
Subject: Re: Not getting which mouse button is pressed on button-press-event
To: "Ken Resander" <[email protected]>
Cc: [email protected]
Date: Thursday, 14 January, 2010, 3:13 AM

Hello.

You can get the mouse button pressed by looking at event->button
field. 1 means left button, 2 middle button (which can usually be
emulated by pressing right and left button at once on 2-button mouse),
3 right button. I think 4-7 mean wheel movement (check API docs for
that, I'm not 100% sure).

Tadej

--
Tadej Borovšak
tadeboro.blogspot.com
[email protected]
[email protected]



      Get your preferred Email name!
Now you can @ymail.com and @rocketmail.com. 
http://mail.promotions.yahoo.com/newdomains/aa/
_______________________________________________
gtk-list mailing list
[email protected]
http://mail.gnome.org/mailman/listinfo/gtk-list

Reply via email to