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.
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.
i've been running this for a few days now and it seems at least as correct as without. any other reports?
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.