bug-gnustep
[Top][All Lists]
Advanced

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

[bug #17377] Various frame related methods in NSWindow return wrong resu


From: Quentin Mathé
Subject: [bug #17377] Various frame related methods in NSWindow return wrong results
Date: Tue, 8 Aug 2006 21:41:38 +0000
User-agent: Mozilla/5.0 (Macintosh; U; PPC Mac OS X; fr) AppleWebKit/418.8 (KHTML, like Gecko) Safari/419.3

URL:
  <http://savannah.gnu.org/bugs/?func=detailitem&item_id=17377>

                 Summary: Various frame related methods in NSWindow return
wrong results
                 Project: GNUstep
            Submitted by: qmathe
            Submitted on: mardi 08.08.2006 à 21:41
                Category: Gui/AppKit
                Severity: 3 - Normal
              Item Group: Bug
                  Status: None
                 Privacy: Public
             Assigned to: None
             Open/Closed: Open

    _______________________________________________________

Details:

Fresh GNUstep core install from today svn repository on Linux x86 Ubuntu.

Hi,

I have discovered the following methods
+frameRectForContentRect:styleMask:
+contentRectForFrameRect:styleMask:
return bogus results with NSWindowTitledMask at least.

I built a test application (in attachment) to show the issues. I think there
are related to several bugs in frame handling. The first one follows from the
fact [[window contentView] frame] should probably return a rect with the
origin equal to zero (this is Cocoa behavior). The second one is surely
related to wrong frame computations and/or wrongly implemented methods in
GSWindowDecorationView.m GSStandardWindowDecorationView.m.

Below are the results of my test application on both GNUstep (with and
without backend decorations) and Cocoa…

Output with GNUstep and GSX11HandlesWindowDecorations=NO:

2006-08-08 20:14:35.809 TestWindowFrame[32679] Window frame {x = 221; y =
488; width = 602; height = 432}
2006-08-08 20:14:35.809 TestWindowFrame[32679] Window content rect {x = 1; y
= 9; width = 600; height = 400}
2006-08-08 20:14:35.810 TestWindowFrame[32679] +frameRectForContentRect:
result is {x = 0; y = 8; width = 602; height = 424}
2006-08-08 20:14:35.810 TestWindowFrame[32679] +contentRectForFrameRect:
result is {x = 222; y = 489; width = 600; height = 408}
2006-08-08 20:14:36.517 TestWindowFrame[32679] File NSView.m: 413. In
[GSStandardWindowDecorationView -initWithFrame:] given negative width
2006-08-08 20:14:36.517 TestWindowFrame[32679] File NSView.m: 418. In
[GSStandardWindowDecorationView -initWithFrame:] given negative height
2006-08-08 20:14:36.517 TestWindowFrame[32679] File NSView.m: 413. In [NSView
-initWithFrame:] given negative width
2006-08-08 20:14:36.518 TestWindowFrame[32679] File NSView.m: 418. In [NSView
-initWithFrame:] given negative height
2006-08-08 20:14:36.518 TestWindowFrame[32679] File NSView.m: 1018. In
[NSView -setFrame:] given negative width
2006-08-08 20:14:36.518 TestWindowFrame[32679] File NSView.m: 1023. In
[NSView -setFrame:] given negative height
2006-08-08 20:14:36.520 TestWindowFrame[32679] File NSView.m: 1018. In
[GSStandardWindowDecorationView -setFrame:] given negative width
2006-08-08 20:14:36.520 TestWindowFrame[32679] File NSView.m: 1023. In
[GSStandardWindowDecorationView -setFrame:] given negative height

Output with GNUstep and GSX11HandlesWindowDecorations=YES:

2006-08-08 20:32:46.816 TestWindowFrame[760] Window frame {x = 221; y = 520;
width = 600; height = 400}
2006-08-08 20:32:46.817 TestWindowFrame[760] Window content rect {x = 0; y =
0; width = 600; height = 400}
2006-08-08 20:32:46.817 TestWindowFrame[760] +frameRectForContentRect: result
is {x = 0; y = 0; width = 600; height = 400 }
2006-08-08 20:32:46.817 TestWindowFrame[760] +contentRectForFrameRect: result
is {x = 221; y = 520; width = 600; height =  400}

Output with Cocoa (the nib file is different then size and origin of the
window too):

2006-08-08 20:27:24.875 TestWindowFrame[10060] Window frame {{220, 433},
{480, 382}}
2006-08-08 20:27:24.876 TestWindowFrame[10060] Window content rect {{0, 0},
{480, 360}}
2006-08-08 20:27:24.877 TestWindowFrame[10060] +frameRectForContentRect:
result is {{0, 0}, {480, 382}}
2006-08-08 20:27:24.877 TestWindowFrame[10060] +contentRectForFrameRect:
result is {{220, 433}, {480, 360}}

Quentin.





    _______________________________________________________

File Attachments:


-------------------------------------------------------
Date: mardi 08.08.2006 à 21:41  Name: TestWindowFrame.tar  Size: 30Ko   By:
qmathe

<http://savannah.gnu.org/bugs/download.php?file_id=10492>

    _______________________________________________________

Reply to this item at:

  <http://savannah.gnu.org/bugs/?func=detailitem&item_id=17377>

_______________________________________________
  Message posté via/par Savannah
  http://savannah.gnu.org/





reply via email to

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