wineboot: Ignore 0 result from WM_QUERYENDSESSION if target window was destroyed.
This commit is contained in:
parent
ed3ed03519
commit
a05b53894a
|
@ -100,6 +100,14 @@ static void CALLBACK end_session_message_callback( HWND hwnd, UINT msg, ULONG_PT
|
|||
msg == WM_QUERYENDSESSION ? "WM_QUERYENDSESSION" : (msg == WM_ENDSESSION ? "WM_ENDSESSION" : "Unknown"),
|
||||
hwnd, lresult );
|
||||
|
||||
/* If the window was destroyed while the message was in its queue, SendMessageCallback()
|
||||
calls us with a default 0 result. Ignore it. */
|
||||
if (!lresult && !IsWindow( hwnd ))
|
||||
{
|
||||
WINE_TRACE( "window was destroyed; ignoring FALSE lresult\n" );
|
||||
lresult = TRUE;
|
||||
}
|
||||
|
||||
/* we only care if a WM_QUERYENDSESSION response is FALSE */
|
||||
cb_data->result = cb_data->result && lresult;
|
||||
|
||||
|
|
Loading…
Reference in New Issue