diff --git a/src/backend/drm/egl/surface.rs b/src/backend/drm/egl/surface.rs index 9e97168..634310b 100644 --- a/src/backend/drm/egl/surface.rs +++ b/src/backend/drm/egl/surface.rs @@ -70,14 +70,13 @@ where impl<'a, B: Backend::Surface> + 'static, D: Device + NativeDisplay + 'static> CursorBackend<'a> for EglSurface where - D: CursorBackend<'a>, - ::Surface: NativeSurface, + ::Surface: NativeSurface + CursorBackend<'a>, { - type CursorFormat = >::CursorFormat; - type Error = >::Error; + type CursorFormat = >::CursorFormat; + type Error = >::Error; fn set_cursor_position(&self, x: u32, y: u32) -> ::std::result::Result<(), Self::Error> { - self.dev.borrow().set_cursor_position(x, y) + self.surface.set_cursor_position(x, y) } fn set_cursor_representation<'b>( @@ -88,8 +87,7 @@ where where 'a: 'b, { - let dev = self.dev.borrow(); - dev.set_cursor_representation(buffer, hotspot) + self.surface.set_cursor_representation(buffer, hotspot) } }