egl_surface: fix CursorBackend implementation

This commit is contained in:
Victor Brekenfeld 2018-11-22 10:06:59 +01:00
parent f17e37465b
commit 2675cf94dc
1 changed files with 5 additions and 7 deletions

View File

@ -70,14 +70,13 @@ where
impl<'a, B: Backend<Surface = <D as Device>::Surface> + 'static, D: Device + NativeDisplay<B> + 'static> impl<'a, B: Backend<Surface = <D as Device>::Surface> + 'static, D: Device + NativeDisplay<B> + 'static>
CursorBackend<'a> for EglSurface<B, D> CursorBackend<'a> for EglSurface<B, D>
where where
D: CursorBackend<'a>, <D as Device>::Surface: NativeSurface + CursorBackend<'a>,
<D as Device>::Surface: NativeSurface,
{ {
type CursorFormat = <D as CursorBackend<'a>>::CursorFormat; type CursorFormat = <D::Surface as CursorBackend<'a>>::CursorFormat;
type Error = <D as CursorBackend<'a>>::Error; type Error = <D::Surface as CursorBackend<'a>>::Error;
fn set_cursor_position(&self, x: u32, y: u32) -> ::std::result::Result<(), Self::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>( fn set_cursor_representation<'b>(
@ -88,8 +87,7 @@ where
where where
'a: 'b, 'a: 'b,
{ {
let dev = self.dev.borrow(); self.surface.set_cursor_representation(buffer, hotspot)
dev.set_cursor_representation(buffer, hotspot)
} }
} }