randr: Round x monitor coordinates to a multiple of 8
commit1e0f8b57d6934809c220eea601c148c0a17e1c36
authorHans de Goede <hdegoede@redhat.com>
Mon, 7 Jan 2013 14:11:14 +0000 (7 15:11 +0100)
committerHans de Goede <hdegoede@redhat.com>
Mon, 7 Jan 2013 18:59:18 +0000 (7 19:59 +0100)
treeaa9f5e7b21f9296d01b933360e8f31ceff7de35b
parentf77fad3ddf9dba0a3254d88f009d8336ef43825f
randr: Round x monitor coordinates to a multiple of 8

We already do this when comparing new received monitor settings from the
client with the current ones, since the X-server rounds the width / x
coordinates to a multiple of 8 when we set them. Currently what happens is:
1) We get a monitor-config with a non multiple 8 width
2) We set the crtc to this width
3) We set the screen to this width
4) We configure the uinput tablet with this width
5) The X-server adjusts things to a multiple of 8
6) We re-configure the uinput tablet with the new width

By rounding the width and x coordinates before applying them we safe all
this back and forth to the X-server.

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
src/vdagent-x11-randr.c