Gtk2: implemented IntfAppMinimize & IntfAppRestore. fixes #15052

git-svn-id: trunk@24168 -
This commit is contained in:
zeljko 2010-03-22 11:28:25 +00:00
parent b49301200d
commit 2325a1c9a2

View File

@ -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;