mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-08-25 14:59:11 +02:00
win32: simplify r51761 #d1d7473d27
git-svn-id: trunk@51762 -
This commit is contained in:
parent
d1d7473d27
commit
130402bc9f
@ -925,7 +925,6 @@ begin
|
||||
else
|
||||
if Assigned(lWinControl) and (lWinControl = Application.MainForm) then
|
||||
begin
|
||||
Win32WidgetSet.FLastMainFormState := Application.MainForm.WindowState;
|
||||
PLMsg^.Result := Windows.DefWindowProc(Window, WM_SYSCOMMAND, WParam, LParam);
|
||||
WinProcess := False;
|
||||
Application.IntfAppMinimize;
|
||||
|
@ -134,8 +134,6 @@ type
|
||||
FOnAsyncSocketMsg: TSocketEvent;
|
||||
FDotsPatternBitmap: HBitmap;
|
||||
|
||||
FLastMainFormState: TWindowState;
|
||||
|
||||
function GetDotsPatternBitmap: HBitmap;
|
||||
|
||||
{ event handler helper functions }
|
||||
|
@ -173,7 +173,6 @@ begin
|
||||
and Assigned(Application.MainForm) and Application.MainForm.HandleAllocated then
|
||||
begin
|
||||
HidePopups(Application.MainFormHandle);
|
||||
FLastMainFormState := Application.MainForm.WindowState;
|
||||
Application.MainForm.WindowState := wsMinimized;
|
||||
end
|
||||
else
|
||||
@ -199,8 +198,6 @@ end;
|
||||
Restore minimized whole application from taskbar
|
||||
------------------------------------------------------------------------------}
|
||||
procedure TWin32WidgetSet.AppRestore;
|
||||
const
|
||||
SWSHOW: array[TWindowState] of Cardinal = (SW_SHOWNORMAL, SW_SHOWMINIMIZED, SW_SHOWMAXIMIZED, SW_SHOWMAXIMIZED);
|
||||
var
|
||||
AForm: TCustomForm;
|
||||
i: Integer;
|
||||
@ -209,7 +206,7 @@ begin
|
||||
if Assigned(Application) and Application.MainFormOnTaskBar
|
||||
and Assigned(Application.MainForm) and Application.MainForm.HandleAllocated then
|
||||
begin
|
||||
ShowWindow(Application.MainForm.Handle, SWSHOW[FLastMainFormState]);
|
||||
ShowWindow(Application.MainForm.Handle, SW_RESTORE);
|
||||
RestorePopups;
|
||||
if (Screen.ActiveControl<>nil) and Screen.ActiveControl.HandleAllocated then
|
||||
SetFocus(Screen.ActiveControl.Handle);
|
||||
|
Loading…
Reference in New Issue
Block a user