Optimize window repainting area
Currently, DamageReportNonEmpty is used but this is not efficient as it reports the full window area. Instead, DamageReportRawRectangles should be used to get the real damaged area. This should dramatically improve repainting.
Optimize window repainting area (closes: #26).
Before, DamageReportNonEmpty was used but this was not efficient at all as it
just reports a single DamageNotify event each time the damage rectangle
changes from empty to non-empty, meaning that the damaged area will be the
Instead, use DamageReportRawRectangles to get the real damaged area of a
window. This also makes check whether a window is fully damaged more useful.
Use DamageReportDeltaRectangles to avoid being flooded with DamageNotify (refs: #26).
With DamageReportRawRectangles level, no attempt to compress out overlapping
rectangles is made, therefore many events are received and handled needlessly
(according to a test, 3 times more events are received on the same test).
Whereas with DamageReportNonEmpty level only a single event specifying the
full window region is sent thus this is not efficient for small damage