diff --git a/ChangeLog b/ChangeLog index 9d92e1b..2aa759d 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2005-04-07 Fred Kiefer + + * Source/x11/XGServerWindow.m (-iconSize): Use XFree to free + xiconsize. Fixes bug #12578. + 2005-04-04 Richard Frith-Macdonald * Source/winlib/WIN32GState.m: tunr on alpha blending and swap colors diff --git a/Source/x11/XGServerWindow.m b/Source/x11/XGServerWindow.m index 3824ffa..99fcff8 100644 --- a/Source/x11/XGServerWindow.m +++ b/Source/x11/XGServerWindow.m @@ -3028,7 +3028,8 @@ _computeDepth(int class, int bpp) XIconSize *xiconsize; int count_return; int status; - + NSSize iconSize; + status = XGetIconSizes(dpy, DefaultRootWindow(dpy), &xiconsize, @@ -3039,10 +3040,19 @@ _computeDepth(int class, int bpp) { /* must add 4 pixels for the border which windowmaker leaves out but gnustep draws over. */ - return NSMakeSize(xiconsize[0].max_width + 4, - xiconsize[0].max_height + 4); + iconSize = NSMakeSize(xiconsize[0].max_width + 4, + xiconsize[0].max_height + 4); } + else + { + iconSize = NSMakeSize(xiconsize[0].max_width, + xiconsize[0].max_height); + } + + XFree(xiconsize); + return iconSize; } + return [super iconSize]; }