X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/99d800190a04a2deaf769017a5fae04a4ae50378..fc9361e3ec5b81a7e8c32d93a03aea0b2cd3e045:/include/wx/taskbar.h diff --git a/include/wx/taskbar.h b/include/wx/taskbar.h index 1992d92eb9..ab10e8b5fe 100644 --- a/include/wx/taskbar.h +++ b/include/wx/taskbar.h @@ -14,11 +14,11 @@ #include "wx/defs.h" -#ifdef wxHAS_TASK_BAR_ICON +#if wxUSE_TASKBARICON #include "wx/event.h" -class WXDLLIMPEXP_ADV wxTaskBarIconEvent; +class WXDLLIMPEXP_FWD_ADV wxTaskBarIconEvent; // ---------------------------------------------------------------------------- // wxTaskBarIconBase: define wxTaskBarIcon interface @@ -109,8 +109,16 @@ END_DECLARE_EVENT_TYPES() #define EVT_TASKBAR_LEFT_DCLICK(fn) wx__DECLARE_TASKBAREVT(LEFT_DCLICK, fn) #define EVT_TASKBAR_RIGHT_DCLICK(fn) wx__DECLARE_TASKBAREVT(RIGHT_DCLICK, fn) +// taskbar menu is shown on right button press under all platforms except MSW +// where it's shown on right button release, using this event type and macro +// allows to write code which works correctly on all platforms +#ifdef __WXMSW__ + #define wxEVT_TASKBAR_CLICK wxEVT_TASKBAR_RIGHT_UP +#else + #define wxEVT_TASKBAR_CLICK wxEVT_TASKBAR_RIGHT_DOWN #endif - // wxHAS_TASK_BAR_ICON +#define EVT_TASKBAR_CLICK(fn) wx__DECLARE_TASKBAREVT(CLICK, fn) -#endif - // _WX_TASKBAR_H_BASE_ +#endif // wxUSE_TASKBARICON + +#endif // _WX_TASKBAR_H_BASE_