Fix typo and oversights - Comes along with the previous changes.

git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/back/trunk@28037 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
xgl 2009-03-04 14:48:19 +00:00
parent 6acde03c4d
commit f08a621965
4 changed files with 36 additions and 8 deletions

View file

@ -1,3 +1,10 @@
2009-03-04 Xavier Glattard <xavier.glattard@online.fr>
* Source/x11/XGServerEvent.m,
* Source/x11/XGGLContext.m,
* Source/x11/XGGLFormat.m:
Fix typo and oversights - Comes along with the previous changes.
2009-03-04 Xavier Glattard <xavier.glattard@online.fr>
* Source/x11/XGGLContext.m,

View file

@ -90,7 +90,24 @@
win_info = [XGServer _windowWithTag: [window windowNumber]];
NSAssert(win_info, NSInternalInconsistencyException);
rect = [view convertRect: [view bounds] toView: nil];
if ([server handlesWindowDecorations] == YES)
{
/* The window manager handles window decorations, so the
* the parent X window is equal to the content view and
* we must therefore use content view coordinates.
*/
rect = [view convertRect: [view bounds]
toView: [window contentView]];
}
else
{
/* The GUI library handles window decorations, so the
* the parent X window is equal to the NSWindow frame
* and we can use window base coordinates.
*/
rect = [view convertRect: [view bounds] toView: nil];
}
x = NSMinX(rect);
y = NSHeight(win_info->xframe) - NSMaxY(rect);
width = NSWidth(rect);

View file

@ -67,7 +67,10 @@
}
else
{
glXGetConfig(dpy, configurations.visualinfo, attrib, vals);
error = glXGetConfig(dpy, configurations.visualinfo, attrib, vals);
if ( error != 0 )
NSDebugMLLog( @"GLX", @"Can not get FB attribute for pixel format %@ - Errror %u",
self, error );
if ( error != 0 )
NSDebugMLLog( @"GLX", @"Can not get FB attribute for pixel format %@ - Errror %u",
self, error );
@ -175,12 +178,13 @@
break;
}
break;
case NSOpenGLPFAWindow:
drawable_type |= GLX_WINDOW_BIT;
break;
case NSOpenGLPFAPixelBuffer:
ptr++;
drawable_type |= GLX_PBUFFER_BIT;
break;
case NSOpenGLPFAOffScreen:
ptr++;
drawable_type |= GLX_PIXMAP_BIT;
break;
@ -202,7 +206,6 @@
case NSOpenGLPFARobust:
case NSOpenGLPFABackingStore:
case NSOpenGLPFAMPSafe:
case NSOpenGLPFAWindow:
case NSOpenGLPFAMultiScreen:
case NSOpenGLPFACompliant:
case NSOpenGLPFAScreenMask:
@ -220,8 +223,9 @@
if ( drawable_type )
{
//append(GLX_DRAWABLE_TYPE,drawable_type);
append(GLX_DRAWABLE_TYPE,drawable_type);
}
append1(None);
//FIXME, what screen number ?

View file

@ -979,7 +979,7 @@ static int check_modifier (XEvent *xEvent, KeySym key_sym)
generic.cachedWindow
= [XGServer _windowForXWindow:xw];
}
if ( xw == xEvent.xexpose.window )
if ( xw != xEvent.xexpose.window )
{
isSubWindow = YES;
}
@ -989,7 +989,7 @@ static int check_modifier (XEvent *xEvent, KeySym key_sym)
{
XRectangle rectangle;
if ( isSubWindow )
if ( !isSubWindow )
{
rectangle.x = xEvent.xexpose.x;
rectangle.y = xEvent.xexpose.y;