Lines Matching +full:cs +full:- +full:x

45 #include <dix-config.h>
58 ScreenPtr pScreen = pWin->drawable.pScreen; in compCheckWindow()
59 PixmapPtr pWinPixmap = (*pScreen->GetWindowPixmap) (pWin); in compCheckWindow()
61 pWin->parent ? (*pScreen->GetWindowPixmap) (pWin->parent) : 0; in compCheckWindow()
62 PixmapPtr pScreenPixmap = (*pScreen->GetScreenPixmap) (pScreen); in compCheckWindow()
64 if (!pWin->parent) { in compCheckWindow()
65 assert(pWin->redirectDraw == RedirectDrawNone); in compCheckWindow()
68 else if (pWin->redirectDraw != RedirectDrawNone) { in compCheckWindow()
75 assert(0 < pWinPixmap->refcnt && pWinPixmap->refcnt < 3); in compCheckWindow()
76 assert(0 < pScreenPixmap->refcnt && pScreenPixmap->refcnt < 3); in compCheckWindow()
78 assert(0 <= pParentPixmap->refcnt && pParentPixmap->refcnt < 3); in compCheckWindow()
107 RegionSubtract(&exposed, &pWindow->borderClip, &pWindow->winSize); in compRepaintBorder()
108 pWindow->drawable.pScreen->PaintWindow(pWindow, &exposed, PW_BORDER); in compRepaintBorder()
118 ScreenPtr pScreen = pWindow->drawable.pScreen; in compSetPixmapVisitWindow()
120 if (pWindow != pVisit->pWindow && pWindow->redirectDraw != RedirectDrawNone) in compSetPixmapVisitWindow()
122 (*pScreen->SetWindowPixmap) (pWindow, pVisit->pPixmap); in compSetPixmapVisitWindow()
130 if (pVisit->bw) in compSetPixmapVisitWindow()
132 (void *) (intptr_t) pWindow->drawable.id); in compSetPixmapVisitWindow()
145 compCheckTree(pWindow->drawable.pScreen); in compSetPixmap()
152 CompScreenPtr cs = GetCompScreen(pWin->drawable.pScreen); in compCheckRedirect() local
155 should = pWin->realized && (pWin->drawable.class != InputOnly) && in compCheckRedirect()
156 (cw != NULL) && (pWin->parent != NULL); in compCheckRedirect()
159 if (cs->pOverlayWin != NULL) { in compCheckRedirect()
160 if (pWin == cs->pOverlayWin) { in compCheckRedirect()
165 if (should != (pWin->redirectDraw != RedirectDrawNone)) { in compCheckRedirect()
169 ScreenPtr pScreen = pWin->drawable.pScreen; in compCheckRedirect()
170 PixmapPtr pPixmap = (*pScreen->GetWindowPixmap) (pWin); in compCheckRedirect()
174 (*pScreen->DestroyPixmap) (pPixmap); in compCheckRedirect()
178 if (cw->update == CompositeRedirectAutomatic) in compCheckRedirect()
179 pWin->redirectDraw = RedirectDrawAutomatic; in compCheckRedirect()
181 pWin->redirectDraw = RedirectDrawManual; in compCheckRedirect()
189 CompScreenPtr cs; in updateOverlayWindow() local
192 int w = pScreen->width; in updateOverlayWindow()
193 int h = pScreen->height; in updateOverlayWindow()
202 cs = GetCompScreen(pScreen); in updateOverlayWindow()
203 if ((pWin = cs->pOverlayWin) != NULL) { in updateOverlayWindow()
204 if ((pWin->drawable.width == w) && (pWin->drawable.height == h)) in updateOverlayWindow()
219 compPositionWindow(WindowPtr pWin, int x, int y) in compPositionWindow() argument
221 ScreenPtr pScreen = pWin->drawable.pScreen; in compPositionWindow()
222 CompScreenPtr cs = GetCompScreen(pScreen); in compPositionWindow() local
225 pScreen->PositionWindow = cs->PositionWindow; in compPositionWindow()
232 if ((pWin->redirectDraw != RedirectDrawNone) != in compPositionWindow()
233 (pWin->viewable && (GetCompWindow(pWin) != NULL))) in compPositionWindow()
236 if (pWin->redirectDraw != RedirectDrawNone) { in compPositionWindow()
237 PixmapPtr pPixmap = (*pScreen->GetWindowPixmap) (pWin); in compPositionWindow()
239 int nx = pWin->drawable.x - bw; in compPositionWindow()
240 int ny = pWin->drawable.y - bw; in compPositionWindow()
242 if (pPixmap->screen_x != nx || pPixmap->screen_y != ny) { in compPositionWindow()
243 pPixmap->screen_x = nx; in compPositionWindow()
244 pPixmap->screen_y = ny; in compPositionWindow()
245 pPixmap->drawable.serialNumber = NEXT_SERIAL_NUMBER; in compPositionWindow()
249 if (!(*pScreen->PositionWindow) (pWin, x, y)) in compPositionWindow()
251 cs->PositionWindow = pScreen->PositionWindow; in compPositionWindow()
252 pScreen->PositionWindow = compPositionWindow; in compPositionWindow()
253 compCheckTree(pWin->drawable.pScreen); in compPositionWindow()
262 ScreenPtr pScreen = pWin->drawable.pScreen; in compRealizeWindow()
263 CompScreenPtr cs = GetCompScreen(pScreen); in compRealizeWindow() local
266 pScreen->RealizeWindow = cs->RealizeWindow; in compRealizeWindow()
268 if (!(*pScreen->RealizeWindow) (pWin)) in compRealizeWindow()
270 cs->RealizeWindow = pScreen->RealizeWindow; in compRealizeWindow()
271 pScreen->RealizeWindow = compRealizeWindow; in compRealizeWindow()
272 compCheckTree(pWin->drawable.pScreen); in compRealizeWindow()
279 ScreenPtr pScreen = pWin->drawable.pScreen; in compUnrealizeWindow()
280 CompScreenPtr cs = GetCompScreen(pScreen); in compUnrealizeWindow() local
283 pScreen->UnrealizeWindow = cs->UnrealizeWindow; in compUnrealizeWindow()
285 if (!(*pScreen->UnrealizeWindow) (pWin)) in compUnrealizeWindow()
287 cs->UnrealizeWindow = pScreen->UnrealizeWindow; in compUnrealizeWindow()
288 pScreen->UnrealizeWindow = compUnrealizeWindow; in compUnrealizeWindow()
289 compCheckTree(pWin->drawable.pScreen); in compUnrealizeWindow()
301 ScreenPtr pScreen = pWin->drawable.pScreen; in compClipNotify()
302 CompScreenPtr cs = GetCompScreen(pScreen); in compClipNotify() local
306 if (cw->borderClipX != pWin->drawable.x || in compClipNotify()
307 cw->borderClipY != pWin->drawable.y) { in compClipNotify()
308 RegionTranslate(&cw->borderClip, in compClipNotify()
309 pWin->drawable.x - cw->borderClipX, in compClipNotify()
310 pWin->drawable.y - cw->borderClipY); in compClipNotify()
311 cw->borderClipX = pWin->drawable.x; in compClipNotify()
312 cw->borderClipY = pWin->drawable.y; in compClipNotify()
315 if (cs->ClipNotify) { in compClipNotify()
316 pScreen->ClipNotify = cs->ClipNotify; in compClipNotify()
317 (*pScreen->ClipNotify) (pWin, dx, dy); in compClipNotify()
318 cs->ClipNotify = pScreen->ClipNotify; in compClipNotify()
319 pScreen->ClipNotify = compClipNotify; in compClipNotify()
326 CompScreenPtr cs = GetCompScreen(pScreen); in compIsAlternateVisual() local
329 for (i = 0; cs && i < cs->numAlternateVisuals; i++) in compIsAlternateVisual()
330 if (cs->alternateVisuals[i] == visual) in compIsAlternateVisual()
339 CompScreenPtr cs = GetCompScreen(pScreen); in compIsImplicitRedirectException() local
342 for (i = 0; i < cs->numImplicitRedirectExceptions; i++) in compIsImplicitRedirectException()
343 if (cs->implicitRedirectExceptions[i].parentVisual == parentVisual && in compIsImplicitRedirectException()
344 cs->implicitRedirectExceptions[i].winVisual == winVisual) in compIsImplicitRedirectException()
354 ScreenPtr pScreen = pWin->drawable.pScreen; in compImplicitRedirect()
372 ScreenPtr pScreen = pWin->drawable.pScreen; in compFreeOldPixmap()
374 if (pWin->redirectDraw != RedirectDrawNone) { in compFreeOldPixmap()
377 if (cw->pOldPixmap) { in compFreeOldPixmap()
378 (*pScreen->DestroyPixmap) (cw->pOldPixmap); in compFreeOldPixmap()
379 cw->pOldPixmap = NullPixmap; in compFreeOldPixmap()
385 compMoveWindow(WindowPtr pWin, int x, int y, WindowPtr pSib, VTKind kind) in compMoveWindow() argument
387 ScreenPtr pScreen = pWin->drawable.pScreen; in compMoveWindow()
388 CompScreenPtr cs = GetCompScreen(pScreen); in compMoveWindow() local
390 pScreen->MoveWindow = cs->MoveWindow; in compMoveWindow()
391 (*pScreen->MoveWindow) (pWin, x, y, pSib, kind); in compMoveWindow()
392 cs->MoveWindow = pScreen->MoveWindow; in compMoveWindow()
393 pScreen->MoveWindow = compMoveWindow; in compMoveWindow()
400 compResizeWindow(WindowPtr pWin, int x, int y, in compResizeWindow() argument
403 ScreenPtr pScreen = pWin->drawable.pScreen; in compResizeWindow()
404 CompScreenPtr cs = GetCompScreen(pScreen); in compResizeWindow() local
406 pScreen->ResizeWindow = cs->ResizeWindow; in compResizeWindow()
407 (*pScreen->ResizeWindow) (pWin, x, y, w, h, pSib); in compResizeWindow()
408 cs->ResizeWindow = pScreen->ResizeWindow; in compResizeWindow()
409 pScreen->ResizeWindow = compResizeWindow; in compResizeWindow()
412 compCheckTree(pWin->drawable.pScreen); in compResizeWindow()
418 ScreenPtr pScreen = pWin->drawable.pScreen; in compChangeBorderWidth()
419 CompScreenPtr cs = GetCompScreen(pScreen); in compChangeBorderWidth() local
421 pScreen->ChangeBorderWidth = cs->ChangeBorderWidth; in compChangeBorderWidth()
422 (*pScreen->ChangeBorderWidth) (pWin, bw); in compChangeBorderWidth()
423 cs->ChangeBorderWidth = pScreen->ChangeBorderWidth; in compChangeBorderWidth()
424 pScreen->ChangeBorderWidth = compChangeBorderWidth; in compChangeBorderWidth()
427 compCheckTree(pWin->drawable.pScreen); in compChangeBorderWidth()
433 ScreenPtr pScreen = pWin->drawable.pScreen; in compReparentWindow()
434 CompScreenPtr cs = GetCompScreen(pScreen); in compReparentWindow() local
437 pScreen->ReparentWindow = cs->ReparentWindow; in compReparentWindow()
447 compRedirectOneSubwindow(pWin->parent, pWin); in compReparentWindow()
451 if (compImplicitRedirect(pWin, pWin->parent)) in compReparentWindow()
463 if (pWin->parent && pWin->redirectDraw == RedirectDrawNone) in compReparentWindow()
464 compSetPixmap(pWin, (*pScreen->GetWindowPixmap) (pWin->parent), in compReparentWindow()
465 pWin->borderWidth); in compReparentWindow()
469 if (pScreen->ReparentWindow) in compReparentWindow()
470 (*pScreen->ReparentWindow) (pWin, pPriorParent); in compReparentWindow()
471 cs->ReparentWindow = pScreen->ReparentWindow; in compReparentWindow()
472 pScreen->ReparentWindow = compReparentWindow; in compReparentWindow()
475 if (pWin->damagedDescendants || (cw && cw->damaged)) in compReparentWindow()
478 compCheckTree(pWin->drawable.pScreen); in compReparentWindow()
484 ScreenPtr pScreen = pWin->drawable.pScreen; in compCopyWindow()
485 CompScreenPtr cs = GetCompScreen(pScreen); in compCopyWindow() local
488 if (pWin->redirectDraw != RedirectDrawNone) { in compCopyWindow()
489 PixmapPtr pPixmap = (*pScreen->GetWindowPixmap) (pWin); in compCopyWindow()
492 assert(cw->oldx != COMP_ORIGIN_INVALID); in compCopyWindow()
493 assert(cw->oldy != COMP_ORIGIN_INVALID); in compCopyWindow()
494 if (cw->pOldPixmap) { in compCopyWindow()
502 dx = ptOldOrg.x - pWin->drawable.x; in compCopyWindow()
503 dy = ptOldOrg.y - pWin->drawable.y; in compCopyWindow()
504 RegionTranslate(prgnSrc, -dx, -dy); in compCopyWindow()
508 RegionIntersect(&rgnDst, &pWin->borderClip, prgnSrc); in compCopyWindow()
510 RegionTranslate(&rgnDst, -pPixmap->screen_x, -pPixmap->screen_y); in compCopyWindow()
512 dx = dx + pPixmap->screen_x - cw->oldx; in compCopyWindow()
513 dy = dy + pPixmap->screen_y - cw->oldy; in compCopyWindow()
514 pGC = GetScratchGC(pPixmap->drawable.depth, pScreen); in compCopyWindow()
519 ValidateGC(&pPixmap->drawable, pGC); in compCopyWindow()
520 while (nBox--) { in compCopyWindow()
521 (void) (*pGC->ops->CopyArea) (&cw->pOldPixmap->drawable, in compCopyWindow()
522 &pPixmap->drawable, in compCopyWindow()
524 pBox->x1 + dx, pBox->y1 + dy, in compCopyWindow()
525 pBox->x2 - pBox->x1, in compCopyWindow()
526 pBox->y2 - pBox->y1, in compCopyWindow()
527 pBox->x1, pBox->y1); in compCopyWindow()
535 dx = pPixmap->screen_x - cw->oldx; in compCopyWindow()
536 dy = pPixmap->screen_y - cw->oldy; in compCopyWindow()
537 ptOldOrg.x += dx; in compCopyWindow()
541 pScreen->CopyWindow = cs->CopyWindow; in compCopyWindow()
542 if (ptOldOrg.x != pWin->drawable.x || ptOldOrg.y != pWin->drawable.y) { in compCopyWindow()
545 (*pScreen->CopyWindow) (pWin, ptOldOrg, prgnSrc); in compCopyWindow()
547 RegionTranslate(prgnSrc, -dx, -dy); in compCopyWindow()
550 ptOldOrg.x -= dx; in compCopyWindow()
551 ptOldOrg.y -= dy; in compCopyWindow()
553 pWin->drawable.x - ptOldOrg.x, in compCopyWindow()
554 pWin->drawable.y - ptOldOrg.y); in compCopyWindow()
555 DamageDamageRegion(&pWin->drawable, prgnSrc); in compCopyWindow()
557 cs->CopyWindow = pScreen->CopyWindow; in compCopyWindow()
558 pScreen->CopyWindow = compCopyWindow; in compCopyWindow()
559 compCheckTree(pWin->drawable.pScreen); in compCopyWindow()
565 ScreenPtr pScreen = pWin->drawable.pScreen; in compCreateWindow()
566 CompScreenPtr cs = GetCompScreen(pScreen); in compCreateWindow() local
569 pScreen->CreateWindow = cs->CreateWindow; in compCreateWindow()
570 ret = (*pScreen->CreateWindow) (pWin); in compCreateWindow()
571 if (pWin->parent && ret) { in compCreateWindow()
572 CompSubwindowsPtr csw = GetCompSubwindows(pWin->parent); in compCreateWindow()
574 PixmapPtr parent_pixmap = (*pScreen->GetWindowPixmap)(pWin->parent); in compCreateWindow()
575 PixmapPtr window_pixmap = (*pScreen->GetWindowPixmap)(pWin); in compCreateWindow()
578 (*pScreen->SetWindowPixmap) (pWin, parent_pixmap); in compCreateWindow()
580 for (ccw = csw->clients; ccw; ccw = ccw->next) in compCreateWindow()
581 compRedirectWindow(clients[CLIENT_ID(ccw->id)], in compCreateWindow()
582 pWin, ccw->update); in compCreateWindow()
583 if (compImplicitRedirect(pWin, pWin->parent)) in compCreateWindow()
586 cs->CreateWindow = pScreen->CreateWindow; in compCreateWindow()
587 pScreen->CreateWindow = compCreateWindow; in compCreateWindow()
588 compCheckTree(pWin->drawable.pScreen); in compCreateWindow()
595 ScreenPtr pScreen = pWin->drawable.pScreen; in compDestroyWindow()
596 CompScreenPtr cs = GetCompScreen(pScreen); in compDestroyWindow() local
601 pScreen->DestroyWindow = cs->DestroyWindow; in compDestroyWindow()
603 FreeResource(cw->clients->id, RT_NONE); in compDestroyWindow()
605 FreeResource(csw->clients->id, RT_NONE); in compDestroyWindow()
607 if (pWin->redirectDraw != RedirectDrawNone) { in compDestroyWindow()
608 PixmapPtr pPixmap = (*pScreen->GetWindowPixmap) (pWin); in compDestroyWindow()
611 (*pScreen->DestroyPixmap) (pPixmap); in compDestroyWindow()
613 ret = (*pScreen->DestroyWindow) (pWin); in compDestroyWindow()
614 cs->DestroyWindow = pScreen->DestroyWindow; in compDestroyWindow()
615 pScreen->DestroyWindow = compDestroyWindow; in compDestroyWindow()
616 /* compCheckTree (pWin->drawable.pScreen); can't check -- tree isn't good*/ in compDestroyWindow()
630 RegionTranslate(&cw->borderClip, in compSetRedirectBorderClip()
631 pWin->drawable.x - cw->borderClipX, in compSetRedirectBorderClip()
632 pWin->drawable.y - cw->borderClipY); in compSetRedirectBorderClip()
636 RegionSubtract(&damage, pRegion, &cw->borderClip); in compSetRedirectBorderClip()
640 DamageDamageRegion(&pWin->drawable, &damage); in compSetRedirectBorderClip()
645 RegionCopy(&cw->borderClip, pRegion); in compSetRedirectBorderClip()
646 cw->borderClipX = pWin->drawable.x; in compSetRedirectBorderClip()
647 cw->borderClipY = pWin->drawable.y; in compSetRedirectBorderClip()
655 return &cw->borderClip; in compGetRedirectBorderClip()
662 ScreenPtr pScreen = pWin->drawable.pScreen; in compWindowUpdateAutomatic()
663 WindowPtr pParent = pWin->parent; in compWindowUpdateAutomatic()
664 PixmapPtr pSrcPixmap = (*pScreen->GetWindowPixmap) (pWin); in compWindowUpdateAutomatic()
666 PictFormatPtr pDstFormat = PictureWindowFormat(pWin->parent); in compWindowUpdateAutomatic()
668 RegionPtr pRegion = DamageRegion(cw->damage); in compWindowUpdateAutomatic()
669 PicturePtr pSrcPicture = CreatePicture(0, &pSrcPixmap->drawable, in compWindowUpdateAutomatic()
675 PicturePtr pDstPicture = CreatePicture(0, &pParent->drawable, in compWindowUpdateAutomatic()
685 RegionTranslate(pRegion, pWin->drawable.x, pWin->drawable.y); in compWindowUpdateAutomatic()
690 RegionIntersect(pRegion, pRegion, &cw->borderClip); in compWindowUpdateAutomatic()
695 RegionTranslate(pRegion, -pParent->drawable.x, -pParent->drawable.y); in compWindowUpdateAutomatic()
708 pSrcPixmap->screen_x - pParent->drawable.x, in compWindowUpdateAutomatic()
709 pSrcPixmap->screen_y - pParent->drawable.y, in compWindowUpdateAutomatic()
710 pSrcPixmap->drawable.width, pSrcPixmap->drawable.height); in compWindowUpdateAutomatic()
717 DamageEmpty(cw->damage); in compWindowUpdateAutomatic()
725 if (pWin->redirectDraw != RedirectDrawNone) { in compPaintWindowToParent()
728 if (cw->damaged) { in compPaintWindowToParent()
730 cw->damaged = FALSE; in compPaintWindowToParent()
740 if (!pWin->damagedDescendants) in compPaintChildrenToWindow()
743 for (pChild = pWin->lastChild; pChild; pChild = pChild->prevSib) in compPaintChildrenToWindow()
746 pWin->damagedDescendants = FALSE; in compPaintChildrenToWindow()
753 CompScreenPtr cs; in CompositeRealChildHead() local
755 if (!pWin->parent && in CompositeRealChildHead()
757 (HasSaverWindow(pWin->drawable.pScreen))) { in CompositeRealChildHead()
760 pChildBefore = pWin->firstChild; in CompositeRealChildHead()
761 pChild = pChildBefore->nextSib; in CompositeRealChildHead()
766 pChild = pWin->firstChild; in CompositeRealChildHead()
773 cs = GetCompScreen(pWin->drawable.pScreen); in CompositeRealChildHead()
774 if (pChild == cs->pOverlayWin) { in CompositeRealChildHead()
783 compConfigNotify(WindowPtr pWin, int x, int y, int w, int h, in compConfigNotify() argument
786 ScreenPtr pScreen = pWin->drawable.pScreen; in compConfigNotify()
787 CompScreenPtr cs = GetCompScreen(pScreen); in compConfigNotify() local
789 WindowPtr pParent = pWin->parent; in compConfigNotify()
793 if (cs->ConfigNotify) { in compConfigNotify()
794 pScreen->ConfigNotify = cs->ConfigNotify; in compConfigNotify()
795 ret = (*pScreen->ConfigNotify) (pWin, x, y, w, h, bw, pSib); in compConfigNotify()
796 cs->ConfigNotify = pScreen->ConfigNotify; in compConfigNotify()
797 pScreen->ConfigNotify = compConfigNotify; in compConfigNotify()
803 if (pWin->redirectDraw == RedirectDrawNone) in compConfigNotify()
808 draw_x = pParent->drawable.x + x + bw; in compConfigNotify()
809 draw_y = pParent->drawable.y + y + bw; in compConfigNotify()