Right button clicks

Fabian Cenedese Cenedese at indel.ch
Wed Sep 18 05:56:28 CDT 2002

> > Does Wine support right mouse button double clicks? I have an App with
> > a dialog (in fact an overridden MFC CDialog for about infos) in which I can
> > double click with the right mouse button to show some additional info. But
> > they never show up. After +relay tracing the messages I found that only
> > WM_RBUTTONDOWN and WM_RBUTTONUP messages are generated,
> > none of them get converted into clicks or even double clicks, no matter
> > how fast I click. Does anyone have an idea?
>Hmm, strange.
>Right button double clicks should work, since Wine does
>./windows/message.c:               msg->message += (WM_LBUTTONDBLCLK - 
>a relative statement to support *all* kinds of mouse buttons with double
>However, since a right button double click is rather "rare", I'd be tempted to
>think that I'm missing some parts of the picture and Wine does indeed have
>a bug here for right buttons.
>Try using something like --debugmsg 
>to find out why a double click doesn't get generated (I assume a double
>WM_RBUTTONDOWN/UP gets generated instead of a WM_RBUTTONDBLCLK).
>Interesting files would be e.g. windows/message.c, dlls/x11drv/mouse.c,
>dlls/x11drv/event.c and maybe also windows/input.c
>Add some TRACEs there if needed, to find out why it doesn't want to do
>what you want it to do :-)

Ok, I finally came around to some more debugging. My problem has to do with
windows/message.c/process_raw_mouse_message. Here it is determined
if a new buttondown should be converted into a doubleclick. The test right
before that
if (GetClassLongA(msg->hwnd, GCL_STYLE )&CS_DBLCLKS || ht!=HTCLIENT)
fails always and therefore I never get a doubleclick on my dialog.
msg->hwnd is NULL, GetClassLongA returns 0x4800, ht is 1 (=HTCLIENT), so
both conditions fail but I don't know where the error(s) is(are) now.

Why isn't it "allowed" to doubleclick on the empty background (HTCLIENT)?

Thanks for any hints.

bye  Fabi

More information about the wine-devel mailing list