window: Don't needlessly sync parent and geometry
authorOndřej Majerech <majerech.o@gmail.com>
Sat, 13 Sep 2014 14:35:45 +0000 (16:35 +0200)
committerPekka Paalanen <pekka.paalanen@collabora.co.uk>
Mon, 15 Sep 2014 08:22:05 +0000 (11:22 +0300)
commitb2c18647775732da740946eb199b1f2b46ba950b
treecb35eccd871d31fcb6c024ca870753a1450a719b
parentf1d2cc0d149cb84006dc26fddd0142b7180f7c34
window: Don't needlessly sync parent and geometry

When a toytoolkit client redraws, the toolkit syncs the parent and
geometry. If a client redraws often (such as the terminal drawing a huge
amount of output), this can spam the compositor with requests and may
result in the client's eventual being killed.

We don't need to send requests for changing the geometry or parent if
these haven't changed. So remember the last geometry and parent, and
update them only if needed.

Bug: https://bugs.freedesktop.org/show_bug.cgi?id=83297
Signed-off-by: Ondřej Majerech <majerech.o@gmail.com>
Reviewed-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
clients/window.c