[Bug 52327] New: Wrong WM_CONTEXTMENU default message processing
https://bugs.winehq.org/show_bug.cgi?id=52327 Bug ID: 52327 Summary: Wrong WM_CONTEXTMENU default message processing Product: Wine-staging Version: 7.0-rc3 Hardware: x86-64 OS: Linux Status: UNCONFIRMED Severity: normal Priority: P2 Component: -unknown Assignee: wine-bugs(a)winehq.org Reporter: yal(a)csoftcom.com CC: leslie_alistair(a)hotmail.com, z.figura12(a)gmail.com Distribution: --- wine_master\dlls\user32\defwnd.c:323 wParam must point to _current_ child window hwnd when default process this message. https://docs.microsoft.com/en-us/windows/win32/menurc/wm-contextmenu case WM_CONTEXTMENU: if (GetWindowLongW( hwnd, GWL_STYLE ) & WS_CHILD) SendMessageW( GetParent(hwnd), msg, wParam, lParam );<=wParam must be this hwnd else -------------------------------------------------------------- case WM_CONTEXTMENU: if (GetWindowLongW( hwnd, GWL_STYLE ) & WS_CHILD) SendMessageW( GetParent(hwnd), msg, (WPARAM)hwnd, lParam ); else -- Do not reply to this email, post in Bugzilla using the above URL to reply. You are receiving this mail because: You are watching all bug changes.
https://bugs.winehq.org/show_bug.cgi?id=52327 YAL <yal(a)csoftcom.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Summary|Wrong WM_CONTEXTMENU |Wrong WM_CONTEXTMENU |default message processing |message default processing -- Do not reply to this email, post in Bugzilla using the above URL to reply. You are receiving this mail because: You are watching all bug changes.
https://bugs.winehq.org/show_bug.cgi?id=52327 Zebediah Figura <z.figura12(a)gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Product|Wine-staging |Wine Component|-unknown |user32 --- Comment #1 from Zebediah Figura <z.figura12(a)gmail.com> --- I don't see anything on that page to suggest that the wparam must point to an *immediate* child of the window. Do you have a test validating this assertion, or a program that relies on it? -- Do not reply to this email, post in Bugzilla using the above URL to reply. You are receiving this mail because: You are watching all bug changes.
https://bugs.winehq.org/show_bug.cgi?id=52327 --- Comment #2 from YAL <yal(a)csoftcom.com> --- Created attachment 71493 --> https://bugs.winehq.org/attachment.cgi?id=71493 Screenshort of code under debug. Ubuntu-WINE -- Do not reply to this email, post in Bugzilla using the above URL to reply. You are receiving this mail because: You are watching all bug changes.
https://bugs.winehq.org/show_bug.cgi?id=52327 --- Comment #3 from YAL <yal(a)csoftcom.com> --- Created attachment 71494 --> https://bugs.winehq.org/attachment.cgi?id=71494 Screenshot od code under debug. Windows10 -- Do not reply to this email, post in Bugzilla using the above URL to reply. You are receiving this mail because: You are watching all bug changes.
https://bugs.winehq.org/show_bug.cgi?id=52327 --- Comment #4 from YAL <yal(a)csoftcom.com> --- Software is nanoCAD CAD solution and I'm responsible for adapting it under *nix. I can write test - VS studio project? Or just exe file? I've sent to screenshots illustrated this bug - first under WINE, second under Windows. Difference in pWnd argument which in first case pointed to toplevel child (CMFCTabCtrl) and in second (right case) to nearest (CMDICliaentAreaWnd). void CMDIFrameWndEx::OnContextMenu(CWnd* pWnd, CPoint point) { if (m_wndClientArea.GetMDITabs().GetSafeHwnd() == NULL) { Default(); return; } if (CMFCPopupMenu::GetActiveMenu() != NULL) { return; } if ((GetAsyncKeyState(::GetSystemMetrics(SM_SWAPBUTTON) ? VK_RBUTTON : VK_LBUTTON) & 0x8000) != 0) // "Left" mouse button is pressed { return; } if (pWnd->GetSafeHwnd() == m_wndClientArea.GetSafeHwnd()) <=== This case not working under WINE - wrong child { CWnd* pWndCur = WindowFromPoint(point); -- Do not reply to this email, post in Bugzilla using the above URL to reply. You are receiving this mail because: You are watching all bug changes.
https://bugs.winehq.org/show_bug.cgi?id=52327 --- Comment #5 from YAL <yal(a)csoftcom.com> --- Created attachment 71500 --> https://bugs.winehq.org/attachment.cgi?id=71500 Test project and prebuild exe file. Run WindowsProject1\x64\Release\WindowsProject1.exe from zip archive and test rbutton on colored regions. Red is first child (low level) blue is last child (top level). Message box will shows wParam result. In recent Windows it always points to first child or parent. First click emulated by sending WM_RBUTTONDOWN message with middle of top level (blue area) window coordinates. -- Do not reply to this email, post in Bugzilla using the above URL to reply. You are receiving this mail because: You are watching all bug changes.
https://bugs.winehq.org/show_bug.cgi?id=52327 Huw Davies <huw.davies(a)physics.ox.ac.uk> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |huw.davies(a)physics.ox.ac.uk Status|UNCONFIRMED |NEW Ever confirmed|0 |1 --- Comment #6 from Huw Davies <huw.davies(a)physics.ox.ac.uk> --- I've sent in a fix with some tests: https://source.winehq.org/patches/data/223062 -- Do not reply to this email, post in Bugzilla using the above URL to reply. You are receiving this mail because: You are watching all bug changes.
https://bugs.winehq.org/show_bug.cgi?id=52327 Huw Davies <huw.davies(a)physics.ox.ac.uk> changed: What |Removed |Added ---------------------------------------------------------------------------- Fixed by SHA1| |3af8415ca9dc50e6c394c1001aa | |d97db5f514069 Status|NEW |RESOLVED Resolution|--- |FIXED --- Comment #7 from Huw Davies <huw.davies(a)physics.ox.ac.uk> --- Fixed with 3af8415ca9dc50e6c394c1001aad97db5f514069 -- Do not reply to this email, post in Bugzilla using the above URL to reply. You are receiving this mail because: You are watching all bug changes.
https://bugs.winehq.org/show_bug.cgi?id=52327 Alexandre Julliard <julliard(a)winehq.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|RESOLVED |CLOSED --- Comment #8 from Alexandre Julliard <julliard(a)winehq.org> --- Closing bugs fixed in 7.0-rc6. -- Do not reply to this email, post in Bugzilla using the above URL to reply. You are receiving this mail because: You are watching all bug changes.
https://bugs.winehq.org/show_bug.cgi?id=52327 Michael Stefaniuc <mstefani(a)winehq.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Target Milestone|--- |6.0.x -- Do not reply to this email, post in Bugzilla using the above URL to reply. You are receiving this mail because: You are watching all bug changes.
https://bugs.winehq.org/show_bug.cgi?id=52327 Michael Stefaniuc <mstefani(a)winehq.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Target Milestone|6.0.x |--- --- Comment #9 from Michael Stefaniuc <mstefani(a)winehq.org> --- Removing the 6.0.x milestone from bug fixes included in 6.0.4. -- Do not reply to this email, post in Bugzilla using the above URL to reply. You are receiving this mail because: You are watching all bug changes.
participants (1)
-
WineHQ Bugzilla