[PATCH 3/8] mi: Mark/validate based on paintable not viewable
Adam Jackson
ajax at redhat.com
Wed Feb 25 13:03:09 PST 2015
Reviewed-by: Keith Packard <keithp at keithp.com>
Signed-off-by: Adam Jackson <ajax at redhat.com>
---
mi/miwindow.c | 30 +++++++++++++++---------------
1 file changed, 15 insertions(+), 15 deletions(-)
diff --git a/mi/miwindow.c b/mi/miwindow.c
index a1af3a7..486c9bf 100644
--- a/mi/miwindow.c
+++ b/mi/miwindow.c
@@ -151,7 +151,7 @@ miMarkOverlappedWindows(WindowPtr pWin, WindowPtr pFirst, WindowPtr *ppLayerWin)
*/
pChild = pWin;
while (1) {
- if (pChild->viewable) {
+ if (pChild->paintable) {
if (RegionBroken(&pChild->winSize))
SetWinSize(pChild);
if (RegionBroken(&pChild->borderSize))
@@ -175,7 +175,7 @@ miMarkOverlappedWindows(WindowPtr pWin, WindowPtr pFirst, WindowPtr *ppLayerWin)
box = RegionExtents(&pWin->borderSize);
pLast = pChild->parent->lastChild;
while (1) {
- if (pChild->viewable) {
+ if (pChild->paintable) {
if (RegionBroken(&pChild->winSize))
SetWinSize(pChild);
if (RegionBroken(&pChild->borderSize))
@@ -242,7 +242,7 @@ void
miMoveWindow(WindowPtr pWin, int x, int y, WindowPtr pNextSib, VTKind kind)
{
WindowPtr pParent;
- Bool WasViewable = (Bool) (pWin->viewable);
+ Bool WasPaintable = pWin->paintable;
short bw;
RegionPtr oldRegion = NULL;
DDXPointRec oldpt;
@@ -259,7 +259,7 @@ miMoveWindow(WindowPtr pWin, int x, int y, WindowPtr pNextSib, VTKind kind)
oldpt.x = pWin->drawable.x;
oldpt.y = pWin->drawable.y;
- if (WasViewable) {
+ if (WasPaintable) {
oldRegion = RegionCreate(NullBox, 1);
RegionCopy(oldRegion, &pWin->borderClip);
anyMarked = (*pScreen->MarkOverlappedWindows) (pWin, pWin, &pLayerWin);
@@ -278,7 +278,7 @@ miMoveWindow(WindowPtr pWin, int x, int y, WindowPtr pNextSib, VTKind kind)
ResizeChildrenWinSize(pWin, x - oldpt.x, y - oldpt.y, 0, 0);
- if (WasViewable) {
+ if (WasPaintable) {
if (pLayerWin == pWin)
anyMarked |= (*pScreen->MarkOverlappedWindows)
(pWin, windowToValidate, NULL);
@@ -341,7 +341,7 @@ miResizeWindow(WindowPtr pWin, int x, int y, unsigned int w, unsigned int h,
WindowPtr pSib)
{
WindowPtr pParent;
- Bool WasViewable = (Bool) (pWin->viewable);
+ Bool WasPaintable = pWin->paintable;
unsigned short width = pWin->drawable.width, height = pWin->drawable.height;
short oldx = pWin->drawable.x, oldy = pWin->drawable.y;
int bw = wBorderWidth(pWin);
@@ -371,7 +371,7 @@ miResizeWindow(WindowPtr pWin, int x, int y, unsigned int w, unsigned int h,
pScreen = pWin->drawable.pScreen;
newx = pParent->drawable.x + x + bw;
newy = pParent->drawable.y + y + bw;
- if (WasViewable) {
+ if (WasPaintable) {
anyMarked = FALSE;
/*
* save the visible region of the window
@@ -446,7 +446,7 @@ miResizeWindow(WindowPtr pWin, int x, int y, unsigned int w, unsigned int h,
pFirstChange = MoveWindowInStack(pWin, pSib);
- if (WasViewable) {
+ if (WasPaintable) {
pRegion = RegionCreate(NullBox, 1);
if (pLayerWin == pWin)
@@ -472,7 +472,7 @@ miResizeWindow(WindowPtr pWin, int x, int y, unsigned int w, unsigned int h,
GravityTranslate(x, y, oldx, oldy, dw, dh, pWin->bitGravity, &nx, &ny);
- if (WasViewable) {
+ if (WasPaintable) {
/* avoid the border */
if (HasBorder(pWin)) {
int offx, offy, dx, dy;
@@ -634,13 +634,13 @@ miGetLayerWindow(WindowPtr pWin)
void
miSetShape(WindowPtr pWin, int kind)
{
- Bool WasViewable = (Bool) (pWin->viewable);
+ Bool WasPaintable = pWin->paintable;
ScreenPtr pScreen = pWin->drawable.pScreen;
Bool anyMarked = FALSE;
WindowPtr pLayerWin;
if (kind != ShapeInput) {
- if (WasViewable) {
+ if (WasPaintable) {
anyMarked = (*pScreen->MarkOverlappedWindows) (pWin, pWin,
&pLayerWin);
if (pWin->valdata) {
@@ -661,7 +661,7 @@ miSetShape(WindowPtr pWin, int kind)
ResizeChildrenWinSize(pWin, 0, 0, 0, 0);
- if (WasViewable) {
+ if (WasPaintable) {
anyMarked |= (*pScreen->MarkOverlappedWindows) (pWin, pWin, NULL);
if (anyMarked) {
@@ -687,7 +687,7 @@ miChangeBorderWidth(WindowPtr pWin, unsigned int width)
int oldwidth;
Bool anyMarked = FALSE;
ScreenPtr pScreen;
- Bool WasViewable = (Bool) (pWin->viewable);
+ Bool WasPaintable = pWin->paintable;
Bool HadBorder;
WindowPtr pLayerWin;
@@ -696,13 +696,13 @@ miChangeBorderWidth(WindowPtr pWin, unsigned int width)
return;
HadBorder = HasBorder(pWin);
pScreen = pWin->drawable.pScreen;
- if (WasViewable && width < oldwidth)
+ if (WasPaintable && width < oldwidth)
anyMarked = (*pScreen->MarkOverlappedWindows) (pWin, pWin, &pLayerWin);
pWin->borderWidth = width;
SetBorderSize(pWin);
- if (WasViewable) {
+ if (WasPaintable) {
if (width > oldwidth) {
anyMarked = (*pScreen->MarkOverlappedWindows) (pWin, pWin,
&pLayerWin);
--
1.9.3
More information about the xorg-devel
mailing list