This commit is contained in:
Brian Matzon 2011-04-16 21:13:27 +00:00
parent 07ffa133ad
commit 91c32952b5
1 changed files with 6 additions and 4 deletions

View File

@ -668,16 +668,18 @@ final class WindowsDisplay implements DisplayImplementation {
int size = icon.limit() / 4; int size = icon.limit() / 4;
if ( (((int)Math.sqrt(size)) == small_icon_size) && (!done_small) ) { if ( (((int)Math.sqrt(size)) == small_icon_size) && (!done_small) ) {
small_icon = createIcon(small_icon_size, small_icon_size, icon.asIntBuffer()); long small_new_icon = createIcon(small_icon_size, small_icon_size, icon.asIntBuffer());
sendMessage(hwnd, WM_SETICON, ICON_SMALL, small_icon); sendMessage(hwnd, WM_SETICON, ICON_SMALL, small_new_icon);
freeSmallIcon(); freeSmallIcon();
small_icon = small_new_icon;
used++; used++;
done_small = true; done_small = true;
} }
if ( (((int)Math.sqrt(size)) == large_icon_size) && (!done_large) ) { if ( (((int)Math.sqrt(size)) == large_icon_size) && (!done_large) ) {
large_icon = createIcon(large_icon_size, large_icon_size, icon.asIntBuffer()); long large_new_icon = createIcon(large_icon_size, large_icon_size, icon.asIntBuffer());
sendMessage(hwnd, WM_SETICON, ICON_BIG, large_icon); sendMessage(hwnd, WM_SETICON, ICON_BIG, large_new_icon);
freeLargeIcon(); freeLargeIcon();
large_icon = large_new_icon;
used++; used++;
done_large = true; done_large = true;
} }