mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-12-05 17:19:18 +01:00
moved EndQuerySession and EndSession handling after calling default window proc
git-svn-id: trunk@8948 -
This commit is contained in:
parent
175cd46ccf
commit
26d140391a
@ -1640,34 +1640,6 @@ Begin
|
||||
TWin32WidgetSet(WidgetSet).UpdateThemesActive;
|
||||
end;
|
||||
|
||||
WM_ENDSESSION:
|
||||
begin
|
||||
if (Application<>nil) and (TWin32WidgetSet(WidgetSet).AppHandle=Window) and
|
||||
(WParam>0) and (LParam=0) then
|
||||
begin
|
||||
LMessage.Msg := LM_NULL; // no need to go through delivermessage
|
||||
WinProcess := false;
|
||||
Application.IntfEndSession();
|
||||
LMessage.Result := 0;
|
||||
end;
|
||||
end;
|
||||
|
||||
WM_QUERYENDSESSION:
|
||||
begin
|
||||
if (Application<>nil) and (TWin32WidgetSet(WidgetSet).AppHandle=Window) and
|
||||
(LParam=0) then
|
||||
begin
|
||||
LMessage.Msg := LM_NULL; // no need to go through delivermessage
|
||||
WinProcess := false;
|
||||
CancelEndSession := false;
|
||||
Application.IntfQueryEndSession(CancelEndSession);
|
||||
if CancelEndSession
|
||||
then LMessage.Result := 0
|
||||
else LMessage.Result := 1;
|
||||
end;
|
||||
end;
|
||||
|
||||
|
||||
{$ifdef PassWin32MessagesToLCL}
|
||||
else
|
||||
// pass along user defined messages
|
||||
@ -1763,6 +1735,31 @@ Begin
|
||||
if (WParam=BST_CHECKED) and (lWinControl is TRadioButton) then
|
||||
ClearSiblingRadioButtons(TRadioButton(lWinControl));
|
||||
end;
|
||||
WM_ENDSESSION:
|
||||
begin
|
||||
if (Application<>nil) and (TWin32WidgetSet(WidgetSet).AppHandle=Window) and
|
||||
(WParam>0) and (LParam=0) then
|
||||
begin
|
||||
LMessage.Msg := LM_NULL; // no need to go through delivermessage
|
||||
Application.IntfEndSession();
|
||||
LMessage.Result := 0;
|
||||
end;
|
||||
end;
|
||||
|
||||
WM_QUERYENDSESSION:
|
||||
begin
|
||||
if (Application<>nil) and (TWin32WidgetSet(WidgetSet).AppHandle=Window) and
|
||||
(LParam=0) then
|
||||
begin
|
||||
LMessage.Msg := LM_NULL; // no need to go through delivermessage
|
||||
CancelEndSession := LMessage.Result<>0;
|
||||
Application.IntfQueryEndSession(CancelEndSession);
|
||||
if CancelEndSession
|
||||
then LMessage.Result := 0
|
||||
else LMessage.Result := 1;
|
||||
end;
|
||||
end;
|
||||
|
||||
end;
|
||||
|
||||
// convert from win32 client to lcl client pos
|
||||
|
||||
Loading…
Reference in New Issue
Block a user