mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-12-16 01:40:37 +01:00
Gtk2: implemented IntfAppMinimize & IntfAppRestore. fixes #15052
git-svn-id: trunk@24168 -
This commit is contained in:
parent
b49301200d
commit
2325a1c9a2
@ -53,6 +53,9 @@ begin
|
||||
//debugln('GTKWindowStateEventCB ',DbgSName(TObject(Data)),' ',dbgs(state^.new_window_state),' ',WidgetFlagsToString(Widget));
|
||||
if ((GDK_WINDOW_STATE_ICONIFIED and state^.new_window_state)>0) then
|
||||
begin
|
||||
if (TheForm = Application.MainForm) and
|
||||
(TheForm.WindowState <> wsMinimized) then
|
||||
Application.IntfAppMinimize;
|
||||
{$IFDEF HasX}
|
||||
NetAtom := gdk_atom_intern('_NET_WM_DESKTOP', True);
|
||||
if NetAtom > 0 then begin
|
||||
@ -85,6 +88,11 @@ begin
|
||||
else
|
||||
SizeMsg.SizeType := SIZENORMAL;
|
||||
|
||||
if (TheForm = Application.MainForm) and
|
||||
(SizeMsg.SizeType <> SIZEICONIC) and
|
||||
(TheForm.WindowState = wsMinimized) then
|
||||
Application.IntfAppRestore;
|
||||
|
||||
// don't bother the LCL if nothing changed
|
||||
case SizeMsg.SizeType of
|
||||
SIZENORMAL: if TheForm.WindowState=wsNormal then exit;
|
||||
|
||||
Loading…
Reference in New Issue
Block a user