From 789cf3ed846045d91f950cb177ef6bae4c8966fc Mon Sep 17 00:00:00 2001 From: Eric Anholt Date: Thu, 12 Aug 2004 07:57:03 +0000 Subject: [PATCH] Fix some issues reported by deronj: - Hopefully fix a crash in compCheckRedirect on unrealizing windows. - Remove an extern that doesn't point at anything. --- composite/compint.h | 2 -- composite/compwindow.c | 5 ++++- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/composite/compint.h b/composite/compint.h index 43a2f4be5..80496da30 100644 --- a/composite/compint.h +++ b/composite/compint.h @@ -75,8 +75,6 @@ typedef struct _CompSubwindows { CompClientWindowPtr clients; } CompSubwindowsRec, *CompSubwindowsPtr; -extern int CompPixmapPrivateIndex; - #define NUM_COMP_ALTERNATE_VISUALS 2 typedef struct _CompScreen { diff --git a/composite/compwindow.c b/composite/compwindow.c index 5adc5efc8..29883666e 100644 --- a/composite/compwindow.c +++ b/composite/compwindow.c @@ -103,7 +103,10 @@ Bool compCheckRedirect (WindowPtr pWin) { CompWindowPtr cw = GetCompWindow (pWin); - Bool should = pWin->viewable && (cw != NULL); + Bool should; + + should = pWin->realized && (pWin->drawable.class != InputOnly) && + (cw != NULL); if (should != pWin->redirectDraw) {