Ignore text input methods when the focus is to an Fl_Gl_Window.

git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@10523 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
This commit is contained in:
Manolo Gouy 2015-01-19 12:27:37 +00:00
parent 365c1524c0
commit c9782669c0

View File

@ -2180,7 +2180,7 @@ static FLTextInputContext* fltextinputcontext_instance = nil;
BOOL handled;
NSUInteger mods = [theEvent modifierFlags];
Fl_Window *w = [(FLWindow*)[theEvent window] getFl_Window];
if ( (mods & NSControlKeyMask) || (mods & NSCommandKeyMask) || (w->as_gl_window() && Fl::focus() == w)) {
if ( (mods & NSControlKeyMask) || (mods & NSCommandKeyMask) ) {
NSString *s = [theEvent characters];
if ( (mods & NSShiftKeyMask) && (mods & NSCommandKeyMask) ) {
s = [s uppercaseString]; // US keyboards return lowercase letter in s if cmd-shift-key is hit
@ -2256,7 +2256,7 @@ static FLTextInputContext* fltextinputcontext_instance = nil;
Fl::first_window(window);
cocoaKeyboardHandler(theEvent);
in_key_event = YES;
if (window->as_gl_window() && Fl::focus() == window ) { // ignore text input methods for GL windows
if (Fl::focus()->as_gl_window()) { // ignore text input methods for GL windows
need_handle = YES;
[FLView prepareEtext:[theEvent characters]];
} else {