This is the mail archive of the
cygwin-xfree@cygwin.com
mailing list for the Cygwin XFree86 project.
Re: XWin and the ICON on xterm window
Howdy,
At 02:36 PM 5/19/2004 +0200, Alexander Gottwald wrote:
On Wed, 19 May 2004, Angelo Graziosi (D. Zanello) wrote:
> From version 6.7-5 I have noted that starting XWin with startxwin.bat
> (.sh) produces an xterm window for which the X-Icon near its title looks
> corrupted, as if there were a double reflection/refraction.
> Also others X-Windows application (like emacs) presents this effect.
With XWin-6.7-5 there was a change in the way how Icons are loaded to fix a
problem with freeing icons twice.
@Earle: What about using LoadIcon again and duplicating the handle with
CopyIcon?
HICON tmp = LoadIcon (g_hInstance, MAKEINTRESOURCE(IDI_XWIN));
g_hiconX = CopyIcon(tmp);
I'm not sure what's being to referred to in the original problem from Angelo,
but FWIW the change back a while was getting rid of all LoadIcon() calls and
instead using LoadImage()s instead (since we support DLL icons, .ico files,
etc.). You need to use DestroyIcon() if the HANDLE is a from LoadIcon, and
just plain DestroyObject() if the HANDLE is from LoadImage or you get a
GDI leak.
Lev Bishop was talking about doing some changes to do a LoadImage() for both
large and small icon sizes, but I don't think anything became of it...
-Earle F. Philhower, III
earle@ziplabel.com
cdrlabel - ZipLabel - FlpLabel
http://www.cdrlabel.com