mirror of
https://gitlab.freedesktop.org/wayland/weston.git
synced 2026-04-05 13:40:43 +02:00
compositor-drm: Fix cursor view size check
Instead of testing against a hardcoded 64x64 pixel size to see if a view is suitable for promotion to a cursor plane, use our cursor_width and cursor_height variables. Signed-off-by: Daniel Stone <daniels@collabora.com> Reviewed-by: Derek Foreman <derekf@osg.samsung.com>
This commit is contained in:
parent
36609c740f
commit
70d337dfd2
1 changed files with 4 additions and 3 deletions
|
|
@ -127,8 +127,8 @@ struct drm_backend {
|
||||||
|
|
||||||
struct udev_input input;
|
struct udev_input input;
|
||||||
|
|
||||||
uint32_t cursor_width;
|
int32_t cursor_width;
|
||||||
uint32_t cursor_height;
|
int32_t cursor_height;
|
||||||
};
|
};
|
||||||
|
|
||||||
struct drm_mode {
|
struct drm_mode {
|
||||||
|
|
@ -1081,7 +1081,8 @@ drm_output_prepare_cursor_view(struct drm_output *output,
|
||||||
return NULL;
|
return NULL;
|
||||||
if (ev->surface->buffer_ref.buffer == NULL ||
|
if (ev->surface->buffer_ref.buffer == NULL ||
|
||||||
!wl_shm_buffer_get(ev->surface->buffer_ref.buffer->resource) ||
|
!wl_shm_buffer_get(ev->surface->buffer_ref.buffer->resource) ||
|
||||||
ev->surface->width > 64 || ev->surface->height > 64)
|
ev->surface->width > b->cursor_width ||
|
||||||
|
ev->surface->height > b->cursor_height)
|
||||||
return NULL;
|
return NULL;
|
||||||
|
|
||||||
output->cursor_view = ev;
|
output->cursor_view = ev;
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue