From 532402a89910af6217a3afa154157aff706e6d9c Mon Sep 17 00:00:00 2001 From: David Johnson Date: Mon, 7 Feb 2022 21:49:14 -0600 Subject: [PATCH] Modified request_redraw to use correct OS facilities on Mac OS --- src/platform_impl/macos/window.rs | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/platform_impl/macos/window.rs b/src/platform_impl/macos/window.rs index 2d6c14a93c..f7e1e88d20 100644 --- a/src/platform_impl/macos/window.rs +++ b/src/platform_impl/macos/window.rs @@ -503,7 +503,12 @@ impl UnownedWindow { } pub fn request_redraw(&self) { - AppState::queue_redraw(RootWindowId(self.id())); + use objc::{msg_send, runtime::{Object, YES}}; + println!("Modified redraw request"); + let view = *self.ns_view as *mut _; + unsafe{ + let _: () = objc::msg_send![view, setNeedsDisplay:YES]; + } } pub fn outer_position(&self) -> Result, NotSupportedError> {