diff options
author | Daniel Stone <daniels@collabora.com> | 2015-06-16 18:42:23 +0100 |
---|---|---|
committer | Daniel Stone <daniels@collabora.com> | 2015-07-16 16:46:21 +0100 |
commit | 70d337dfd2a961368d298c14dfb0d68882c67653 (patch) | |
tree | fde7f2468dbc791699b197c380e03bd9ce67c27b /src/compositor-drm.c | |
parent | 36609c740fa20a97481c0776fe14f279f00b8014 (diff) | |
download | weston-70d337dfd2a961368d298c14dfb0d68882c67653.tar.gz |
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>
Diffstat (limited to 'src/compositor-drm.c')
-rw-r--r-- | src/compositor-drm.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/src/compositor-drm.c b/src/compositor-drm.c index 28b1c7e0..c1c6f002 100644 --- a/src/compositor-drm.c +++ b/src/compositor-drm.c @@ -127,8 +127,8 @@ struct drm_backend { struct udev_input input; - uint32_t cursor_width; - uint32_t cursor_height; + int32_t cursor_width; + int32_t cursor_height; }; struct drm_mode { @@ -1081,7 +1081,8 @@ drm_output_prepare_cursor_view(struct drm_output *output, return NULL; if (ev->surface->buffer_ref.buffer == NULL || !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; output->cursor_view = ev; |