mirror of
https://gitlab.freedesktop.org/wlroots/wlroots.git
synced 2026-03-29 07:58:24 -04:00
drm/backend: add support for cursor hotspots
Enables DRM_CLIENT_CAP_CURSOR_PLANE_HOTSPOT and sets the cursor hotspots on the cursor plane so virtualized drivers can accelerate mouse movement. Closes: https://gitlab.freedesktop.org/wlroots/wlroots/-/issues/3776
This commit is contained in:
parent
94c31b824c
commit
e3bd318547
4 changed files with 20 additions and 1 deletions
|
|
@ -111,6 +111,11 @@ bool check_drm_features(struct wlr_drm_backend *drm) {
|
|||
wlr_log(WLR_DEBUG, "Using atomic DRM interface");
|
||||
drm->iface = &atomic_iface;
|
||||
}
|
||||
#ifdef DRM_CLIENT_CAP_CURSOR_PLANE_HOTSPOT
|
||||
if (drm->iface == &atomic_iface && drmSetClientCap(drm->fd, DRM_CLIENT_CAP_CURSOR_PLANE_HOTSPOT, 1) == 0) {
|
||||
wlr_log(WLR_INFO, "DRM_CLIENT_CAP_CURSOR_PLANE_HOTSPOT supported");
|
||||
}
|
||||
#endif
|
||||
|
||||
if (drm->iface == &legacy_iface) {
|
||||
drm->supports_tearing_page_flips = drmGetCap(drm->fd, DRM_CAP_ASYNC_PAGE_FLIP, &cap) == 0 && cap == 1;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue