Opened 5 months ago

Closed 5 months ago

Last modified 5 months ago

#16055 closed defect (fixed)

treectrl blocks mouse click event

Reported by: kelvin_miller Owned by:
Priority: normal Milestone:
Component: wxGTK Version: stable-latest
Keywords: wxtreectrl, wxnotebook, linux Cc:
Blocked By: Blocking:
Patch: no

Description

I have a wxnotebook object that contains a wxtreectrl object as a child (the simple compilable example is attached below).

The problem is that i cannot switch between tabs by just one mouse click if an item of the wxtreectrl object is selected. Two mouse clicks are required.

How to reproduce:
Compile the attached example. Launch the application and click on the wxtreectrl item that is named "just a test". Next, click once on the "panel 2" tab. Nothing will happen. The second click on the "panel 2" tab will do the job.

What i expect:
I expect that tabs should be switched by just one mouse click.

P.S. Debian stable, wxwidgets 3.0.0

Attachments (1)

test_treectrl.cpp download (990 bytes) - added by kelvin_miller 5 months ago.
simple compilable example

Download all attachments as: .zip

Change History (3)

Changed 5 months ago by kelvin_miller

simple compilable example

comment:1 Changed 5 months ago by VZ

  • Resolution set to fixed
  • Status changed from new to closed

(In [76093]) Skip mouse button release events in wxGenericTreeCtrl.

Not doing this prevented the default handling from taking place resulting in
internal confusion in GtkNotebook when wxTreeCtrl was placed inside it: the
code there set the button being held by user in its mouse press event handler
and reset it in its mouse release event handler which was never called because
we didn't skip the event, resulting in ignoring the next mouse press in the
notebook.

Closes #16055.

comment:2 Changed 5 months ago by VZ

(In [76094]) Skip mouse button release events in wxGenericTreeCtrl.

Not doing this prevented the default handling from taking place resulting in
internal confusion in GtkNotebook when wxTreeCtrl was placed inside it: the
code there set the button being held by user in its mouse press event handler
and reset it in its mouse release event handler which was never called because
we didn't skip the event, resulting in ignoring the next mouse press in the
notebook.

Closes #16055.

Note: See TracTickets for help on using tickets.