Mac OS text input: corrected minor issue when text widget is in a subwindow.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@9770 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
This commit is contained in:
parent
70ea6b8d7c
commit
4ab7e91c61
@ -2012,10 +2012,21 @@ static void q_set_window_title(NSWindow *nsw, const char * name, const char *mi
|
||||
glyphRect.origin.y = (CGFloat)y + current->textsize();
|
||||
glyphRect.size.height = current->textsize();
|
||||
} else {
|
||||
glyphRect.origin.x = focus->x();
|
||||
glyphRect.origin.y = focus->y() + focus->h();
|
||||
if (focus->as_window()) {
|
||||
glyphRect.origin.x = 0;
|
||||
glyphRect.origin.y = focus->h();
|
||||
}
|
||||
else {
|
||||
glyphRect.origin.x = focus->x();
|
||||
glyphRect.origin.y = focus->y() + focus->h();
|
||||
}
|
||||
glyphRect.size.height = 12;
|
||||
}
|
||||
Fl_Window *win = focus->window();
|
||||
while (win != NULL && win != wfocus) {
|
||||
glyphRect.origin.y += win->y();
|
||||
win = win->window();
|
||||
}
|
||||
// Convert the rect to screen coordinates
|
||||
glyphRect.origin.y = wfocus->h() - glyphRect.origin.y;
|
||||
glyphRect.origin = [[self window] convertBaseToScreen:glyphRect.origin];
|
||||
|
Loading…
Reference in New Issue
Block a user