On Thu, 3 Dec 2015 14:07:11 -0600 Derek Foreman <[email protected]> wrote:
> When the cursor plane is disabled the kernel can lose its location. > If we don't update our internal idea of where the plane is at that time, > the next time we set a cursor it can show up at 0,0. > > This can show up when an application is put in the cursor plane, removed > from the plane, then put back at the same location. It will show up at > 0,0 when it's reinstated. > > Signed-off-by: Derek Foreman <[email protected]> > --- > src/compositor-drm.c | 2 ++ > 1 file changed, 2 insertions(+) > > diff --git a/src/compositor-drm.c b/src/compositor-drm.c > index ea6f3cd..a6db933 100644 > --- a/src/compositor-drm.c > +++ b/src/compositor-drm.c > @@ -1174,6 +1174,8 @@ drm_output_set_cursor(struct drm_output *output) > output->cursor_view = NULL; > if (ev == NULL) { > drmModeSetCursor(b->drm.fd, output->crtc_id, 0, 0, 0); > + output->cursor_plane.x = 0; > + output->cursor_plane.y = 0; > return; > } > Hi, what if the next time the cursor plane actually should show up at 0,0 but the kernel remembers the old position somewhere else? Unlikely, yes, but possible, isn't it. I'd propose to use INT32_MIN instead of 0 for the coordinate. That will never be a proper position. If you want, you could also make the same change to create_output_for_connector() initializing the cursor plane, so that we always have INT32_MIN for a disabled cursor plane. With that change: Reviewed-by: Pekka Paalanen <[email protected]> Thanks, pq
pgpw5HU0o7GOH.pgp
Description: OpenPGP digital signature
_______________________________________________ wayland-devel mailing list [email protected] http://lists.freedesktop.org/mailman/listinfo/wayland-devel
