diff --git a/src/backend/egl/native.rs b/src/backend/egl/native.rs index f9aedde..fcb1e97 100644 --- a/src/backend/egl/native.rs +++ b/src/backend/egl/native.rs @@ -1,7 +1,9 @@ //! Type safe native types for safe context/surface creation use super::{display::EGLDisplayHandle, ffi, wrap_egl_call, SwapBuffersError}; -use nix::libc::{c_int, c_void}; +#[cfg(feature = "backend_winit")] +use std::os::raw::c_int; +use std::os::raw::c_void; #[cfg(feature = "backend_gbm")] use std::os::unix::io::AsRawFd; use std::{fmt::Debug, marker::PhantomData, sync::Arc}; @@ -9,9 +11,7 @@ use std::{fmt::Debug, marker::PhantomData, sync::Arc}; #[cfg(feature = "backend_winit")] use wayland_egl as wegl; #[cfg(feature = "backend_winit")] -use winit::platform::unix::WindowExtUnix; -#[cfg(feature = "backend_winit")] -use winit::window::Window as WinitWindow; +use winit::{platform::unix::WindowExtUnix, window::Window as WinitWindow}; #[cfg(feature = "backend_gbm")] use gbm::{AsRaw, Device as GbmDevice}; diff --git a/src/backend/renderer/mod.rs b/src/backend/renderer/mod.rs index 60aebbe..2bad97b 100644 --- a/src/backend/renderer/mod.rs +++ b/src/backend/renderer/mod.rs @@ -10,7 +10,7 @@ use std::collections::HashSet; use std::error::Error; -use crate::utils::{Buffer, Physical, Point, Size}; +use crate::utils::{Physical, Point, Size}; #[cfg(feature = "wayland_frontend")] use crate::{utils::Rectangle, wayland::compositor::SurfaceData}; @@ -20,8 +20,6 @@ use wayland_server::protocol::{wl_buffer, wl_shm}; #[cfg(feature = "renderer_gl")] pub mod gles2; -#[cfg(feature = "wayland_frontend")] -use crate::backend::allocator::{dmabuf::Dmabuf, Format}; #[cfg(all( feature = "wayland_frontend", feature = "backend_egl", @@ -31,6 +29,11 @@ use crate::backend::egl::{ display::{EGLBufferReader, BUFFER_READER}, Error as EglError, }; +#[cfg(feature = "wayland_frontend")] +use crate::{ + backend::allocator::{dmabuf::Dmabuf, Format}, + utils::Buffer, +}; #[derive(Debug, PartialEq, Eq, Hash, Clone, Copy)] /// Possible transformations to two-dimensional planes