diff options
author | Adam Jackson <ajax@redhat.com> | 2011-01-20 23:49:56 -0500 |
---|---|---|
committer | Adam Jackson <ajax@redhat.com> | 2011-03-15 10:44:28 -0400 |
commit | 945647f7f68f45abc4e7085e02ecc1adb07fa5fa (patch) | |
tree | 044074d10724e4a3eccf23f9ee67462c4f90f7c3 | |
parent | 07588eab899a3be7f07ceb95e1f5c2e02629f3c9 (diff) |
dix: Make InputOnly window checking more consistentvixmap-groundwork
Remove the UNDRAWABLE_WINDOW macro (which was just needlessly cute) and
always check ->class to decide if a window is InputOnly or InputOutput.
->type is now always either window or pixmap.
Signed-off-by: Adam Jackson <ajax@redhat.com>
-rw-r--r-- | dix/dispatch.c | 3 | ||||
-rw-r--r-- | dix/window.c | 2 | ||||
-rw-r--r-- | include/pixmap.h | 7 | ||||
-rw-r--r-- | mi/miexpose.c | 2 |
4 files changed, 5 insertions, 9 deletions
diff --git a/dix/dispatch.c b/dix/dispatch.c index 321bb92af..0fda232a9 100644 --- a/dix/dispatch.c +++ b/dix/dispatch.c @@ -3048,7 +3048,8 @@ ProcQueryBestSize (ClientPtr client) rc = dixLookupDrawable(&pDraw, stuff->drawable, client, DixGetAttrAccess); if (rc != Success) return rc; - if (stuff->class != CursorShape && pDraw->type == UNDRAWABLE_WINDOW) + if (stuff->class != CursorShape && pDraw->type == DRAWABLE_WINDOW && + pDraw->class == InputOnly) return BadMatch; pScreen = pDraw->pScreen; rc = XaceHook(XACE_SCREEN_ACCESS, client, pScreen, DixGetAttrAccess); diff --git a/dix/window.c b/dix/window.c index 9be70649a..f18c33e95 100644 --- a/dix/window.c +++ b/dix/window.c @@ -654,8 +654,6 @@ CreateWindow(Window wid, WindowPtr pParent, int x, int y, unsigned w, ; pWin->drawable.bitsPerPixel = format->bitsPerPixel; } - if (class == InputOnly) - pWin->drawable.type = (short) UNDRAWABLE_WINDOW; pWin->drawable.serialNumber = NEXT_SERIAL_NUMBER; pWin->drawable.id = wid; diff --git a/include/pixmap.h b/include/pixmap.h index b29c2560e..29038e5af 100644 --- a/include/pixmap.h +++ b/include/pixmap.h @@ -54,7 +54,6 @@ SOFTWARE. /* types for Drawable */ #define DRAWABLE_WINDOW 0 #define DRAWABLE_PIXMAP 1 -#define UNDRAWABLE_WINDOW 2 /* flags to PaintWindow() */ #define PW_BACKGROUND 0 @@ -76,11 +75,9 @@ typedef union _PixUnion { #define EqualPixUnion(as, a, bs, b) \ ((as) == (bs) && (SamePixUnion (a, b, as))) -#define OnScreenDrawable(type) \ - (type == DRAWABLE_WINDOW) +#define OnScreenDrawable(type) (type == DRAWABLE_WINDOW) -#define WindowDrawable(type) \ - ((type == DRAWABLE_WINDOW) || (type == UNDRAWABLE_WINDOW)) +#define WindowDrawable(type) (type == DRAWABLE_WINDOW) extern _X_EXPORT PixmapPtr GetScratchPixmapHeader( ScreenPtr /*pScreen*/, diff --git a/mi/miexpose.c b/mi/miexpose.c index 94258b864..ee4590d90 100644 --- a/mi/miexpose.c +++ b/mi/miexpose.c @@ -549,7 +549,7 @@ miPaintWindow(WindowPtr pWin, RegionPtr prgn, int what) DrawablePtr drawable = &pWin->drawable; #ifdef ROOTLESS - if(!drawable || drawable->type == UNDRAWABLE_WINDOW) + if(!drawable || pWin->class == InputOnly) return; if(IsFramedWindow(pWin)) { |