hw/xwin: Minimize redraw events after resizing/moving windows in multiwindow mode
authorOliver Schmidt <oschmidt-mailinglists@gmx.de>
Wed, 7 Sep 2011 13:00:56 +0000 (14:00 +0100)
committerJon TURNEY <jon.turney@dronecode.org.uk>
Sat, 22 Mar 2014 18:56:38 +0000 (18:56 +0000)
commit3b4d472b72601922bac264283eb6b611d8d524fc
treeae3d15095149763c351d192438705ffc411a25c4
parent03e1cc6f250a3f5cf17b34639adbbc9850c681cd
hw/xwin: Minimize redraw events after resizing/moving windows in multiwindow mode

In multiwindow mode the modal moving/resizing of windows causes a lot of redraw
events to be sent to the X clients after the user releases the mouse button.
During the moving/resizing client windows are not redrawn as long as the mouse
button is pressed, but all redraw/resizing events are queued and executed step
after step after the moving/resizing ends.

Some clients collect and combine multiple redraw or resizing events, other
clients (e.g. xterm) simply execute each redraw or sizing event.

The enclosed patch minimizes the events for clients to only one event after the
user releases the mouse button to end the moving/resizing. This improves the
user experience and reduces strange screen flickerings, especially on slow
platforms.

The enclosed patch modifies winmultiwindowwndproc.c such that the windows events
WM_ENTERSIZEMOVE and WM_EXITSIZEMOVE that are sent by Windows when the modal
window resizing/moving begins or ends are considered. Only after WM_EXITSIZEMOVE
is the redraw/resizing executed.

Signed-off-by: Oliver Schmidt <oschmidt-mailinglists@gmx.de>
Reviewed-by: Jon TURNEY <jon.turney@dronecode.org.uk>
Reviewed-by: Colin Harrison <colin.harrison@virgin.net>
hw/xwin/winmultiwindowwndproc.c