Compute client area from buffer size and update regions on buffer update

Merged Olivier Fourdan requested to merge ofourdan/mutter:issue1007 into master

Commit 7dbb4bc3 cached the client area when the client was frozen.

This is not sufficient though, because the buffer size might still be lagging waiting for the buffer from Xwayland to be committed.

So instead of caching the client size from the expected size, deduce the client area rectangle from the buffer size, like we did for the frame bounds in commit 1ce933e2.

This partly reverts commit 7dbb4bc3 - "window-actor/x11: Cache the client area"

Another problem reported in #1007 (closed) is that client-side decorated windows running on X11 would shows black areas sometimes while resizing.

This is because the opaque region of X11 clients get updated fro ma EWMH window property and therefore might happen at a different time the actual buffer is updated by Xwayland.

To fix that issue, we would update the various regions only when the texture of the window actor is eventually set, to get closer to an atomic update of all regions and content.

#1007 (closed)

Edited by Olivier Fourdan

Merge request reports