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:
Xavier Glattard 2009-03-04 14:48:19 +00:00
parent 7e3dbdf741
commit 08a079606a
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> 2009-03-04 Xavier Glattard <xavier.glattard@online.fr>
* Source/x11/XGGLContext.m, * Source/x11/XGGLContext.m,

View file

@ -90,7 +90,24 @@
win_info = [XGServer _windowWithTag: [window windowNumber]]; win_info = [XGServer _windowWithTag: [window windowNumber]];
NSAssert(win_info, NSInternalInconsistencyException); 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); x = NSMinX(rect);
y = NSHeight(win_info->xframe) - NSMaxY(rect); y = NSHeight(win_info->xframe) - NSMaxY(rect);
width = NSWidth(rect); width = NSWidth(rect);

View file

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

View file

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