gnustep-dev
[Top][All Lists]
Advanced

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

Error in [back] XGGLContext.m ???


From: Xavier Glattard
Subject: Error in [back] XGGLContext.m ???
Date: Sun, 14 Jan 2007 14:39:01 +0000 (UTC)
User-agent: Loom/3.14 (http://gmane.org/)

Hello

I'm playing with NSOpenGLView (only with code : no Gorm) and my custom GLView is
always shifted up- and rigth- ward, and it seems the amount of pixels depends on
the window decoration (ie not the same with or without NSResizableWindowMask).

I got it fixed by changing line #83 in back/Source/x11/XGGLContext.m, in
[XGXSubWindow-initWithView:]

   win_info = [XGServer _windowWithTag: [win windowNumber]];
   NSAssert(win_info, NSInternalInconsistencyException);

-   rect = [view convertRect: [view bounds] toView: nil];
+   rect = [view convertRect: [view bounds] toView: [[view window]contentView]];

I'm not sure that's the good way to fix that bug, and i'm not even sure it's
really a bug or an error in my own code...
Why is an NSOpenGLView in Gorm ok ????

As i was looking around i find a weird line #1423 in gui/Source/NSView.m, in
static NSRect convert_rect_using_matrices(...)

   for (i = 0; i < 4; i++)
     p[i] = aRect.origin;
   p[1].x += aRect.size.width;
-  p[2].y += aRect.size.height;
+  p[1].y += aRect.size.height;
   p[3].x += aRect.size.width;
   p[3].y += aRect.size.height;

A typo ? Still not sure...

Hope this could help.

Regards

xavier






reply via email to

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