Bug 2469 - XDamage extension over-reports window damage
Summary: XDamage extension over-reports window damage
Status: RESOLVED FIXED
Alias: None
Product: xorg
Classification: Unclassified
Component: Server/General (show other bugs)
Version: 6.8.1
Hardware: x86 (IA32) FreeBSD
: high enhancement
Assignee: Xorg Project Team
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2005-02-04 08:05 UTC by Jonathan Lennox
Modified: 2005-06-08 03:02 UTC (History)
2 users (show)

See Also:
i915 platform:
i915 features:


Attachments
Patch to xc/programs/Xserver/miext/damage/damage.c to perform clipping (11.85 KB, patch)
2005-02-04 08:15 UTC, Jonathan Lennox
no flags Details | Splinter Review

Description Jonathan Lennox 2005-02-04 08:05:50 UTC
The XDamage extension reports damage rectangles that cover areas which a) aren't
damaged, or b) aren't visible.

First of all, Xdamage reports damage if a window *obscured* by the one I'm
monitoring is drawn to.  E.g., if I have output going to an XTerm that is
partially obscured by the window I'm monitoring, the area of my window that
covers the XTerm continually gets damage reports.

Secondly, when a window manager redraws its window trim (for example, when I
enter or leave a window in fvwm), damage is reported for the entire window area,
not just for the window manager's trim.

Both of these can be solved by clipping damage reports based on the drawable's
clipping regions and the relevant GC's subWindowMode.  Patch to follow.
Comment 1 Jonathan Lennox 2005-02-04 08:15:18 UTC
Created attachment 1832 [details] [review]
Patch to xc/programs/Xserver/miext/damage/damage.c to perform clipping

As promised, here's the patch to clip windows.	It doesn't do clipping for
windows with backing store enabled, or in cases where there's no obvious
relevant GC or Picture with a subWindowMode.

As a side effect, the patch also avoids some compiler warnings when
DAMAGE_DEBUG_ENABLE is true, by constifying the type of the 'where' argument to
_damageDamageRegion and _damageDamageBox.
Comment 2 Adam Jackson 2005-03-30 14:10:56 UTC
i've been running this for a few days now and it seems at least as correct as
without.  any other reports?
Comment 3 Adam Jackson 2005-06-08 20:02:49 UTC
well it sure isn't getting tested just sitting here.  applied, thanks!


Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.