Fix a couple more possible errors with input-only windows
Using type == DRAWABLE_WINDOW to differentiate between pixmaps and windows isn't sufficient as input-only windows will end up in the pixmap case. This patch changes a few more code paths to use WindowDrawable instead. Signed-off-by: Keith Packard <keithp@keithp.com> Reviewed-by: Jamey Sharp <jamey@minilop.net>
This commit is contained in:
parent
07a093add0
commit
a8ec9eca85
|
@ -557,7 +557,7 @@ int PanoramiXGetGeometry(ClientPtr client)
|
|||
rep.width = root->pixWidth;
|
||||
rep.height = root->pixHeight;
|
||||
} else
|
||||
if ((pDraw->type == UNDRAWABLE_WINDOW) || (pDraw->type == DRAWABLE_WINDOW))
|
||||
if (WindowDrawable(pDraw->type))
|
||||
{
|
||||
WindowPtr pWin = (WindowPtr)pDraw;
|
||||
rep.x = pWin->origin.x - wBorderWidth (pWin);
|
||||
|
|
|
@ -19,7 +19,7 @@ is" without express or implied warranty.
|
|||
#include "XNPixmap.h"
|
||||
|
||||
#define xnestDrawable(pDrawable) \
|
||||
((pDrawable)->type == DRAWABLE_WINDOW ? \
|
||||
(WindowDrawable((pDrawable)->type) ? \
|
||||
xnestWindow((WindowPtr)pDrawable) : \
|
||||
xnestPixmap((PixmapPtr)pDrawable))
|
||||
|
||||
|
|
|
@ -84,7 +84,7 @@ getDrawableDamageRef (DrawablePtr pDrawable)
|
|||
{
|
||||
PixmapPtr pPixmap;
|
||||
|
||||
if (pDrawable->type == DRAWABLE_WINDOW)
|
||||
if (WindowDrawable(pDrawable->type))
|
||||
{
|
||||
ScreenPtr pScreen = pDrawable->pScreen;
|
||||
|
||||
|
@ -300,7 +300,7 @@ damageRegionAppend (DrawablePtr pDrawable, RegionPtr pRegion, Bool clip,
|
|||
* Need to move everyone to screen coordinates
|
||||
* XXX what about off-screen pixmaps with non-zero x/y?
|
||||
*/
|
||||
if (pDamage->pDrawable->type != DRAWABLE_WINDOW)
|
||||
if (!WindowDrawable(pDamage->pDrawable->type))
|
||||
{
|
||||
draw_x += ((PixmapPtr) pDamage->pDrawable)->screen_x;
|
||||
draw_y += ((PixmapPtr) pDamage->pDrawable)->screen_y;
|
||||
|
|
Loading…
Reference in New Issue
Block a user