damage: Validate source pictures bound to windows before unwrapping
The lower layers also do this, but no damage may be reported there, since we unwrap before calling down. Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=99220 Signed-off-by: Michel Dänzer <michel.daenzer@amd.com> Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
This commit is contained in:
		
							parent
							
								
									1c78bec9ca
								
							
						
					
					
						commit
						38696ea568
					
				| 
						 | 
				
			
			@ -1847,7 +1847,7 @@ if test "x$XNEST" = xyes; then
 | 
			
		|||
	if test "x$have_xnest" = xno; then
 | 
			
		||||
		AC_MSG_ERROR([Xnest build explicitly requested, but required modules not found.])
 | 
			
		||||
	fi
 | 
			
		||||
	XNEST_LIBS="$FB_LIB $FIXES_LIB $MI_LIB $XEXT_LIB $DBE_LIB $RECORD_LIB $GLX_LIBS $RANDR_LIB $RENDER_LIB $DAMAGE_LIB  $DRI3_LIB $PRESENT_LIB $MIEXT_SYNC_LIB $MIEXT_DAMAGE_LIB $MIEXT_SHADOW_LIB $XI_LIB $XKB_LIB $XKB_STUB_LIB $COMPOSITE_LIB $MAIN_LIB $DIX_LIB $OS_LIB"
 | 
			
		||||
	XNEST_LIBS="$FB_LIB $FIXES_LIB $MI_LIB $XEXT_LIB $DBE_LIB $RECORD_LIB $GLX_LIBS $RANDR_LIB $DAMAGE_LIB  $DRI3_LIB $PRESENT_LIB $MIEXT_SYNC_LIB $MIEXT_DAMAGE_LIB $RENDER_LIB $MIEXT_SHADOW_LIB $XI_LIB $XKB_LIB $XKB_STUB_LIB $COMPOSITE_LIB $MAIN_LIB $DIX_LIB $OS_LIB"
 | 
			
		||||
	XNEST_SYS_LIBS="$XNESTMODULES_LIBS $GLX_SYS_LIBS"
 | 
			
		||||
	AC_SUBST([XNEST_LIBS])
 | 
			
		||||
	AC_SUBST([XNEST_SYS_LIBS])
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -34,6 +34,7 @@
 | 
			
		|||
#include    <X11/fonts/fontstruct.h>
 | 
			
		||||
#include    <X11/fonts/libxfont2.h>
 | 
			
		||||
#include    "mi.h"
 | 
			
		||||
#include    "mipict.h"
 | 
			
		||||
#include    "regionstr.h"
 | 
			
		||||
#include    "globals.h"
 | 
			
		||||
#include    "gcstruct.h"
 | 
			
		||||
| 
						 | 
				
			
			@ -499,6 +500,15 @@ damageComposite(CARD8 op,
 | 
			
		|||
        if (BOX_NOT_EMPTY(box))
 | 
			
		||||
            damageDamageBox(pDst->pDrawable, &box, pDst->subWindowMode);
 | 
			
		||||
    }
 | 
			
		||||
    /*
 | 
			
		||||
     * Validating a source picture bound to a window may trigger other
 | 
			
		||||
     * composite operations. Do it before unwrapping to make sure damage
 | 
			
		||||
     * is reported correctly.
 | 
			
		||||
     */
 | 
			
		||||
    if (pSrc->pDrawable && WindowDrawable(pSrc->pDrawable->type))
 | 
			
		||||
        miCompositeSourceValidate(pSrc);
 | 
			
		||||
    if (pMask && pMask->pDrawable && WindowDrawable(pMask->pDrawable->type))
 | 
			
		||||
        miCompositeSourceValidate(pMask);
 | 
			
		||||
    unwrap(pScrPriv, ps, Composite);
 | 
			
		||||
    (*ps->Composite) (op,
 | 
			
		||||
                      pSrc,
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
		Reference in New Issue