Roman Pisl : winex11: Send WM_CONTEXTMENU on WM_RBUTTONUP and NIN_SELECT on WM_LBUTTONUP.

Alexandre Julliard julliard at winehq.org
Wed Oct 12 16:06:15 CDT 2016


Module: wine
Branch: master
Commit: fb70cdb41910cae2bea946702d2dce92f9645963
URL:    http://source.winehq.org/git/wine.git/?a=commit;h=fb70cdb41910cae2bea946702d2dce92f9645963

Author: Roman Pisl <rpisl at seznam.cz>
Date:   Mon Oct 10 16:35:41 2016 +0200

winex11: Send WM_CONTEXTMENU on WM_RBUTTONUP and NIN_SELECT on WM_LBUTTONUP.

Signed-off-by: Roman Pisl <rpisl at seznam.cz>
Signed-off-by: Alexandre Julliard <julliard at winehq.org>

---

 dlls/winex11.drv/systray.c | 19 +++++++++++++++++++
 1 file changed, 19 insertions(+)

diff --git a/dlls/winex11.drv/systray.c b/dlls/winex11.drv/systray.c
index 794f2c6..fab10c6 100644
--- a/dlls/winex11.drv/systray.c
+++ b/dlls/winex11.drv/systray.c
@@ -509,6 +509,25 @@ static LRESULT WINAPI tray_icon_wndproc(HWND hwnd, UINT msg, WPARAM wparam, LPAR
             ret = PostMessageW(icon->owner, icon->callback_message, wpar,
                                oldver ? msg : MAKELPARAM(msg, icon->id));
 
+            if (ret && icon->version > 0) {
+                switch (msg) {
+                    case WM_RBUTTONUP:
+                        /* notify the owner hwnd of the message */
+                        TRACE("relaying 0x%x\n", WM_CONTEXTMENU);
+                        ret = PostMessageW(icon->owner, icon->callback_message, wpar,
+                                           oldver ? WM_CONTEXTMENU : MAKELPARAM(WM_CONTEXTMENU, icon->id));
+                        break;
+                    case WM_LBUTTONUP:
+                        /* notify the owner hwnd of the message */
+                        TRACE("relaying 0x%x\n", NIN_SELECT);
+                        ret = PostMessageW(icon->owner, icon->callback_message, wpar,
+                                           oldver ? NIN_SELECT : MAKELPARAM(NIN_SELECT, icon->id));
+                        break;
+                    default:
+                        break;
+                }
+            }
+
             if (!ret && (GetLastError() == ERROR_INVALID_WINDOW_HANDLE))
             {
                 WARN( "application window was destroyed, removing icon %u\n", icon->id );




More information about the wine-cvs mailing list