From f801c4a00b2c5c9317146a3bffc96f3907789ea3 Mon Sep 17 00:00:00 2001 From: Kirill Chibisov Date: Mon, 14 Aug 2023 11:24:45 +0400 Subject: [PATCH] Reexport raw-window-handle in window module We use raw-window-handle extensive in the public API as well as we force the users to use it to get some essential data for interop, thus reexport it. Fixes: #2913. --- CHANGELOG.md | 1 + examples/child_window.rs | 2 +- src/window.rs | 3 +++ 3 files changed, 5 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 99053d11..2d15cf3e 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -8,6 +8,7 @@ And please only add new entries to the top of this list, right below the `# Unre # Unreleased +- Reexport `raw-window-handle` in `window` module. - **Breaking:** `WINIT_UNIX_BACKEND` was removed in favor of standard `WAYLAND_DISPLAY` and `DISPLAY` variables. - **Breaking:** `EventLoop::new` and `EventLoopBuilder::build` now return `Result` - On X11, set `visual_id` in returned `raw-window-handle`. diff --git a/examples/child_window.rs b/examples/child_window.rs index ef28757d..529930e2 100644 --- a/examples/child_window.rs +++ b/examples/child_window.rs @@ -6,11 +6,11 @@ mod fill; fn main() -> Result<(), impl std::error::Error> { use std::collections::HashMap; - use raw_window_handle::HasRawWindowHandle; use winit::{ dpi::{LogicalPosition, LogicalSize, Position}, event::{ElementState, Event, KeyEvent, WindowEvent}, event_loop::{ControlFlow, EventLoop, EventLoopWindowTarget}, + window::raw_window_handle::HasRawWindowHandle, window::{Window, WindowBuilder, WindowId}, }; diff --git a/src/window.rs b/src/window.rs index c03eb0f5..ef117cc8 100644 --- a/src/window.rs +++ b/src/window.rs @@ -18,6 +18,9 @@ pub use crate::icon::{BadIcon, Icon}; #[doc(inline)] pub use cursor_icon::{CursorIcon, ParseError as CursorIconParseError}; +#[doc(inline)] +pub use raw_window_handle; + /// Represents a window. /// /// # Example