added EVT_TASKBAR_CLICK and use it to show taskbar icon menu on right button release, not press, under MSW (bug 1623761)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@44138 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -103,6 +103,7 @@ All:
|
|||||||
wxMSW:
|
wxMSW:
|
||||||
|
|
||||||
- Fixed compilation with Borland C++ in Unicode mode but without MSLU
|
- Fixed compilation with Borland C++ in Unicode mode but without MSLU
|
||||||
|
- Show taskbar icon menu on right button release, not press
|
||||||
|
|
||||||
wxGTK:
|
wxGTK:
|
||||||
|
|
||||||
|
@@ -51,6 +51,10 @@ wxEVT\_TASKBAR\_RIGHT\_UP event.}
|
|||||||
wxEVT\_TASKBAR\_LEFT\_DCLICK event.}
|
wxEVT\_TASKBAR\_LEFT\_DCLICK event.}
|
||||||
\twocolitem{{\bf EVT\_TASKBAR\_RIGHT\_DCLICK(func)}}{Process a
|
\twocolitem{{\bf EVT\_TASKBAR\_RIGHT\_DCLICK(func)}}{Process a
|
||||||
wxEVT\_TASKBAR\_RIGHT\_DCLICK event.}
|
wxEVT\_TASKBAR\_RIGHT\_DCLICK event.}
|
||||||
|
\twocolitem{{\bf EVT\_TASKBAR\_CLICK(func)}}{This is a synonym for either
|
||||||
|
EVT\_TASKBAR\_RIGHT\_DOWN or UP depending on the platform, use this event macro
|
||||||
|
to catch the event which should result in the menu being displayed on the
|
||||||
|
current platform.}
|
||||||
\end{twocollist}%
|
\end{twocollist}%
|
||||||
|
|
||||||
\latexignore{\rtfignore{\wxheading{Members}}}
|
\latexignore{\rtfignore{\wxheading{Members}}}
|
||||||
|
@@ -109,8 +109,16 @@ END_DECLARE_EVENT_TYPES()
|
|||||||
#define EVT_TASKBAR_LEFT_DCLICK(fn) wx__DECLARE_TASKBAREVT(LEFT_DCLICK, fn)
|
#define EVT_TASKBAR_LEFT_DCLICK(fn) wx__DECLARE_TASKBAREVT(LEFT_DCLICK, fn)
|
||||||
#define EVT_TASKBAR_RIGHT_DCLICK(fn) wx__DECLARE_TASKBAREVT(RIGHT_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
|
#endif
|
||||||
// wxHAS_TASK_BAR_ICON
|
#define EVT_TASKBAR_CLICK(fn) wx__DECLARE_TASKBAREVT(CLICK, fn)
|
||||||
|
|
||||||
#endif
|
#endif // wxHAS_TASK_BAR_ICON
|
||||||
// _WX_TASKBAR_H_BASE_
|
|
||||||
|
#endif // _WX_TASKBAR_H_BASE_
|
||||||
|
@@ -38,7 +38,7 @@ DEFINE_EVENT_TYPE( wxEVT_TASKBAR_RIGHT_DCLICK )
|
|||||||
|
|
||||||
|
|
||||||
BEGIN_EVENT_TABLE(wxTaskBarIconBase, wxEvtHandler)
|
BEGIN_EVENT_TABLE(wxTaskBarIconBase, wxEvtHandler)
|
||||||
EVT_TASKBAR_RIGHT_DOWN(wxTaskBarIconBase::OnRightButtonDown)
|
EVT_TASKBAR_CLICK(wxTaskBarIconBase::OnRightButtonDown)
|
||||||
END_EVENT_TABLE()
|
END_EVENT_TABLE()
|
||||||
|
|
||||||
void wxTaskBarIconBase::OnRightButtonDown(wxTaskBarIconEvent& WXUNUSED(event))
|
void wxTaskBarIconBase::OnRightButtonDown(wxTaskBarIconEvent& WXUNUSED(event))
|
||||||
|
Reference in New Issue
Block a user