[PATCH resend 3/3] winemac.drv: Only send WM_CANCELMODE if a menu is active.

Ken Thomases ken at codeweavers.com
Wed Mar 4 11:31:00 CST 2020


Hi Rémi,

On Mar 4, 2020, at 8:53 AM, Rémi Bernon <rbernon at codeweavers.com> wrote:
> 
> Signed-off-by: Rémi Bernon <rbernon at codeweavers.com>
> ---
> dlls/winemac.drv/window.c | 7 ++++++-
> 1 file changed, 6 insertions(+), 1 deletion(-)
> 
> diff --git a/dlls/winemac.drv/window.c b/dlls/winemac.drv/window.c
> index 605c0c87f16..8091f5249fe 100644
> --- a/dlls/winemac.drv/window.c
> +++ b/dlls/winemac.drv/window.c
> @@ -2368,13 +2368,18 @@ void macdrv_window_got_focus(HWND hwnd, const macdrv_event *event)
>  */
> void macdrv_window_lost_focus(HWND hwnd, const macdrv_event *event)
> {
> +    GUITHREADINFO threadinfo;

Please add a blank line between variable declarations and code.

>     if (!hwnd) return;
> 
>     TRACE("win %p/%p fg %p\n", hwnd, event->window, GetForegroundWindow());
> 
>     if (hwnd == GetForegroundWindow())
>     {
> -        SendMessageW(hwnd, WM_CANCELMODE, 0, 0);
> +        threadinfo.cbSize = sizeof(threadinfo);
> +        GetGUIThreadInfo(0, &threadinfo);
> +        if (threadinfo.flags & (GUI_INMENUMODE|GUI_INMOVESIZE|GUI_POPUPMENUMODE|GUI_SYSTEMMENUMODE))

Please put spaces around each "|" operator.

Thanks,
Ken




More information about the wine-devel mailing list