Skip to content
This repository has been archived by the owner on Sep 22, 2024. It is now read-only.

Backport accepts-first-mouse for Neovide #8

Merged

Conversation

mgax
Copy link

@mgax mgax commented Sep 21, 2022

Backport rust-windowing#2457 for Neovide's fork. Here's how to enable the flag in Neovide:

diff --git a/src/window/mod.rs b/src/window/mod.rs
index 0dccb94..e1eef05 100644
--- a/src/window/mod.rs
+++ b/src/window/mod.rs
@@ -343,6 +343,10 @@ pub fn create_window() {
             cmd_line_settings.x11_wm_class,
         );
 
+    #[cfg(target_os = "macos")]
+    let winit_window_builder = winit_window_builder
+        .with_accepts_first_mouse(false);
+
     let windowed_context = ContextBuilder::new()
         .with_pixel_format(24, 8)
         .with_stencil_buffer(8)

@MultisampledNight
Copy link

Thank you! I'll also apply the patch to Neovide shortly.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants