[PATCH v3 2/3] winex11.drv: Activate window when restoring from iconic state.

Dmitry Timoshkov dmitry at baikal.ru
Tue Jun 4 03:19:46 CDT 2019


Zhiyi Zhang <zzhang at codeweavers.com> wrote:

> @@ -1266,6 +1266,8 @@ static void handle_wm_state_notify( HWND hwnd, XPropertyEvent *event, BOOL updat
>              {
>                  TRACE( "restoring win %p/%lx\n", data->hwnd, data->whole_window );
>                  release_win_data( data );
> +                if ((style & (WS_MINIMIZE | WS_VISIBLE)) == (WS_MINIMIZE | WS_VISIBLE))
> +                    SetActiveWindow( hwnd );
>                  SendMessageW( hwnd, WM_SYSCOMMAND, SC_RESTORE, 0 );
>                  return;
>              }

Your test doesn't contain the code to check the (WS_MINIMIZE | WS_VISIBLE)
statement, I'd guess a not visible window won't receive an activation event
before window pos messages, but that should be verified with a test that calls
ShowWindow(SW_RESTORE) instead of Alt-tabbing. Also from your test it looks
like that it's the Explorer who actually activates the window before restoring
it, probably you should add similar code to programs/explorer/systray.c to
make your app work also in desktop mode.

-- 
Dmitry.



More information about the wine-devel mailing list