gtk2: check for max size only cursor in CreateIconIndirect

git-svn-id: trunk@15614 -
This commit is contained in:
paul 2008-06-30 03:13:49 +00:00
parent 93c931063d
commit d179d98ddb

View File

@ -277,11 +277,15 @@ begin
//DbgDumpPixmap(pixmap, '');
gdk_drawable_get_size(pixmap, @Width, @Height);
gdk_display_get_maximal_cursor_size(gdk_display_get_default,
@MaxWidth, @MaxHeight);
if (Width > integer(MaxWidth))
or (Height > integer(MaxHeight)) then Exit;
if not IconInfo^.fIcon then
begin
gdk_display_get_maximal_cursor_size(gdk_display_get_default,
@MaxWidth, @MaxHeight);
if (Width > integer(MaxWidth))
or (Height > integer(MaxHeight)) then Exit;
end;
bitmap := CreateGdkMaskBitmap(IconInfo^.hbmColor, IconInfo^.hbmMask);
try