bug-gnustep
[Top][All Lists]
Advanced

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

Re: Jumpy "Windows" menu


From: Willem Rein Oudshoorn
Subject: Re: Jumpy "Windows" menu
Date: 15 Mar 2003 17:20:26 +0100
User-agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.2

Michael Hanni <mhanni@yahoo.com> writes:

> Hi,
> 
> Steps to reproduce the Jumpy Windows Menu (as seen on Law and Order):
> 
> #1 Fire up GSTest.app
> #2 Tear off the windows menu, stick it somewhere you can see it.
> #3 start opening up windows from the Tests window.
> 
> The "Windows" menu is resized in a funny way: first, the contentsize changes 
> so
> the window expands upwards with the origin holding steady;

Yes, I noticed.  But I wonder, is this a bug in NSWindow? 
I would expect that changing the window size would leave the upper
left corner in place.  So how does this behave on OpenStep MacOSX?

> and second, the
> frame origin is modified and shifts the larger window down.
> 
> Possible solution:
> 
> In NSMenu.m, sizeToFit: make this modification (I'd send a patch, but the
> blasted CVS server is not responding.)
> 
>   windowFrame = [_aWindow frame];
>   [_aWindow setFrame: NSMakeRect(NSMinX(windowFrame),
>                                  (NSMaxY(windowFrame) - size.height),
>                                  size.width,
>                                  size.height)
>              display: NO];

Hm, this is almost OK, but there is a difference between setting the
frame.size of a window and setting the contentSize.  
When setting the contentSize the window will account for the window 
decoration, when setting the frame it does not.


I propose that we change the NSWindow setContentSize method
to extend the window down/right wards instead of up/right wards.


Wim Oudshoorn.







reply via email to

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