diff options
author | culler <culler> | 2020-04-20 19:18:01 (GMT) |
---|---|---|
committer | culler <culler> | 2020-04-20 19:18:01 (GMT) |
commit | 3964e6aefdbae03b25d536bac0ae2ea275b6adbb (patch) | |
tree | 7062629873d44fcca1783953bea029ca500bd831 | |
parent | 3fcc0bae6630b843931fdcf8636a4306a581739c (diff) | |
download | tk-3964e6aefdbae03b25d536bac0ae2ea275b6adbb.zip tk-3964e6aefdbae03b25d536bac0ae2ea275b6adbb.tar.gz tk-3964e6aefdbae03b25d536bac0ae2ea275b6adbb.tar.bz2 |
Fix two typos and a bug -- thanks to Christopher Chavez.
-rw-r--r-- | macosx/tkMacOSXKeyEvent.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/macosx/tkMacOSXKeyEvent.c b/macosx/tkMacOSXKeyEvent.c index ca6fe32..6d468f7 100644 --- a/macosx/tkMacOSXKeyEvent.c +++ b/macosx/tkMacOSXKeyEvent.c @@ -44,9 +44,8 @@ static void setupXEvent(XEvent *xEvent, Tk_Window tkwin, NSUInteger modifiers); TKLog(@"-[%@(%p) %s] %@", [self class], self, _cmd, theEvent); #endif NSWindow *w = [theEvent window]; - TkWindow *winPtr = TkMacOSXGetTkWindow(w); + TkWindow *winPtr = TkMacOSXGetTkWindow(w), *grabWinPtr; Tk_Window tkwin = (Tk_Window) winPtr; - TkWindow *grabWinPtr = winPtr->dispPtr->grabWinPtr; NSEventType type = [theEvent type]; NSUInteger keyCode = [theEvent keyCode]; NSUInteger modifiers = ([theEvent modifierFlags] & @@ -80,10 +79,11 @@ static void setupXEvent(XEvent *xEvent, Tk_Window tkwin, NSUInteger modifiers); /* * If a local grab is in effect, key events for windows in the * grabber's application are redirected to the grabber. Key events - * for <other applications are delivered normally. If a global + * for other applications are delivered normally. If a global * grab is in effect all key events are redirected to the grabber. */ + grabWinPtr = winPtr->dispPtr->grabWinPtr; if (grabWinPtr) { if (winPtr->dispPtr->grabFlags || /* global grab */ grabWinPtr->mainPtr == winPtr->mainPtr){ /* same application */ @@ -125,7 +125,7 @@ static void setupXEvent(XEvent *xEvent, Tk_Window tkwin, NSUInteger modifiers); has_caret = (TkFocusKeyEvent(winPtr, &xEvent) == caret_win); /* - * A KeyDown event targetting the caret window and having alphanumeric + * A KeyDown event targeting the caret window and having alphanumeric * keychar should be processed by our TextInputClient. The XEvent will not * be sent in this case. */ |