mirror of
https://github.com/gnustep/libs-back.git
synced 2025-04-23 16:10:52 +00:00
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:
parent
b5bde71d60
commit
24eab0870b
1 changed files with 17 additions and 1 deletions
|
@ -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);
|
||||
|
|
Loading…
Reference in a new issue