Re: Not getting which mouse button is pressed on button-press-event

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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 <tadeboro@xxxxxxxxx> wrote:

From: Tadej Borovšak <tadeboro@xxxxxxxxx>
Subject: Re: Not getting which mouse button is pressed on button-press-event
To: "Ken Resander" <kresander@xxxxxxxxx>
Cc: gtk-list@xxxxxxxxx
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
tadeboro@xxxxxxxxx
tadej.borovsak@xxxxxxxxx


Get your new Email address!
Grab the Email name you've always wanted before someone else does!
_______________________________________________
gtk-list mailing list
gtk-list@xxxxxxxxx
http://mail.gnome.org/mailman/listinfo/gtk-list

[Index of Archives]     [Touch Screen Library]     [GIMP Users]     [Gnome]     [KDE]     [Yosemite News]     [Steve's Art]

  Powered by Linux