[prev in list] [next in list] [prev in thread] [next in thread] 

List:       wine-devel
Subject:    Re: [PATCH] user32: Do not call SendMessage() to show a window that is already visible.
From:       Dmitry Timoshkov <dmitry () baikal ! ru>
Date:       2017-04-30 4:38:21
Message-ID: 20170430123821.bb5491ae.dmitry () baikal ! ru
[Download RAW message or body]

Kimmo Myllyvirta <kimmo.myllyvirta@gmail.com> wrote:

> diff --git a/dlls/user32/winpos.c b/dlls/user32/winpos.c
> index c2b35ec..64fdfe0 100644
> --- a/dlls/user32/winpos.c
> +++ b/dlls/user32/winpos.c
> @@ -1239,6 +1239,9 @@ BOOL WINAPI ShowWindow( HWND hwnd, INT cmd )
>      if ((cmd == SW_HIDE) && !(GetWindowLongW( hwnd, GWL_STYLE ) & WS_VISIBLE))
>          return FALSE;
>  
> +    if ((cmd == SW_SHOW) && (GetWindowLongW( hwnd, GWL_STYLE ) & WS_VISIBLE))
> +        return TRUE;
> +
>      return SendMessageW( hwnd, WM_WINE_SHOWWINDOW, cmd, 0 );
>  }

Please have a look at the show_window() implementation and try to cover
all cases that trigger SWP_SHOWWINDOW flag passed to SetWindowPos() in
order to actually show a window. In fact it's only SW_HIDE that leads
to that, so perhaps just adding an 'else' to the SW_HIDE case is enough?

-- 
Dmitry.



[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic