From f3fe1bceb8d092bbf55ebea6fbea2eabbb1fd27e Mon Sep 17 00:00:00 2001 From: mattias Date: Wed, 24 Oct 2012 13:14:48 +0000 Subject: [PATCH] gtk2: increased SetWidgetSizeAndPosition limit to 32000 git-svn-id: trunk@39159 - --- lcl/interfaces/gtk2/gtk2proc.inc | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/lcl/interfaces/gtk2/gtk2proc.inc b/lcl/interfaces/gtk2/gtk2proc.inc index 16ab5c9534..17ab0ee480 100644 --- a/lcl/interfaces/gtk2/gtk2proc.inc +++ b/lcl/interfaces/gtk2/gtk2proc.inc @@ -6697,6 +6697,8 @@ var ''); end; +const + MaxSize = 32000; // some limit to spot endless loops and bad values begin {$IFDEF VerboseSizeMsg} DebugLn(['SetWidgetSizeAndPosition ',DbgSName(LCLControl)]); @@ -6736,13 +6738,13 @@ begin LCLHeight := LCLControl.Height; if LCLHeight <= 0 then LCLHeight := 1; - if (LCLWidth > 10000) or (LCLHeight > 10000) then + if (LCLWidth > MaxSize) or (LCLHeight > MaxSize) then begin WriteBigWarning; - if LCLWidth > 10000 then - LCLWidth := 10000; - if LCLHeight > 10000 then - LCLHeight := 10000; + if LCLWidth > MaxSize then + LCLWidth := MaxSize; + if LCLHeight > MaxSize then + LCLHeight := MaxSize; end; {$IFDEF VerboseSizeMsg}