incubator-ooo-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bugzi...@apache.org
Subject [Bug 119947] [Windows 8 certification]Windows App Certification Kit - Test for "Section 4 Apps must adhere to system restart manager messages" is failed
Date Thu, 28 Jun 2012 07:58:45 GMT
https://issues.apache.org/ooo/show_bug.cgi?id=119947

--- Comment #1 from DaLi Liu <wawalovo@gmail.com> ---
It seems that we handle these system restart manager messages in a right way.
Anyone can have a double check on this?
Here is the codes in main\vcl\win\source\window\salframe.cxx.
......
LRESULT CALLBACK SalFrameWndProc( HWND hWnd, UINT nMsg, WPARAM wParam, LPARAM
lParam, int& rDef )
{
......
 case WM_QUERYENDSESSION:
            if( !bInQueryEnd )
            {
                // handle queryendsession only once
                bInQueryEnd = TRUE;
                nRet = !ImplHandleShutDownMsg( hWnd );
                rDef = FALSE;

                // Issue #16314#: ImplHandleShutDownMsg causes a PostMessage in
case of allowing shutdown.
                // This posted message was never processed and cause Windows XP
to hang after log off
                // if there are multiple sessions and the current session
wasn't the first one started.
                // So if shutdown is allowed we assume that a post message was
done and retrieve all
                // messages in the message queue and dispatch them before we
return control to the system.

                if ( nRet )
                {
                    MSG    msg;

                    while( PeekMessage( &msg, NULL, 0, 0, PM_REMOVE ) )
                    {
                        DispatchMessage( &msg );
                    }
                }
            }
            else
            {
                ImplSalYieldMutexAcquireWithWait();
                ImplSalYieldMutexRelease();
                rDef = TRUE;
            }
            break;

        case WM_ENDSESSION:
            if( !wParam )
                bInQueryEnd = FALSE; // no shutdown: allow query again
            nRet = FALSE;
            rDef = FALSE;
            break;
......

-- 
You are receiving this mail because:
You are the assignee for the bug.

Mime
View raw message