[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Windows and content frame

From: Fred Kiefer
Subject: Re: Windows and content frame
Date: Mon, 18 Jul 2011 17:29:00 +0200
User-agent: Mozilla/5.0 (X11; U; Linux x86_64; de; rv: Gecko/20110616 SUSE/3.1.11 Thunderbird/3.1.11

On 18.07.2011 17:06, Riccardo Mottola wrote:

I ported GMastermind to the Mac. It generates its windows and palettes
from code which is 100% shared between the gnustep and cocoa version.




Do you see that on the mac there is a white space below the tile bar and
the window content? It is especially evident in the "Palette" window.

I fear we are doing "good" while we should not.

I tried enabling and disabling native window decorations (being
suspicious that the white space appears to be the window title bar
height) but no change.


I think the problem is in the way we create the window:

    frame = [NSWindow frameRectForContentRect:[view frame]
     window = [[NSWindow alloc] initWithContentRect:frame
                                 backing: NSBackingStoreBuffered

This adds the window border twice! In the window creation we should use [view frame] instead of frame. The frame is later used to set the min and max size of the window. We could get that value from the window itself there, which should be more accurate. The interesting question is why GNUstep displays the window as expected. Most likely the size restrictions are the reason for that.


reply via email to

[Prev in Thread] Current Thread [Next in Thread]