1. win32lib: mouse event
- Posted by daryl_vdb at hotmail.com Mar 24, 2003
- 382 views
I noticed win32lib seems to be missing some LeftDown mouse events when the left mouse button is clicked multiple times in quick succession. My guess is that a LeftDoubleClick event is being sent but LeftDown is being ignored. I'm using version 0.57.9. AFAIK, an older version of win32lib (I can't remember which one) didn't have this problem, and I'd like to see this fixed in the future. regards, Daryl Van Den Brink
2. Re: win32lib: mouse event
- Posted by Derek Parnell <ddparnell at bigpond.com> Mar 24, 2003
- 385 views
On Mon, 24 Mar 2003 17:04:41 +1030, <daryl_vdb at hotmail.com> wrote: > > > I noticed win32lib seems to be missing some LeftDown mouse events when > the left mouse button is clicked multiple times in quick succession. My > guess is that a LeftDoubleClick event is being sent but LeftDown is being > ignored. I'm using version 0.57.9. AFAIK, an older version of win32lib > (I can't remember which one) didn't have this problem, and I'd like to > see this fixed in the future. > Hi Daryl, I'm not so sure that earlier versions did that either. Currently the sequence of events for a left double click is ... WM_LBUTTONDOWN WM_LBUTTONUP WM_LBUTTONDBLCLK WM_LBUTTONUP Win32lib does not filter the button down event. Windows itself must be doing that. What would you like to see instead? ... WM_LBUTTONDOWN WM_LBUTTONUP WM_LBUTTONUP WM_LBUTTONDOWN WM_LBUTTONDBLCLK maybe? Though to be nice and logically consistant I suppose we should be seeing ... WM_LBUTTONDOWN WM_LBUTTONUP WM_LBUTTONCLK WM_LBUTTONDOWN WM_LBUTTONUP WM_LBUTTONDBLCLK However there is no such thing as WM_LBUTTONCLK. -- cheers, Derek Parnell
3. Re: win32lib: mouse event
- Posted by Derek Parnell <ddparnell at bigpond.com> Mar 24, 2003
- 372 views
On Mon, 24 Mar 2003 18:29:25 +1100, Derek Parnell <ddparnell at bigpond.com> wrote: [snip] > > What would you like to see instead? ... > > WM_LBUTTONDOWN > WM_LBUTTONUP > WM_LBUTTONUP > WM_LBUTTONDOWN > WM_LBUTTONDBLCLK > Whoooa! Got that messed up a bit, didn't I. I really meant to say... WM_LBUTTONDOWN WM_LBUTTONUP WM_LBUTTONDOWN WM_LBUTTONUP WM_LBUTTONDBLCLK -- cheers, Derek Parnell
4. Re: win32lib: mouse event
- Posted by daryl_vdb at hotmail.com Mar 25, 2003
- 380 views
>Though to be nice and logically consistant I suppose we should be seeing >... > WM_LBUTTONDOWN > WM_LBUTTONUP > WM_LBUTTONCLK WM_LBUTTONDOWN > WM_LBUTTONUP > WM_LBUTTONDBLCLK > >However there is no such thing as WM_LBUTTONCLK. Well, click is a seperate event anyway, so we don't need to worry about that. Sending the double click event after the mouse is released would be inconsistant with normal windows behaviour, which is typically the double click is sent when the mouse is pressed. Anyway, after thinking about this, I'm not sure that it ould be a good idea to include the second WM_LBUTTONDOWN. There would be times you want to distinguish between a normal click and a double click. If you don't, it is easy to work around by just treating all LeftDoubleClick events as LeftDown. But if a LeftDown was sent before a LeftDoubleClick, it would not be easy to tell whether this LeftDown was a double click or not. regards, Daryl Van Den Brink
5. Re: win32lib: mouse event
- Posted by Derek Parnell <ddparnell at bigpond.com> Mar 25, 2003
- 370 views
On Tue, 25 Mar 2003 11:18:41 +1030, <daryl_vdb at hotmail.com> wrote: [snip] > Well, click is a seperate event anyway, so we don't need to worry about > that. > > Sending the double click event after the mouse is released would be > inconsistant with normal windows behaviour, which is typically the double > click is sent when the mouse is pressed. > > Anyway, after thinking about this, I'm not sure that it ould be a good > idea to include the second WM_LBUTTONDOWN. There would be times you want > to distinguish between a normal click and a double click. If you don't, > it is easy to work around by just treating all LeftDoubleClick events as > LeftDown. But if a LeftDown was sent before a LeftDoubleClick, it would > not be easy to tell whether this LeftDown was a double click or not. So, in summary, win32lib does not have to change, right? -- cheers, Derek Parnell