[PATCH 25/37] mi: Mark/validate based on paintable not viewable

Adam Jackson ajax at redhat.com
Wed Oct 8 08:04:49 PDT 2014


Signed-off-by: Adam Jackson <ajax at redhat.com>
---
 mi/miwindow.c | 20 ++++++++++----------
 1 file changed, 10 insertions(+), 10 deletions(-)

diff --git a/mi/miwindow.c b/mi/miwindow.c
index 5d54ae2..0b4b055 100644
--- a/mi/miwindow.c
+++ b/mi/miwindow.c
@@ -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