discuss-gnustep
[Top][All Lists]
Advanced

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

Re: Windows and content frame


From: Riccardo Mottola
Subject: Re: Windows and content frame
Date: Mon, 18 Jul 2011 18:03:13 +0200
User-agent: Mozilla/5.0 (X11; U; NetBSD i386; en-US; rv:1.9.2.17) Gecko/20110601 Lightning/1.0b3pre Lanikai/3.1.10

Hi,

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

    frame = [NSWindow frameRectForContentRect:[view frame]
                      styleMask:m];
     window = [[NSWindow alloc] initWithContentRect:frame
                                 styleMask:m
                                 backing: NSBackingStoreBuffered
                defer:NO];

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.

I am not saying the code is correct, I'll look into that! The question is as you point out, why it does work on gnustep :)

Riccardo



reply via email to

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