From 1aebdfb331d0bff69c239b7bf35242f9fbdf427c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Joakim=20Frosteg=C3=A5rd?= Date: Fri, 4 Dec 2020 21:46:55 +0100 Subject: [PATCH] Move MESSAGE_QUEUE_LEN const from macOS module to crate root --- src/lib.rs | 2 ++ src/macos/window.rs | 4 +--- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/lib.rs b/src/lib.rs index 05c263f..4a0d9e9 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -20,6 +20,8 @@ pub use window::*; pub use window_info::*; pub use window_open_options::*; +const MESSAGE_QUEUE_LEN: usize = 128; + #[derive(Debug)] pub enum Parent { None, diff --git a/src/macos/window.rs b/src/macos/window.rs index 9a45e54..80b511d 100644 --- a/src/macos/window.rs +++ b/src/macos/window.rs @@ -16,7 +16,7 @@ use rtrb::{RingBuffer, Producer, Consumer, PushError}; use crate::{ Event, Parent, WindowHandler, WindowOpenOptions, - WindowScalePolicy, WindowInfo + WindowScalePolicy, WindowInfo, MESSAGE_QUEUE_LEN }; use super::view::create_view; @@ -29,8 +29,6 @@ pub(super) const WINDOW_STATE_IVAR_NAME: &str = "WINDOW_STATE_IVAR_NAME"; pub(super) const FRAME_TIMER_IVAR_NAME: &str = "FRAME_TIMER"; -const MESSAGE_QUEUE_LEN: usize = 128; - pub struct Window { /// Only set if we created the parent window, i.e. we are running in