Lines Matching refs:focus
1358 if (replayDev->focus && !IsPointerEvent(event))
1752 else if (keybd->focus)
1753 oldWin = keybd->focus->win;
1757 oldWin = master_keyboard->focus->win;
1804 if (keybd->focus)
1805 focusWin = keybd->focus->win;
1812 focusWin = master_keyboard->focus->win;
2871 * For events from a non-grabbed, non-focus device, DeliverDeviceEvents is
4164 * If the event is a keyboard event, the ancestors of the focus window are
4166 * activated. If the focus window itself is reached and its descendants
4168 * are then traced down starting at the focus window, otherwise no grabs are
4191 FocusClassPtr focus =
4192 IsPointerEvent(ievent) ? NULL : device->focus;
4215 if (focus) {
4216 for (; i < focus->traceGood; i++) {
4217 pWin = focus->trace[i];
4225 if ((focus->win == NoneWin) ||
4248 * focus.
4250 * The event is delivered to the keyboard's focus window, the root window or
4251 * to the window owning the input focus.
4261 WindowPtr focus = keybd->focus->win;
4267 if (focus == FollowKeyboardWin)
4268 focus = inputInfo.keyboard->focus->win;
4269 if (!focus)
4271 if (focus == PointerRootWin) {
4275 if ((focus == window) || IsParent(focus, window)) {
4276 if (DeliverDeviceEvents(window, event, NullGrab, focus, keybd))
4280 /* just deliver it to the focus window */
4288 FixUpEventFromWindow(ptr->spriteInfo->sprite, xi2, focus, None, FALSE);
4289 deliveries = DeliverEventsToWindow(keybd, focus, xi2, 1,
4301 XaceHook(XACE_SEND_ACCESS, NULL, keybd, focus, xE, count) == Success) {
4302 FixUpEventFromWindow(ptr->spriteInfo->sprite, xE, focus, None, FALSE);
4303 deliveries = DeliverEventsToWindow(keybd, focus, xE, count,
4317 if (XaceHook(XACE_SEND_ACCESS, NULL, keybd, focus, core, count) ==
4319 FixUpEventFromWindow(keybd->spriteInfo->sprite, core, focus,
4322 DeliverEventsToWindow(keybd, focus, core, count,
4432 WindowPtr focus;
4434 /* Hack: Some pointer device have a focus class. So we need to check
4436 * the focus window. For pointer events, the answer is no.
4439 focus = PointerRootWin;
4440 else if (thisDev->focus) {
4441 focus = thisDev->focus->win;
4442 if (focus == FollowKeyboardWin)
4443 focus = inputInfo.keyboard->focus->win;
4446 focus = PointerRootWin;
4447 if (focus == PointerRootWin)
4450 else if (focus && (focus == pSprite->win ||
4451 IsParent(focus, pSprite->win)))
4452 deliveries = DeliverDeviceEvents(pSprite->win, event, grab, focus,
4454 else if (focus)
4455 deliveries = DeliverDeviceEvents(focus, event, grab, focus,
4738 WindowPtr focus;
4772 focus = (keybd) ? keybd->focus->win : None;
4773 if ((focus != NoneWin) &&
4774 ((pWin == focus) || (focus == PointerRootWin) || IsParent(focus, pWin)))
4814 WindowPtr focus;
4856 focus = (kbd) ? kbd->focus->win : None;
4857 if ((focus != NoneWin) &&
4858 ((pWin == focus) || (focus == PointerRootWin) || IsParent(focus, pWin)))
4859 event->focus = TRUE;
4891 event.u.focus.mode = mode;
4892 event.u.focus.window = pWin->drawable.id;
4914 * Set the input focus to the given window. Subsequent keyboard events will be
4922 * @param client Client that requested input focus change.
4924 * @param focusID The window to obtain the focus. Can be PointerRoot or None.
4925 * @param revertTo Specifies where the focus reverts to when window becomes
4935 FocusClassPtr focus;
4956 focusWin = keybd->focus->win;
4962 /* It is a match error to try to set the input focus to an
4971 focus = dev->focus;
4973 (CompareTimeStamps(time, focus->time) == EARLIER))
4976 if (focus->win == FollowKeyboardWin) {
4977 if (!ActivateFocusInGrab(dev, keybd->focus->win, focusWin))
4978 DoFocusEvents(dev, keybd->focus->win, focusWin, mode);
4981 if (!ActivateFocusInGrab(dev, focus->win, focusWin))
4982 DoFocusEvents(dev, focus->win, focusWin, mode);
4984 focus->time = time;
4985 focus->revert = revertTo;
4987 focus->win = FollowKeyboardWin;
4989 focus->win = focusWin;
4991 focus->traceGood = 0;
4998 if (depth > focus->traceSize) {
4999 focus->traceSize = depth + 1;
5000 focus->trace = reallocarray(focus->trace, focus->traceSize,
5003 focus->traceGood = depth;
5005 focus->trace[depth] = pWin;
5013 * Sets the input focus for the virtual core keyboard.
5024 return SetInputFocus(client, kbd, stuff->focus,
5031 * Sends the current input focus for the client's keyboard back to the
5039 FocusClassPtr focus = kbd->focus;
5053 .revertTo = focus->revert
5056 if (focus->win == NoneWin)
5057 rep.focus = None;
5058 else if (focus->win == PointerRootWin)
5059 rep.focus = PointerRoot;
5061 rep.focus = focus->win->drawable.id;
5591 WindowPtr inputFocus = (keybd) ? keybd->focus->win : NoneWin;
5596 /* If the input focus is PointerRootWin, send the event to where
5890 * Deactivate any grab that may be on the window, remove the focus.
5906 FocusClassPtr focus;
5912 input focus changes. */
5917 /* Deactivating a keyboard grab should cause focus events. */
5931 focus = keybd->focus;
5933 /* If the focus window is a root window (ie. has no parent)
5934 then don't delete the focus from it. */
5936 if ((pWin == focus->win) && (pWin->parent != NullWindow)) {
5939 /* If a grab is in progress, then alter the mode of focus events. */
5944 switch (focus->revert) {
5947 focus->win = NoneWin;
5948 focus->traceGood = 0;
5954 focus->traceGood--;
5958 focus to revert to the nearest enclosing window which
5968 focus->win = parent;
5969 focus->revert = RevertToNone;
5975 focus->win = PointerRootWin;
5976 focus->traceGood = 0;