summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorManolo Gouy <Manolo>2015-01-19 12:27:37 +0000
committerManolo Gouy <Manolo>2015-01-19 12:27:37 +0000
commitc9782669c014ba45429ddde67d844f3326cdef28 (patch)
tree74a7576c4f2b935509f6c43e6d6e440268d37df3 /src
parent365c1524c0c59f0fb66bc00ec5b899bf7d24842f (diff)
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
Diffstat (limited to 'src')
-rw-r--r--src/Fl_cocoa.mm4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/Fl_cocoa.mm b/src/Fl_cocoa.mm
index 17eaf8669..a50b8c88c 100644
--- a/src/Fl_cocoa.mm
+++ b/src/Fl_cocoa.mm
@@ -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 {