]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
drm/qxl: fix cursor position with non-zero hotspot
authorJohn Keeping <john@metanate.com>
Wed, 18 Nov 2015 11:17:25 +0000 (11:17 +0000)
committerSasha Levin <sasha.levin@oracle.com>
Wed, 20 Apr 2016 05:03:42 +0000 (01:03 -0400)
commit6b659bbd154edee7a34aedebc925dc611922e472
tree34aa2cf40e532e9be11c237d8669b6b94f67515d
parent5c059995372c2861bb71cd761fc50cf773015d14
drm/qxl: fix cursor position with non-zero hotspot

[ Upstream commit d59a1f71ff1aeda4b4630df92d3ad4e3b1dfc885 ]

The SPICE protocol considers the position of a cursor to be the location
of its active pixel on the display, so the cursor is drawn with its
top-left corner at "(x - hot_spot_x, y - hot_spot_y)" but the DRM cursor
position gives the location where the top-left corner should be drawn,
with the hotspot being a hint for drivers that need it.

This fixes the location of the window resize cursors when using Fluxbox
with the QXL DRM driver and both the QXL and modesetting X drivers.

Signed-off-by: John Keeping <john@metanate.com>
Reviewed-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Cc: stable@vger.kernel.org
Link: http://patchwork.freedesktop.org/patch/msgid/1447845445-2116-1-git-send-email-john@metanate.com
Signed-off-by: Jani Nikula <jani.nikula@intel.com>
Signed-off-by: Sasha Levin <sasha.levin@oracle.com>
drivers/gpu/drm/qxl/qxl_display.c
drivers/gpu/drm/qxl/qxl_drv.h