Opened 4 years ago

Closed 4 years ago

#11611 closed defect (fixed)

wxTaskBarIcon menu item event handling at wxOSX/Carbon

Reported by: kosenko Owned by: csomor
Priority: normal Milestone:
Component: wxOSX-Carbon Version: stable-latest
Keywords: Cc:
Blocked By: Blocking:
Patch: yes

Description

Menu item event handler of wxTaskBarIcon at wxOSX/Carbon 2.9.0 is not called in taskbar sample.

It is because SetMenuItemRefCon from Carbon API saves pointer to wxMenuItemCarbonImpl type but GetMenuItemRefCon reads this pointer as wxMenuItem type.
It looks like this was broken in r55419.
This patch fixed this bug only for taskbar, other calls of SetMenuItemRefCon and GetMenuItemRefCon probably should be reviewed and fixed in the same way.

Attachments (1)

carbon_taskbar.patch download (819 bytes) - added by kosenko 4 years ago.

Download all attachments as: .zip

Change History (4)

Changed 4 years ago by kosenko

comment:1 Changed 4 years ago by csomor

  • Status changed from new to accepted

thanks for spotting this

comment:2 Changed 4 years ago by csomor

I'll fix it the other way round, I've checked all SetMenuItemRefCon calls, they usually set the wxMenuItem, so I'll adapt the impl to behave accordingly

comment:3 Changed 4 years ago by SC

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

(In [63176]) setting correct refcon in menus (was incorrectly changed to menuimpl), fixes #11611

Note: See TracTickets for help on using tickets.