Minor mouse event DClick discrepancy OSX vs. GTK+ (and I think MSW)

12 views
Skip to first unread message

Robert Roebling

unread,
Oct 15, 2025, 4:04:59 PM (2 days ago) Oct 15
to wx-...@googlegroups.com
Hi all,

I was just testing the wxTreeCtrl on OSX and realized that there is a
difference in the sequence of wxMouseEvents when double and more than
double clicking. If you continuously quickly press the left or only
mouse button, it will generate in wxGTK:
LDOWN
DCLICK
LDOWN
DCLICK
LDOWN
DCLICK
but in wxMAC it will generate:
LDOWN
DCLICK
DCLICK
DCLICK
I am quite sure it will generate events on wxMSW like on wxGTK, but I
didn't test that. I think they should all behave the same way.

Robert

Vadim Zeitlin

unread,
Oct 15, 2025, 4:35:20 PM (2 days ago) Oct 15
to wx-...@googlegroups.com
On Wed, 15 Oct 2025 22:04:43 +0200 'Robert Roebling' via wx-dev wrote:

RR> I was just testing the wxTreeCtrl on OSX and realized that there is a
RR> difference in the sequence of wxMouseEvents when double and more than
RR> double clicking. If you continuously quickly press the left or only
RR> mouse button, it will generate in wxGTK:
RR> LDOWN
RR> DCLICK
RR> LDOWN
RR> DCLICK
RR> LDOWN
RR> DCLICK
RR> but in wxMAC it will generate:
RR> LDOWN
RR> DCLICK
RR> DCLICK
RR> DCLICK
RR> I am quite sure it will generate events on wxMSW like on wxGTK, but I
RR> didn't test that. I think they should all behave the same way.

I agree with this, of course. It looks like we just need to generate our
own LDOWN event before any non-first DCLICK, if macOS itself doesn't do it.

Did you test this in some sample? I'd like to check that it behaves like
this under wxMSW too (although, like you, I'm almost sure it does), but I
don't immediately see if there is already a sample where this could be
seen.

Thanks,
VZ
Reply all
Reply to author
Forward
0 new messages