On Fri, 24 Feb 2006 14:29:45 -0600, you wrote:
Author: Francois Gouget fgouget@codeweavers.com Date: Fri Feb 24 15:34:09 2006 +0100
user32: Handle WM_ENDSESSION in DefWinProc(). DefWinProc() should call PostQuitMessage() on WM_ENDSESSION if the shutdown is proceeding.
Hi Francois,
This patch is causing a problem in Pegasus Mail. Closing some dialogs cause termination of the complete program. Here is a part of SPY++ log when run under win2000, when I close the edit new mail dialog:
|<00202> 00130A82 S ..........................WM_SYSCOMMAND uCmdType:SC_CLOSE xPos:672 yPos:121 [wParam:0000F060 lParam:007902A0] |<00203> 00130A82 S ...........................WM_CLOSE wParam:00000000 lParam:00000000 |<00204> 00130A82 S ............................WM_QUERYENDSESSION nSource:1 (End Task from Task List dialog) [wParam:00000001 lParam:00000000] |<00951> 00130A82 R ............................WM_QUERYENDSESSION fShutdownIsOk:True [lResult:00000001] ... |<00952> 00130A82 S ............................WM_ENDSESSION fEndSession:True [wParam:00000001 lParam:00000000] |<00953> 00130A82 R ............................WM_ENDSESSION lResult:00000000
The WM_QUERYENDSESSION and WM_ENDSESSION are sent by the program:
|0009:Call user32.SendMessageA(00030024,00000011,00000001,00000000) ret=0040641d
How did you check the behavior of the Windows DefWindowProc? If I put a DefWindowProc(hwnd, WM_ENDSESSION, 1, 0); some where in a windows program nothing happens, while a PostQuitMesage certainly closes the app.
Rein.
Hi,
Rein Klazes wrote: [...]
This patch is causing a problem in Pegasus Mail. Closing some dialogs cause termination of the complete program. Here is a part of SPY++ log when run under win2000, when I close the edit new mail dialog:
|<00202> 00130A82 S ..........................WM_SYSCOMMAND uCmdType:SC_CLOSE xPos:672 yPos:121 [wParam:0000F060 lParam:007902A0] |<00203> 00130A82 S ...........................WM_CLOSE wParam:00000000 lParam:00000000 |<00204> 00130A82 S ............................WM_QUERYENDSESSION nSource:1 (End Task from Task List dialog) [wParam:00000001 lParam:00000000] |<00951> 00130A82 R ............................WM_QUERYENDSESSION fShutdownIsOk:True [lResult:00000001] ... |<00952> 00130A82 S ............................WM_ENDSESSION fEndSession:True [wParam:00000001 lParam:00000000] |<00953> 00130A82 R ............................WM_ENDSESSION lResult:00000000
The WM_QUERYENDSESSION and WM_ENDSESSION are sent by the program:
|0009:Call user32.SendMessageA(00030024,00000011,00000001,00000000) ret=0040641d
It's pretty weird that the application is sending a WM_QUERYENDSESSION/WM_ENDSESSION to itself.
How did you check the behavior of the Windows DefWindowProc? If I put a DefWindowProc(hwnd, WM_ENDSESSION, 1, 0); some where in a windows program nothing happens, while a PostQuitMesage certainly closes the app.
I used a modified poppad sample app from Petzold and used Spy++ to check that a WM_ENDSESSION caused the app to exit eventhough that application's main loop did not contain any special handling for WM_ENDSESSION.
So, since the decision to exit on WM_ENDSESSION is not made in the application's main loop I placed it in the DefWindowProc. But I must have gotten some detail wrong. Unfortunately I'm away from my computer for the next week, so I can't investigate right now.
Francois Gouget wrote at 0:06 on 12 Mar 2006:
Rein Klazes wrote: [...]
This patch is causing a problem in Pegasus Mail. Closing some dialogs cause termination of the complete program.
[...]
I see that this is still a problem in 0.9.10 so I've fallen back again to 0.9.8.
Pardon intrusion by this Wine user into this technical discussion.
Is the problem with Pegasus Mail (PM) that is mentioned below something that is new with Wine 0.9.9? I know that I saw termination of "the complete program" whenever I sent a message using PM 4.31 and Wine 0.9.9. As a result I've reverted to Wine 0.9.8 and have none of this.
On Sat, 11 Mar 2006 19:23:14 -0800, you wrote:
Pardon intrusion by this Wine user into this technical discussion.
Is the problem with Pegasus Mail (PM) that is mentioned below something that is new with Wine 0.9.9? I know that I saw termination of "the complete program" whenever I sent a message using PM 4.31 and Wine 0.9.9. As a result I've reverted to Wine 0.9.8 and have none of this.
You do not even have to send the message, just closing the compose new message window is enough. Yes, it is new in 0.9.9.
Rein.