window: fix resizing of windows backed by shm buffers
authorAnder Conselvan de Oliveira <ander.conselvan.de.oliveira@intel.com>
Fri, 27 Jan 2012 15:17:39 +0000 (17:17 +0200)
committerKristian Høgsberg <krh@bitplanet.net>
Fri, 27 Jan 2012 16:17:13 +0000 (11:17 -0500)
commite018b04c40a653f1aa8d0d326270b43e5ef0457b
tree51536b169e4785ee5fea916e0dd676081d9d08d5
parent42c8f60506aec8ace5fa295d6f45b153ff3b0fb7
window: fix resizing of windows backed by shm buffers

When window_attach_surface() calls window_get_resize_dx_dy(),
window->resize_edges is cleared. However if there is already a pending
surface to be attached, the resize won't be done until the following
call to window_attach_surface(). In this next call, since resize_edges
is now zero, the top-left corner of the window will be unchanged. If
the user is resizing from the top or left border, this causes the
resize to happen in the wrong direction.

This patch changes window_attach_surface() to call
window_get_resize_dx_dy() only if an attach will actually happen.

Signed-off-by: Ander Conselvan de Oliveira <ander.conselvan.de.oliveira@intel.com>
clients/window.c