gtk2: fix issue #0014030 "Deiconifying a maximized window does not change WindowState" (based on patch of cobines)

git-svn-id: trunk@20716 -
This commit is contained in:
paul 2009-06-23 01:52:04 +00:00
parent b4efdde860
commit 449eaab03a

View File

@ -74,21 +74,22 @@ begin
end; end;
end; end;
{$ENDIF} {$ENDIF}
SizeMsg.SizeType:=SIZEICONIC; SizeMsg.SizeType := SIZEICONIC;
end end
else if (GDK_WINDOW_STATE_MAXIMIZED and state^.new_window_state)>0 then else if (GDK_WINDOW_STATE_MAXIMIZED and state^.new_window_state)>0 then
begin begin
if (state^.changed_mask and GDK_WINDOW_STATE_MAXIMIZED)=0 then Exit; // it can be both maximized + iconified and just loose iconified state
SizeMsg.SizeType:=SIZEFULLSCREEN; if (state^.changed_mask and (GDK_WINDOW_STATE_MAXIMIZED or GDK_WINDOW_STATE_ICONIFIED)) = 0 then Exit;
SizeMsg.SizeType := SIZEFULLSCREEN;
end end
else else
SizeMsg.SizeType:=SIZENORMAL; SizeMsg.SizeType := SIZENORMAL;
// don't bother the LCL if nothing changed // don't bother the LCL if nothing changed
case SizeMsg.SizeType of case SizeMsg.SizeType of
SIZENORMAL: if TheForm.WindowState=wsNormal then exit; SIZENORMAL: if TheForm.WindowState=wsNormal then exit;
SIZEICONIC: if TheForm.WindowState=wsMinimized then exit; SIZEICONIC: if TheForm.WindowState=wsMinimized then exit;
SIZEFULLSCREEN: if TheForm.WindowState=wsMaximized then exit; SIZEFULLSCREEN: if TheForm.WindowState=wsMaximized then exit;
end; end;
with SizeMsg do with SizeMsg do