[PATCH 1/7] dix: unifdef pWin->rootlessUnhittable

Adam Jackson ajax at redhat.com
Thu Oct 17 10:30:07 PDT 2013


No reason to vary the dix ABI over this.

Reviewed-by: Jasper St. Pierre <jstpierre at mecheye.net>
Signed-off-by: Adam Jackson <ajax at redhat.com>
---
 dix/events.c                    | 13 +++++--------
 dix/window.c                    |  5 +----
 include/windowstr.h             |  4 +---
 miext/rootless/rootlessWindow.c |  8 ++++----
 4 files changed, 11 insertions(+), 19 deletions(-)

diff --git a/dix/events.c b/dix/events.c
index 7a1b1c3..fb7e93c 100644
--- a/dix/events.c
+++ b/dix/events.c
@@ -2846,18 +2846,15 @@ XYToWindow(SpritePtr pSprite, int x, int y)
              * borderSize
              */
             && (!wBoundingShape(pWin) || PointInBorderSize(pWin, x, y))
-            && (!wInputShape(pWin) ||
-                RegionContainsPoint(wInputShape(pWin),
-                                    x - pWin->drawable.x,
-                                    y - pWin->drawable.y, &box))
-#ifdef ROOTLESS
             /* In rootless mode windows may be offscreen, even when
              * they're in X's stack. (E.g. if the native window system
              * implements some form of virtual desktop system).
              */
-            && !pWin->rootlessUnhittable
-#endif
-            ) {
+            && !pWin->unhittable
+            && (!wInputShape(pWin) ||
+                RegionContainsPoint(wInputShape(pWin),
+                                    x - pWin->drawable.x,
+                                    y - pWin->drawable.y, &box))) {
             if (pSprite->spriteTraceGood >= pSprite->spriteTraceSize) {
                 pSprite->spriteTraceSize += 10;
                 pSprite->spriteTrace = realloc(pSprite->spriteTrace,
diff --git a/dix/window.c b/dix/window.c
index cff341b..f921f2c 100644
--- a/dix/window.c
+++ b/dix/window.c
@@ -381,10 +381,7 @@ SetWindowToDefaults(WindowPtr pWin)
     pWin->forcedBS = FALSE;
     pWin->redirectDraw = RedirectDrawNone;
     pWin->forcedBG = FALSE;
-
-#ifdef ROOTLESS
-    pWin->rootlessUnhittable = FALSE;
-#endif
+    pWin->unhittable = FALSE;
 
 #ifdef COMPOSITE
     pWin->damagedDescendants = FALSE;
diff --git a/include/windowstr.h b/include/windowstr.h
index a1e608f..4a80b1a 100644
--- a/include/windowstr.h
+++ b/include/windowstr.h
@@ -163,9 +163,7 @@ typedef struct _Window {
     unsigned forcedBS:1;        /* system-supplied backingStore */
     unsigned redirectDraw:2;    /* COMPOSITE rendering redirect */
     unsigned forcedBG:1;        /* must have an opaque background */
-#ifdef ROOTLESS
-    unsigned rootlessUnhittable:1;      /* doesn't hit-test */
-#endif
+    unsigned unhittable:1;      /* doesn't hit-test, for rootless */
 #ifdef COMPOSITE
     unsigned damagedDescendants:1;      /* some descendants are damaged */
     unsigned inhibitBGPaint:1;  /* paint the background? */
diff --git a/miext/rootless/rootlessWindow.c b/miext/rootless/rootlessWindow.c
index 7e3c281..a470df1 100644
--- a/miext/rootless/rootlessWindow.c
+++ b/miext/rootless/rootlessWindow.c
@@ -92,7 +92,7 @@ RootlessNativeWindowStateChanged(WindowPtr pWin, unsigned int state)
 
     winRec->is_offscreen = ((state & XP_WINDOW_STATE_OFFSCREEN) != 0);
     winRec->is_obscured = ((state & XP_WINDOW_STATE_OBSCURED) != 0);
-    pWin->rootlessUnhittable = winRec->is_offscreen;
+    pWin->unhittable = winRec->is_offscreen;
 }
 
 void
@@ -569,7 +569,7 @@ RootlessReorderWindow(WindowPtr pWin)
         newPrevW = pWin->prevSib;
         while (newPrevW &&
                (WINREC(newPrevW) == NULL || !newPrevW->realized ||
-                newPrevW->rootlessUnhittable != pWin->rootlessUnhittable))
+                newPrevW->unhittable != pWin->unhittable))
             newPrevW = newPrevW->prevSib;
 
         newPrev = newPrevW != NULL ? WINREC(newPrevW) : NULL;
@@ -1365,7 +1365,7 @@ RootlessReparentWindow(WindowPtr pWin, WindowPtr pPriorParent)
     pTopWin = TopLevelParent(pWin);
     assert(pTopWin != pWin);
 
-    pWin->rootlessUnhittable = FALSE;
+    pWin->unhittable = FALSE;
 
     DeleteProperty(serverClient, pWin, xa_native_window_id());
 
@@ -1503,7 +1503,7 @@ RootlessOrderAllWindows(Bool include_unhitable)
                 continue;
             if (RootlessEnsureFrame(pWin) == NULL)
                 continue;
-            if (!include_unhitable && pWin->rootlessUnhittable)
+            if (!include_unhitable && pWin->unhittable)
                 continue;
             RootlessReorderWindow(pWin);
         }
-- 
1.8.3.1



More information about the xorg-devel mailing list