]> rtime.felk.cvut.cz Git - lisovros/qemu_apohw.git/commit
Fix SIGFPE for vnc display of width/height = 1
authorChris Webb <chris@arachsys.com>
Mon, 8 Mar 2010 14:34:49 +0000 (14:34 +0000)
committerAurelien Jarno <aurelien@aurel32.net>
Sun, 11 Apr 2010 11:34:43 +0000 (13:34 +0200)
commit09e96924ec55eb0f1288ac44b271261055ed0657
tree4acd64e3dd7b55ee24707aedb055c1bc41be8dcf
parent69ff4e9dbde494b1e8752606b0820f04344caeb1
Fix SIGFPE for vnc display of width/height = 1

During boot, the screen gets resized to height 1 and a mouse click at this
point will cause a division by zero when calculating the absolute pointer
position from the pixel (x, y). Return a click in the middle of the screen
instead in this case.

Signed-off-by: Chris Webb <chris@arachsys.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
(cherry picked from commit cc39a92cbfc80c70d2b83708a4c9b309c3126ac3)
vnc.c