diff options
Diffstat (limited to 'src/Keyboard.c')
-rw-r--r-- | src/Keyboard.c | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/src/Keyboard.c b/src/Keyboard.c index 4c43b95..7697275 100644 --- a/src/Keyboard.c +++ b/src/Keyboard.c @@ -104,12 +104,12 @@ static XtServerGrabPtr CheckServerGrabs( Widget *trace, Cardinal traceDepth) { - XtServerGrabPtr grab; Cardinal i; for (i = traceDepth; i > 0; i--) { - if ((grab = _XtCheckServerGrabsOnWidget(event, trace[i-1], KEYBOARD))) + XtServerGrabPtr grab; + if ((grab = _XtCheckServerGrabsOnWidget(event, trace[i-1], KEYBOARD))) return (grab); } return (XtServerGrabPtr)0; @@ -331,7 +331,6 @@ static Widget FindKeyDestination( { XtUngrabKeyboard(devGrab->widget, event->time); - devGrabType = XtNoServerGrab; } /* * if there isn't a grab with then check @@ -395,7 +394,7 @@ Widget _XtProcessKeyboardEvent( XtPerDisplayInput pdi) { XtDevice device = &pdi->keyboard; - XtServerGrabPtr newGrab, devGrab = &device->grab; + XtServerGrabPtr devGrab = &device->grab; XtServerGrabRec prevGrabRec; XtServerGrabType prevGrabType = device->grabType; Widget dspWidget = NULL; @@ -407,6 +406,8 @@ Widget _XtProcessKeyboardEvent( { case KeyPress: { + XtServerGrabPtr newGrab; + if (event->keycode != 0 && /* Xlib XIM composed input */ !IsServerGrab(device->grabType) && (newGrab = CheckServerGrabs((XEvent*)event, @@ -574,9 +575,7 @@ void _XtHandleFocus( newFocalPoint = XtUnrelated; break; case NotifyInferior: - newFocalPoint = XtMyDescendant; return; - break; } break; } |