Lines Matching defs:pSprite
492 SpritePtr pSprite = pDev->spriteInfo->sprite;
498 pScreen = pSprite->screen;
516 pSprite->screen = pScreen;
517 pSprite->hotPhys.x = x - screenInfo.screens[0]->x;
518 pSprite->hotPhys.y = y - screenInfo.screens[0]->y;
529 SpritePtr pSprite = pDev->spriteInfo->sprite;
533 pScreen = pSprite->screen;
534 newBox = pSprite->physLimits;
550 SpritePtr pSprite = pDev->spriteInfo->sprite;
555 pSprite->windows[i] = screenInfo.screens[i]->root;
566 rc = dixLookupWindow(pSprite->windows + i, win->info[i].id,
580 SpritePtr pSprite = pDev->spriteInfo->sprite;
589 RegionCopy(&pSprite->Reg1,
590 &pSprite->windows[i]->borderSize);
599 RegionTranslate(&pSprite->Reg1, x, y);
601 RegionUnion(&pSprite->Reg1, &pSprite->Reg1,
602 &pSprite->windows[i]->borderSize);
608 pSprite->hotLimits = *RegionExtents(&pSprite->Reg1);
610 if(RegionNumRects(&pSprite->Reg1) > 1)
611 pSprite->hotShape = &pSprite->Reg1;
613 pSprite->hotShape = NullRegion;
615 pSprite->confined = FALSE;
616 pSprite->confineWin = (pWin == screenInfo.screens[0]->root) ? NullWindow : pWin;
618 CheckPhysLimits(pDev, pSprite->current, generateEvents, FALSE, NULL);
659 SpritePtr pSprite;
661 pSprite = pDev->spriteInfo->sprite;
700 SpritePtr pSprite = pDev->spriteInfo->sprite;
704 new = pSprite->hotPhys;
708 pSprite->physLimits = pSprite->hotLimits;
716 (*pScreen->CursorLimits) (pDev, pScreen, cursor, &pSprite->hotLimits,
717 &pSprite->physLimits);
718 pSprite->confined = confineToScreen;
719 (* pScreen->ConstrainCursor)(pDev, pScreen, &pSprite->physLimits);
723 if (new.x < pSprite->physLimits.x1)
724 new.x = pSprite->physLimits.x1;
726 if (new.x >= pSprite->physLimits.x2)
727 new.x = pSprite->physLimits.x2 - 1;
728 if (new.y < pSprite->physLimits.y1)
729 new.y = pSprite->physLimits.y1;
731 if (new.y >= pSprite->physLimits.y2)
732 new.y = pSprite->physLimits.y2 - 1;
733 if (pSprite->hotShape)
734 ConfineToShape(pDev, pSprite->hotShape, &new.x, &new.y);
739 (pScreen != pSprite->hotPhys.pScreen)) ||
740 (new.x != pSprite->hotPhys.x) || (new.y != pSprite->hotPhys.y))
748 if (pScreen != pSprite->hotPhys.pScreen)
749 pSprite->hotPhys = new;
770 SpritePtr pSprite = pDev->spriteInfo->sprite;
786 pSprite->hot.pScreen = qe->pScreen;
787 pSprite->hot.x = ev->root_x;
788 pSprite->hot.y = ev->root_y;
808 RegionCopy(&pSprite->Reg2,
809 &pSprite->windows[i]->borderSize);
818 RegionTranslate(&pSprite->Reg2, x, y);
820 RegionUnion(&pSprite->Reg2, &pSprite->Reg2,
821 &pSprite->windows[i]->borderSize);
829 if (pSprite->hot.pScreen != pWin->drawable.pScreen)
831 pSprite->hot.pScreen = pWin->drawable.pScreen;
832 pSprite->hot.x = pSprite->hot.y = 0;
837 if (pSprite->hot.x < lims.x1)
838 pSprite->hot.x = lims.x1;
839 else if (pSprite->hot.x >= lims.x2)
840 pSprite->hot.x = lims.x2 - 1;
841 if (pSprite->hot.y < lims.y1)
842 pSprite->hot.y = lims.y1;
843 else if (pSprite->hot.y >= lims.y2)
844 pSprite->hot.y = lims.y2 - 1;
849 if (RegionNumRects(&pSprite->Reg2) > 1)
850 reg = &pSprite->Reg2;
860 ConfineToShape(pDev, reg, &pSprite->hot.x, &pSprite->hot.y);
864 qe->pScreen = pSprite->hot.pScreen;
865 ev->root_x = pSprite->hot.x;
866 ev->root_y = pSprite->hot.y;
872 RootWindow(pDev->spriteInfo->sprite) = pSprite->hot.pScreen->root;
878 SpritePtr pSprite = pDev->spriteInfo->sprite;
883 SyntheticMotion(pDev, pSprite->hot.x, pSprite->hot.y);
893 pSprite->hotLimits = *RegionExtents(&pWin->borderSize);
894 pSprite->hotShape = wBoundingShape(pWin) ? &pWin->borderSize
896 CheckPhysLimits(pDev, pSprite->current, generateEvents,
917 SpritePtr pSprite = pDev->spriteInfo->sprite;
920 if (cursor != pSprite->current)
922 if ((pSprite->current->bits->xhot != cursor->bits->xhot) ||
923 (pSprite->current->bits->yhot != cursor->bits->yhot))
924 CheckPhysLimits(pDev, cursor, FALSE, pSprite->confined,
929 pScreen = pSprite->screen;
932 pScreen = pSprite->hotPhys.pScreen;
935 FreeCursor(pSprite->current, (Cursor)0);
936 pSprite->current = cursor;
937 pSprite->current->refcnt++;
962 SpritePtr pSprite = pDev->spriteInfo->sprite;
974 if (IsParent(grab->window, pSprite->win))
975 win = pSprite->win;
980 win = pSprite->win;
1032 SpritePtr pSprite = pDev->spriteInfo->sprite;
1033 *px = pSprite->hotPhys.x;
1034 *py = pSprite->hotPhys.y;
1094 SpritePtr pSprite = device->spriteInfo->sprite;
1119 ev->device_event.root = pSprite->hotPhys.pScreen->root->drawable.id;
1130 event->root_x += pSprite->screen->x - screenInfo.screens[0]->x;
1131 event->root_y += pSprite->screen->y - screenInfo.screens[0]->y;
1134 pSprite->hotPhys.x = event->root_x;
1135 pSprite->hotPhys.y = event->root_y;
1140 (tail->pScreen == pSprite->hotPhys.pScreen))
1143 tailev->root_x = pSprite->hotPhys.x;
1144 tailev->root_y = pSprite->hotPhys.y;
1158 qe->pScreen = pSprite->hotPhys.pScreen;
2175 static Window FindChildForEvent(SpritePtr pSprite, WindowPtr event)
2177 WindowPtr w = pSprite->spriteTrace[pSprite->spriteTraceGood-1];
2215 SpritePtr pSprite,
2222 child = FindChildForEvent(pSprite, pWin);
2238 event->root = RootWindow(pSprite)->drawable.id;
2240 if (pSprite->hot.pScreen == pWin->drawable.pScreen)
2255 (pSprite->hot.pScreen == pWin->drawable.pScreen);
2259 XE_KBPTR.root = RootWindow(pSprite)->drawable.id;
2261 if (pSprite->hot.pScreen == pWin->drawable.pScreen)
2365 SpritePtr pSprite = dev->spriteInfo->sprite;
2388 FixUpEventFromWindow(pSprite, xi2, pWin, child, FALSE);
2406 FixUpEventFromWindow(pSprite, xE, pWin, child, FALSE);
2424 FixUpEventFromWindow(pSprite, &core, pWin, child, FALSE);
2521 SpritePtr pSprite = inputInfo.pointer->spriteInfo->sprite;
2525 if(RegionContainsPoint(&pSprite->windows[i]->borderSize,
2548 XYToWindow(SpritePtr pSprite, int x, int y)
2553 pSprite->spriteTraceGood = 1; /* root window still there */
2554 pWin = RootWindow(pSprite)->firstChild;
2582 if (pSprite->spriteTraceGood >= pSprite->spriteTraceSize)
2584 pSprite->spriteTraceSize += 10;
2585 pSprite->spriteTrace = realloc(pSprite->spriteTrace,
2586 pSprite->spriteTraceSize*sizeof(WindowPtr));
2588 pSprite->spriteTrace[pSprite->spriteTraceGood++] = pWin;
2594 return pSprite->spriteTrace[pSprite->spriteTraceGood-1];
2690 SpritePtr pSprite = pDev->spriteInfo->sprite;
2694 prevSpriteWin = pSprite->win;
2718 ev->root_x += pSprite->screen->x - screenInfo.screens[0]->x;
2719 ev->root_y += pSprite->screen->y - screenInfo.screens[0]->y;
2723 if (pSprite->hot.pScreen != pSprite->hotPhys.pScreen)
2725 pSprite->hot.pScreen = pSprite->hotPhys.pScreen;
2727 pSprite->hot.pScreen->root;
2731 pSprite->hot.x = ev->root_x;
2732 pSprite->hot.y = ev->root_y;
2733 if (pSprite->hot.x < pSprite->physLimits.x1)
2734 pSprite->hot.x = pSprite->physLimits.x1;
2735 else if (pSprite->hot.x >= pSprite->physLimits.x2)
2736 pSprite->hot.x = pSprite->physLimits.x2 - 1;
2737 if (pSprite->hot.y < pSprite->physLimits.y1)
2738 pSprite->hot.y = pSprite->physLimits.y1;
2739 else if (pSprite->hot.y >= pSprite->physLimits.y2)
2740 pSprite->hot.y = pSprite->physLimits.y2 - 1;
2741 if (pSprite->hotShape)
2742 ConfineToShape(pDev, pSprite->hotShape, &pSprite->hot.x, &pSprite->hot.y);
2743 pSprite->hotPhys = pSprite->hot;
2745 if ((pSprite->hotPhys.x != ev->root_x) ||
2746 (pSprite->hotPhys.y != ev->root_y))
2752 pDev, pSprite->hotPhys.x, pSprite->hotPhys.y, FALSE);
2756 (*pSprite->hotPhys.pScreen->SetCursorPosition)(
2757 pDev, pSprite->hotPhys.pScreen,
2758 pSprite->hotPhys.x, pSprite->hotPhys.y, FALSE);
2762 ev->root_x = pSprite->hot.x;
2763 ev->root_y = pSprite->hot.y;
2766 newSpriteWin = XYToWindow(pSprite, pSprite->hot.x, pSprite->hot.y);
2782 /* set pSprite->win after ActivateEnterGrab, otherwise
2785 pSprite->win = newSpriteWin;
2818 SpritePtr pSprite;
2827 pSprite = pDev->spriteInfo->sprite;
2828 pSprite->hot.x -= xoff;
2829 pSprite->hot.y -= yoff;
2831 pSprite->hotPhys.x -= xoff;
2832 pSprite->hotPhys.y -= yoff;
2834 pSprite->hotLimits.x1 -= xoff;
2835 pSprite->hotLimits.y1 -= yoff;
2836 pSprite->hotLimits.x2 -= xoff;
2837 pSprite->hotLimits.y2 -= yoff;
2839 if (RegionNotEmpty(&pSprite->Reg1))
2840 RegionTranslate(&pSprite->Reg1, xoff, yoff);
2841 if (RegionNotEmpty(&pSprite->Reg2))
2842 RegionTranslate(&pSprite->Reg2, xoff, yoff);
2847 != pSprite->hotPhys.pScreen)
2848 pSprite->hotPhys.x = pSprite->hotPhys.y = 0;
2853 pSprite->hotPhys.pScreen->root,
2880 SpritePtr pSprite;
2907 pSprite = pDev->spriteInfo->sprite;
2911 pSprite->hot.pScreen = pScreen;
2912 pSprite->hotPhys.pScreen = pScreen;
2915 pSprite->hotPhys.x = pScreen->width / 2;
2916 pSprite->hotPhys.y = pScreen->height / 2;
2917 pSprite->hotLimits.x2 = pScreen->width;
2918 pSprite->hotLimits.y2 = pScreen->height;
2921 pSprite->hot = pSprite->hotPhys;
2922 pSprite->win = pWin;
2927 pSprite->spriteTrace = (WindowPtr *)calloc(1, 32*sizeof(WindowPtr));
2928 if (!pSprite->spriteTrace)
2930 pSprite->spriteTraceSize = 32;
2933 pSprite->spriteTraceGood = 1;
2935 pSprite->pEnqueueScreen = pScreen;
2936 pSprite->pDequeueScreen = pSprite->pEnqueueScreen;
2940 pSprite->spriteTrace = NULL;
2941 pSprite->spriteTraceSize = 0;
2942 pSprite->spriteTraceGood = 0;
2943 pSprite->pEnqueueScreen = screenInfo.screens[0];
2944 pSprite->pDequeueScreen = pSprite->pEnqueueScreen;
2948 if (pSprite->current)
2949 FreeCursor(pSprite->current, None);
2950 pSprite->current = pCursor;
2954 (*pScreen->RealizeCursor) ( pDev, pScreen, pSprite->current);
2955 (*pScreen->CursorLimits) ( pDev, pScreen, pSprite->current,
2956 &pSprite->hotLimits, &pSprite->physLimits);
2957 pSprite->confined = FALSE;
2960 &pSprite->physLimits);
2961 (*pScreen->SetCursorPosition) (pDev, pScreen, pSprite->hot.x,
2962 pSprite->hot.y,
2964 (*pScreen->DisplayCursor) (pDev, pScreen, pSprite->current);
2968 pSprite->hotLimits.x1 = -screenInfo.screens[0]->x;
2969 pSprite->hotLimits.y1 = -screenInfo.screens[0]->y;
2970 pSprite->hotLimits.x2 = PanoramiXPixWidth - screenInfo.screens[0]->x;
2971 pSprite->hotLimits.y2 = PanoramiXPixHeight - screenInfo.screens[0]->y;
2972 pSprite->physLimits = pSprite->hotLimits;
2973 pSprite->confineWin = NullWindow;
2974 pSprite->hotShape = NullRegion;
2975 pSprite->screen = pScreen;
2977 RegionNull(&pSprite->Reg1);
2978 RegionNull(&pSprite->Reg2);
3001 SpritePtr pSprite = NULL;
3010 pSprite = pDev->spriteInfo->sprite;
3014 pSprite->hotPhys.pScreen = pScreen;
3015 pSprite->hot = pSprite->hotPhys;
3016 pSprite->hotLimits.x2 = pScreen->width;
3017 pSprite->hotLimits.y2 = pScreen->height;
3018 pSprite->win = win;
3022 if (pSprite->current)
3023 FreeCursor(pSprite->current, 0);
3024 pSprite->current = pCursor;
3025 pSprite->spriteTraceGood = 1;
3026 pSprite->spriteTrace[0] = win;
3029 pSprite->current,
3030 &pSprite->hotLimits,
3031 &pSprite->physLimits);
3032 pSprite->confined = FALSE;
3033 (*pScreen->ConstrainCursor) (pDev, pScreen, &pSprite->physLimits);
3034 (*pScreen->DisplayCursor) (pDev, pScreen, pSprite->current);
3038 pSprite->hotLimits.x1 = -screenInfo.screens[0]->x;
3039 pSprite->hotLimits.y1 = -screenInfo.screens[0]->y;
3040 pSprite->hotLimits.x2 = PanoramiXPixWidth - screenInfo.screens[0]->x;
3041 pSprite->hotLimits.y2 = PanoramiXPixHeight - screenInfo.screens[0]->y;
3042 pSprite->physLimits = pSprite->hotLimits;
3043 pSprite->screen = pScreen;
3068 SpritePtr pSprite = pDev->spriteInfo->sprite;
3070 pSprite->hotPhys.x = x;
3071 pSprite->hotPhys.y = y;
3074 pSprite->hotPhys.x += newScreen->x - screenInfo.screens[0]->x;
3075 pSprite->hotPhys.y += newScreen->y - screenInfo.screens[0]->y;
3076 if (newScreen != pSprite->screen) {
3077 pSprite->screen = newScreen;
3079 if(pSprite->confineWin)
3081 pSprite->confineWin, TRUE);
3087 (*pSprite->screen->SetCursorPosition)(
3089 pSprite->screen,
3090 pSprite->hotPhys.x + screenInfo.screens[0]->x -
3091 pSprite->screen->x,
3092 pSprite->hotPhys.y + screenInfo.screens[0]->y -
3093 pSprite->screen->y, FALSE);
3097 if (newScreen != pSprite->hotPhys.pScreen)
3145 SpritePtr pSprite = PickPointer(client)->spriteInfo->sprite;
3155 x = pSprite->hotPhys.x;
3156 y = pSprite->hotPhys.y;
3195 if (x < pSprite->physLimits.x1)
3196 x = pSprite->physLimits.x1;
3197 else if (x >= pSprite->physLimits.x2)
3198 x = pSprite->physLimits.x2 - 1;
3199 if (y < pSprite->physLimits.y1)
3200 y = pSprite->physLimits.y1;
3201 else if (y >= pSprite->physLimits.y2)
3202 y = pSprite->physLimits.y2 - 1;
3203 if (pSprite->hotShape)
3204 ConfineToShape(PickPointer(client), pSprite->hotShape, &x, &y);
3225 SpritePtr pSprite;
3242 pSprite = dev->spriteInfo->sprite;
3254 x = pSprite->hotPhys.x;
3255 y = pSprite->hotPhys.y;
3269 if (source->drawable.pScreen != pSprite->hotPhys.pScreen ||
3285 newScreen = pSprite->hotPhys.pScreen;
3299 if (newScreen == pSprite->hotPhys.pScreen)
3301 if (x < pSprite->physLimits.x1)
3302 x = pSprite->physLimits.x1;
3303 else if (x >= pSprite->physLimits.x2)
3304 x = pSprite->physLimits.x2 - 1;
3305 if (y < pSprite->physLimits.y1)
3306 y = pSprite->physLimits.y1;
3307 else if (y >= pSprite->physLimits.y2)
3308 y = pSprite->physLimits.y2 - 1;
3309 if (pSprite->hotShape)
3310 ConfineToShape(dev, pSprite->hotShape, &x, &y);
3360 SpritePtr pSprite = device->spriteInfo->sprite;
3526 FixUpEventFromWindow(pSprite, xE, grab->window, None, TRUE);
3739 SpritePtr pSprite = thisDev->spriteInfo->sprite;
3767 deliveries = DeliverDeviceEvents(pSprite->win, event, grab,
3769 else if (focus && (focus == pSprite->win ||
3770 IsParent(focus, pSprite->win)))
3771 deliveries = DeliverDeviceEvents(pSprite->win, event, grab, focus,
3798 FixUpEventFromWindow(pSprite, &core, grab->window, None, TRUE);
3825 FixUpEventFromWindow(pSprite, xi2, grab->window, None, TRUE);
3846 FixUpEventFromWindow(pSprite, xi, grab->window, None, TRUE);
4856 SpritePtr pSprite;
4870 pSprite = mouse->spriteInfo->sprite;
4880 rep.rootX = pSprite->hot.x;
4881 rep.rootY = pSprite->hot.y;
4883 if (pSprite->hot.pScreen == pWin->drawable.pScreen)
4886 rep.winX = pSprite->hot.x - pWin->drawable.x;
4887 rep.winY = pSprite->hot.y - pWin->drawable.y;
4888 for (t = pSprite->win; t; t = t->parent)
4998 SpritePtr pSprite = dev->spriteInfo->sprite;
5045 pWin = pSprite->win;
5058 if (IsParent(inputFocus, pSprite->win))
5061 pWin = pSprite->win;
5524 SpritePtr pSprite = PickPointer(client)->spriteInfo->sprite;
5549 displayed = (pscr == pSprite->screen);
5552 displayed = (pscr == pSprite->hotPhys.pScreen);
5554 (pCursor == pSprite->current) && displayed);