Re: Not getting which mouse button is pressed on button-press-event
- From: Ken Resander <kresander yahoo com>
- To: gtk-list gnome org
- Subject: Re: Not getting which mouse button is pressed on button-press-event
- Date: Thu, 14 Jan 2010 00:09:12 -0800 (PST)
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 gmail com> wrote:
From: Tadej Borovšak <tadeboro gmail com> Subject: Re: Not getting which mouse button is pressed on button-press-event To: "Ken Resander" <kresander yahoo com> Cc: gtk-list gnome org 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 gmail comtadej borovsak gmail com
|
Get your new Email address!
Grab the Email name you've always wanted before someone else does!
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]