Lines Matching defs:pSprite
526 SpritePtr pSprite = pDev->spriteInfo->sprite;
532 pScreen = pSprite->screen;
547 pSprite->screen = pScreen;
548 pSprite->hotPhys.x = x - screenInfo.screens[0]->x;
549 pSprite->hotPhys.y = y - screenInfo.screens[0]->y;
559 SpritePtr pSprite = pDev->spriteInfo->sprite;
563 pScreen = pSprite->screen;
564 newBox = pSprite->physLimits;
579 SpritePtr pSprite = pDev->spriteInfo->sprite;
585 pSprite->windows[i] = screenInfo.screens[i]->root;
597 rc = dixLookupWindow(pSprite->windows + i, win->info[i].id,
610 SpritePtr pSprite = pDev->spriteInfo->sprite;
621 RegionCopy(&pSprite->Reg1, &pSprite->windows[i]->borderSize);
630 RegionTranslate(&pSprite->Reg1, x, y);
632 RegionUnion(&pSprite->Reg1, &pSprite->Reg1,
633 &pSprite->windows[i]->borderSize);
639 pSprite->hotLimits = *RegionExtents(&pSprite->Reg1);
641 if (RegionNumRects(&pSprite->Reg1) > 1)
642 pSprite->hotShape = &pSprite->Reg1;
644 pSprite->hotShape = NullRegion;
646 pSprite->confined = FALSE;
647 pSprite->confineWin =
650 CheckPhysLimits(pDev, pSprite->current, generateEvents, FALSE, NULL);
724 SpritePtr pSprite = pDev->spriteInfo->sprite;
728 new = pSprite->hotPhys;
732 pSprite->physLimits = pSprite->hotLimits;
740 (*pScreen->CursorLimits) (pDev, pScreen, cursor, &pSprite->hotLimits,
741 &pSprite->physLimits);
742 pSprite->confined = confineToScreen;
743 (*pScreen->ConstrainCursor) (pDev, pScreen, &pSprite->physLimits);
747 if (new.x < pSprite->physLimits.x1)
748 new.x = pSprite->physLimits.x1;
749 else if (new.x >= pSprite->physLimits.x2)
750 new.x = pSprite->physLimits.x2 - 1;
751 if (new.y < pSprite->physLimits.y1)
752 new.y = pSprite->physLimits.y1;
753 else if (new.y >= pSprite->physLimits.y2)
754 new.y = pSprite->physLimits.y2 - 1;
755 if (pSprite->hotShape)
756 ConfineToShape(pDev, pSprite->hotShape, &new.x, &new.y);
761 (pScreen != pSprite->hotPhys.pScreen)) ||
762 (new.x != pSprite->hotPhys.x) || (new.y != pSprite->hotPhys.y)) {
769 if (pScreen != pSprite->hotPhys.pScreen)
770 pSprite->hotPhys = new;
788 SpritePtr pSprite = pDev->spriteInfo->sprite;
802 pSprite->hot.pScreen = qe->pScreen;
803 pSprite->hot.x = ev->root_x;
804 pSprite->hot.y = ev->root_y;
825 RegionCopy(&pSprite->Reg2, &pSprite->windows[i]->borderSize);
834 RegionTranslate(&pSprite->Reg2, x, y);
836 RegionUnion(&pSprite->Reg2, &pSprite->Reg2,
837 &pSprite->windows[i]->borderSize);
846 if (pSprite->hot.pScreen != pWin->drawable.pScreen) {
847 pSprite->hot.pScreen = pWin->drawable.pScreen;
848 pSprite->hot.x = pSprite->hot.y = 0;
853 if (pSprite->hot.x < lims.x1)
854 pSprite->hot.x = lims.x1;
855 else if (pSprite->hot.x >= lims.x2)
856 pSprite->hot.x = lims.x2 - 1;
857 if (pSprite->hot.y < lims.y1)
858 pSprite->hot.y = lims.y1;
859 else if (pSprite->hot.y >= lims.y2)
860 pSprite->hot.y = lims.y2 - 1;
864 if (RegionNumRects(&pSprite->Reg2) > 1)
865 reg = &pSprite->Reg2;
876 ConfineToShape(pDev, reg, &pSprite->hot.x, &pSprite->hot.y);
879 qe->pScreen = pSprite->hot.pScreen;
880 ev->root_x = pSprite->hot.x;
881 ev->root_y = pSprite->hot.y;
887 RootWindow(pDev->spriteInfo->sprite) = pSprite->hot.pScreen->root;
894 SpritePtr pSprite = pDev->spriteInfo->sprite;
898 SyntheticMotion(pDev, pSprite->hot.x, pSprite->hot.y);
909 pSprite->hotLimits = *RegionExtents(&pWin->borderSize);
910 pSprite->hotShape = wBoundingShape(pWin) ? &pWin->borderSize
912 CheckPhysLimits(pDev, pSprite->current, generateEvents,
936 SpritePtr pSprite = pDev->spriteInfo->sprite;
939 if (cursor != pSprite->current) {
940 if ((pSprite->current->bits->xhot != cursor->bits->xhot) ||
941 (pSprite->current->bits->yhot != cursor->bits->yhot))
942 CheckPhysLimits(pDev, cursor, FALSE, pSprite->confined,
947 pScreen = pSprite->screen;
950 pScreen = pSprite->hotPhys.pScreen;
953 FreeCursor(pSprite->current, (Cursor) 0);
954 pSprite->current = RefCursor(cursor);
980 SpritePtr pSprite = pDev->spriteInfo->sprite;
990 if (IsParent(grab->window, pSprite->win))
991 win = pSprite->win;
996 win = pSprite->win;
1044 SpritePtr pSprite = pDev->spriteInfo->sprite;
1046 *px = pSprite->hotPhys.x;
1047 *py = pSprite->hotPhys.y;
1150 SpritePtr pSprite = device->spriteInfo->sprite;
1177 ev->device_event.root = pSprite->hotPhys.pScreen->root->drawable.id;
1187 event->root_x += pSprite->screen->x - screenInfo.screens[0]->x;
1188 event->root_y += pSprite->screen->y - screenInfo.screens[0]->y;
1191 pSprite->hotPhys.x = event->root_x;
1192 pSprite->hotPhys.y = event->root_y;
1197 (tail->pScreen == pSprite->hotPhys.pScreen)) {
1200 tailev->root_x = pSprite->hotPhys.x;
1201 tailev->root_y = pSprite->hotPhys.y;
1215 qe->pScreen = pSprite->hotPhys.pScreen;
2595 FindChildForEvent(SpritePtr pSprite, WindowPtr event)
2597 WindowPtr w = DeepestSpriteWin(pSprite);
2623 FixUpXI2DeviceEventFromWindow(SpritePtr pSprite, int evtype,
2626 event->root = RootWindow(pSprite)->drawable.id;
2634 if (pSprite->hot.pScreen == pWin->drawable.pScreen) {
2648 (pSprite->hot.pScreen == pWin->drawable.pScreen);
2652 FixUpXI2PinchEventFromWindow(SpritePtr pSprite, xXIGesturePinchEvent *event,
2655 event->root = RootWindow(pSprite)->drawable.id;
2658 if (pSprite->hot.pScreen == pWin->drawable.pScreen) {
2671 FixUpXI2SwipeEventFromWindow(SpritePtr pSprite, xXIGestureSwipeEvent *event,
2674 event->root = RootWindow(pSprite)->drawable.id;
2677 if (pSprite->hot.pScreen == pWin->drawable.pScreen) {
2698 FixUpEventFromWindow(SpritePtr pSprite,
2704 child = FindChildForEvent(pSprite, pWin);
2725 FixUpXI2PinchEventFromWindow(pSprite,
2731 FixUpXI2SwipeEventFromWindow(pSprite,
2735 FixUpXI2DeviceEventFromWindow(pSprite, evtype,
2741 XE_KBPTR.root = RootWindow(pSprite)->drawable.id;
2743 if (pSprite->hot.pScreen == pWin->drawable.pScreen) {
2819 SpritePtr pSprite = dev->spriteInfo->sprite;
2825 FixUpEventFromWindow(pSprite, xE, win, child, FALSE);
3027 SpritePtr pSprite = inputInfo.pointer->spriteInfo->sprite;
3031 if (RegionContainsPoint(&pSprite->windows[i]->borderSize,
3055 XYToWindow(SpritePtr pSprite, int x, int y)
3057 ScreenPtr pScreen = RootWindow(pSprite)->drawable.pScreen;
3059 return (*pScreen->XYToWindow)(pScreen, pSprite, x, y);
3157 SpritePtr pSprite = pDev->spriteInfo->sprite;
3161 prevSpriteWin = pSprite->win;
3184 ev->root_x += pSprite->screen->x - screenInfo.screens[0]->x;
3185 ev->root_y += pSprite->screen->y - screenInfo.screens[0]->y;
3190 if (pSprite->hot.pScreen != pSprite->hotPhys.pScreen) {
3191 pSprite->hot.pScreen = pSprite->hotPhys.pScreen;
3193 pSprite->hot.pScreen->root;
3197 pSprite->hot.x = ev->root_x;
3198 pSprite->hot.y = ev->root_y;
3199 if (pSprite->hot.x < pSprite->physLimits.x1)
3200 pSprite->hot.x = pSprite->physLimits.x1;
3201 else if (pSprite->hot.x >= pSprite->physLimits.x2)
3202 pSprite->hot.x = pSprite->physLimits.x2 - 1;
3203 if (pSprite->hot.y < pSprite->physLimits.y1)
3204 pSprite->hot.y = pSprite->physLimits.y1;
3205 else if (pSprite->hot.y >= pSprite->physLimits.y2)
3206 pSprite->hot.y = pSprite->physLimits.y2 - 1;
3207 if (pSprite->hotShape)
3208 ConfineToShape(pDev, pSprite->hotShape, &pSprite->hot.x,
3209 &pSprite->hot.y);
3210 pSprite->hotPhys = pSprite->hot;
3212 if ((pSprite->hotPhys.x != ev->root_x) ||
3213 (pSprite->hotPhys.y != ev->root_y)) {
3216 XineramaSetCursorPosition(pDev, pSprite->hotPhys.x,
3217 pSprite->hotPhys.y, FALSE);
3222 (*pSprite->hotPhys.pScreen->SetCursorPosition) (pDev,
3223 pSprite->
3225 pSprite->
3227 pSprite->
3233 ev->root_x = pSprite->hot.x;
3234 ev->root_y = pSprite->hot.y;
3237 newSpriteWin = XYToWindow(pSprite, pSprite->hot.x, pSprite->hot.y);
3254 /* set pSprite->win after ActivateEnterGrab, otherwise
3257 pSprite->win = newSpriteWin;
3291 SpritePtr pSprite;
3299 pSprite = pDev->spriteInfo->sprite;
3300 pSprite->hot.x -= xoff;
3301 pSprite->hot.y -= yoff;
3303 pSprite->hotPhys.x -= xoff;
3304 pSprite->hotPhys.y -= yoff;
3306 pSprite->hotLimits.x1 -= xoff;
3307 pSprite->hotLimits.y1 -= yoff;
3308 pSprite->hotLimits.x2 -= xoff;
3309 pSprite->hotLimits.y2 -= yoff;
3311 if (RegionNotEmpty(&pSprite->Reg1))
3312 RegionTranslate(&pSprite->Reg1, xoff, yoff);
3313 if (RegionNotEmpty(&pSprite->Reg2))
3314 RegionTranslate(&pSprite->Reg2, xoff, yoff);
3319 != pSprite->hotPhys.pScreen)
3320 pSprite->hotPhys.x = pSprite->hotPhys.y = 0;
3325 pSprite->hotPhys.pScreen->root,
3352 SpritePtr pSprite;
3377 pSprite = pDev->spriteInfo->sprite;
3381 pSprite->hot.pScreen = pScreen;
3382 pSprite->hotPhys.pScreen = pScreen;
3384 pSprite->hotPhys.x = pScreen->width / 2;
3385 pSprite->hotPhys.y = pScreen->height / 2;
3386 pSprite->hotLimits.x2 = pScreen->width;
3387 pSprite->hotLimits.y2 = pScreen->height;
3390 pSprite->hot = pSprite->hotPhys;
3391 pSprite->win = pWin;
3395 pSprite->spriteTrace = (WindowPtr *) calloc(1, 32 * sizeof(WindowPtr));
3396 if (!pSprite->spriteTrace)
3398 pSprite->spriteTraceSize = 32;
3401 pSprite->spriteTraceGood = 1;
3403 pSprite->pEnqueueScreen = pScreen;
3404 pSprite->pDequeueScreen = pSprite->pEnqueueScreen;
3409 pSprite->spriteTrace = NULL;
3410 pSprite->spriteTraceSize = 0;
3411 pSprite->spriteTraceGood = 0;
3412 pSprite->pEnqueueScreen = screenInfo.screens[0];
3413 pSprite->pDequeueScreen = pSprite->pEnqueueScreen;
3416 if (pSprite->current)
3417 FreeCursor(pSprite->current, None);
3418 pSprite->current = pCursor;
3421 (*pScreen->RealizeCursor) (pDev, pScreen, pSprite->current);
3422 (*pScreen->CursorLimits) (pDev, pScreen, pSprite->current,
3423 &pSprite->hotLimits, &pSprite->physLimits);
3424 pSprite->confined = FALSE;
3426 (*pScreen->ConstrainCursor) (pDev, pScreen, &pSprite->physLimits);
3427 (*pScreen->SetCursorPosition) (pDev, pScreen, pSprite->hot.x,
3428 pSprite->hot.y, FALSE);
3429 (*pScreen->DisplayCursor) (pDev, pScreen, pSprite->current);
3433 pSprite->hotLimits.x1 = -screenInfo.screens[0]->x;
3434 pSprite->hotLimits.y1 = -screenInfo.screens[0]->y;
3435 pSprite->hotLimits.x2 = PanoramiXPixWidth - screenInfo.screens[0]->x;
3436 pSprite->hotLimits.y2 = PanoramiXPixHeight - screenInfo.screens[0]->y;
3437 pSprite->physLimits = pSprite->hotLimits;
3438 pSprite->confineWin = NullWindow;
3439 pSprite->hotShape = NullRegion;
3440 pSprite->screen = pScreen;
3442 RegionNull(&pSprite->Reg1);
3443 RegionNull(&pSprite->Reg2);
3478 SpritePtr pSprite = NULL;
3488 pSprite = pDev->spriteInfo->sprite;
3492 pSprite->hotPhys.pScreen = pScreen;
3493 pSprite->hot = pSprite->hotPhys;
3494 pSprite->hotLimits.x2 = pScreen->width;
3495 pSprite->hotLimits.y2 = pScreen->height;
3496 pSprite->win = win;
3498 if (pSprite->current)
3499 FreeCursor(pSprite->current, 0);
3500 pSprite->current = pCursor;
3501 pSprite->spriteTraceGood = 1;
3502 pSprite->spriteTrace[0] = win;
3505 pSprite->current,
3506 &pSprite->hotLimits, &pSprite->physLimits);
3507 pSprite->confined = FALSE;
3508 (*pScreen->ConstrainCursor) (pDev, pScreen, &pSprite->physLimits);
3509 (*pScreen->DisplayCursor) (pDev, pScreen, pSprite->current);
3513 pSprite->hotLimits.x1 = -screenInfo.screens[0]->x;
3514 pSprite->hotLimits.y1 = -screenInfo.screens[0]->y;
3515 pSprite->hotLimits.x2 = PanoramiXPixWidth - screenInfo.screens[0]->x;
3516 pSprite->hotLimits.y2 = PanoramiXPixHeight - screenInfo.screens[0]->y;
3517 pSprite->physLimits = pSprite->hotLimits;
3518 pSprite->screen = pScreen;
3544 SpritePtr pSprite;
3549 pSprite = ptr->spriteInfo->sprite;
3551 pSprite->hotPhys.x = x;
3552 pSprite->hotPhys.y = y;
3555 pSprite->hotPhys.x += newScreen->x - screenInfo.screens[0]->x;
3556 pSprite->hotPhys.y += newScreen->y - screenInfo.screens[0]->y;
3557 if (newScreen != pSprite->screen) {
3558 pSprite->screen = newScreen;
3560 if (pSprite->confineWin)
3561 XineramaConfineCursorToWindow(ptr, pSprite->confineWin, TRUE);
3568 (*pSprite->screen->SetCursorPosition) (ptr,
3569 pSprite->screen,
3570 pSprite->hotPhys.x +
3572 x - pSprite->screen->x,
3573 pSprite->hotPhys.y +
3575 y - pSprite->screen->y,
3581 if (newScreen != pSprite->hotPhys.pScreen)
3628 SpritePtr pSprite = PickPointer(client)->spriteInfo->sprite;
3637 x = pSprite->hotPhys.x;
3638 y = pSprite->hotPhys.y;
3676 if (x < pSprite->physLimits.x1)
3677 x = pSprite->physLimits.x1;
3678 else if (x >= pSprite->physLimits.x2)
3679 x = pSprite->physLimits.x2 - 1;
3680 if (y < pSprite->physLimits.y1)
3681 y = pSprite->physLimits.y1;
3682 else if (y >= pSprite->physLimits.y2)
3683 y = pSprite->physLimits.y2 - 1;
3684 if (pSprite->hotShape)
3685 ConfineToShape(PickPointer(client), pSprite->hotShape, &x, &y);
3705 SpritePtr pSprite;
3722 pSprite = dev->spriteInfo->sprite;
3734 x = pSprite->hotPhys.x;
3735 y = pSprite->hotPhys.y;
3748 if (source->drawable.pScreen != pSprite->hotPhys.pScreen ||
3764 newScreen = pSprite->hotPhys.pScreen;
3778 if (newScreen == pSprite->hotPhys.pScreen) {
3779 if (x < pSprite->physLimits.x1)
3780 x = pSprite->physLimits.x1;
3781 else if (x >= pSprite->physLimits.x2)
3782 x = pSprite->physLimits.x2 - 1;
3783 if (y < pSprite->physLimits.y1)
3784 y = pSprite->physLimits.y1;
3785 else if (y >= pSprite->physLimits.y2)
3786 y = pSprite->physLimits.y2 - 1;
3787 if (pSprite->hotShape)
3788 ConfineToShape(dev, pSprite->hotShape, &x, &y);
3796 dest, pSprite, x, y);
3836 SpritePtr pSprite = device->spriteInfo->sprite;
3889 FixUpEventFromWindow(pSprite, xE, grab->window, None, TRUE);
4344 SpritePtr pSprite = dev->spriteInfo->sprite;
4389 FixUpEventFromWindow(pSprite, xE, grab->window, None, TRUE);
4425 SpritePtr pSprite = thisDev->spriteInfo->sprite;
4448 deliveries = DeliverDeviceEvents(pSprite->win, event, grab,
4450 else if (focus && (focus == pSprite->win ||
4451 IsParent(focus, pSprite->win)))
4452 deliveries = DeliverDeviceEvents(pSprite->win, event, grab, focus,
5413 SpritePtr pSprite;
5428 pSprite = mouse->spriteInfo->sprite;
5437 .rootX = pSprite->hot.x,
5438 .rootY = pSprite->hot.y,
5441 if (pSprite->hot.pScreen == pWin->drawable.pScreen) {
5443 rep.winX = pSprite->hot.x - pWin->drawable.x;
5444 rep.winY = pSprite->hot.y - pWin->drawable.y;
5445 for (t = pSprite->win; t; t = t->parent)
5549 SpritePtr pSprite = dev->spriteInfo->sprite;
5593 pWin = pSprite->win;
5605 if (IsParent(inputFocus, pSprite->win)) {
5607 pWin = pSprite->win;
6058 SpritePtr pSprite = PickPointer(client)->spriteInfo->sprite;
6082 displayed = (pscr == pSprite->screen);
6085 displayed = (pscr == pSprite->hotPhys.pScreen);
6087 (pCursor == pSprite->current) && displayed);