On Tue, 16 Apr 2024 05:14:08 -0700 (PDT) LIANG ZHOU wrote:
LZ> Hello,
LZ> My app runs in the background and only has a menu bar icon. For some
LZ> reason, I don't want to show the menu when right-clicking the mouse. on
LZ> macOS. both wxEVT_TASKBAR_LEFT_DOWN and wxEVT_TASKBAR_RIGHT_DOWN events are
LZ> not generated. I cannot check which mouse button is clicked in
LZ> CreatePopupMenu method. Please help!
AFAICS currently the code initializing the "status item" in
wxTaskBarIconCustomStatusItemImpl::SetIcon() always registers the same
action for both left and right clicks. It should be possible to register
different actions for them and then we could send the LEFT/RIGHT events too
(and still show the menu by default, i.e. if these events are not
processed), but this would require making changes to this code.
If you'd like to submit this as an improvement to wxOSX, please don't
hesitate to do it!
Regards,
VZ
--
TT-Solutions: wxWidgets consultancy and technical support
https://www.tt-solutions.com/