Fix coordinate conversion missed in last change.

git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/back/trunk@24350 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
rfm 2007-01-14 18:26:14 +00:00
parent b5bde71d60
commit 24eab0870b

View file

@ -167,7 +167,23 @@
win_info = [XGServer _windowWithTag: [win windowNumber]];
NSAssert(win_info, NSInternalInconsistencyException);
rect = [attached convertRect: [attached 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 = [attached convertRect: [attached bounds]
toView: [[attached 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 = [attached convertRect: [attached bounds] toView: nil];
}
x = NSMinX(rect);
y = NSHeight(win_info->xframe) - NSMaxY(rect);