OSDN Git Service

hw/display/artist: Mouse cursor fixes for HP-UX
authorHelge Deller <deller@gmx.de>
Wed, 5 Jan 2022 22:06:12 +0000 (23:06 +0100)
committerHelge Deller <deller@gmx.de>
Wed, 2 Feb 2022 17:46:44 +0000 (18:46 +0100)
commit3615cea4714f94d1db61bd6618a3a66a6b014f9d
treea8ad7c4e60c922858f2cf15975b59accb6df70be
parent3b21d998a12b380c590f1005343ab95e2d6a7669
hw/display/artist: Mouse cursor fixes for HP-UX

This patch fix the behaviour and positioning of the X11 mouse cursor in HP-UX.

The current code missed to subtract the offset of the CURSOR_CTRL register from
the current mouse cursor position. The HP-UX graphics driver stores in this
register the offset of the mouse graphics compared to the current cursor
position.  Without this adjustment the mouse behaves strange at the screen
borders.

Additionally, depending on the HP-UX version, the mouse cursor position
in the cursor_pos register reports different values. To accommodate this
track the current min and max reported values and auto-adjust at runtime.

With this fix the mouse now behaves as expected on HP-UX 10 and 11.

Signed-off-by: Helge Deller <deller@gmx.de>
Cc: qemu-stable@nongnu.org
Signed-off-by: Helge Deller <deller@gmx.de>
hw/display/artist.c