-
-
Notifications
You must be signed in to change notification settings - Fork 534
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
refactor: multi-window support (WIP) #2872
Draft
falcucci
wants to merge
25
commits into
main
Choose a base branch
from
multi-window-support
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Draft
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
…as a static global. Instead an instance of the running_tracker is passed to the relevant components. This should enable better separation of concerns, unit testing, and eventually multiple neovim apps running within the same instance
- modify `nvim_cmd_impl` in `src/bridge/command.rs` to accept an additional parameter `_settings` - add `settings` parameter to the `editor::new` function in `src/editor/mod.rs` - add `settings` parameter to the `start_editor` function in `src/main.rs` - add `debug` trait to the `settings` struct in `src/settings/mod.rs` - add `settings` parameter to the `keyboardmanager::new` function in `src/window/keyboard_manager.rs` - add `settings` parameter to the `macoswindowfeature::from_winit_window` function in `src/window/macos.rs` - add `settings` parameter to the `winitwindowwrapper::new` function in `src/window/window_wrapper.rs`
- add a new badge to the `readme.md` file - refactor the `create_platform_shell_command` function for different platforms in `src/bridge/command.rs` - update the `build_window_config` function for windows in `src/renderer/mod.rs`
- add a new field `mouse_cursor_icon` of type `mousecursoricon` - implement parsing method for `mousecursoricon` - update config struct to include `mouse_cursor_icon` field - set `neovide_mouse_cursor_icon` env variable if `mouse_cursor_icon` is set in config - load neovide icon in macos window - set application icon image in macos window creation - update create_window function to use `mouse_cursor_icon` for cursor setting - add command-line reference for `mouse-cursor-icon` - set default value for `mouse-cursor-icon` in config file
- remove the `#[allow(dead_code)]` attribute from the `neovimhandler`, `editor`, and `keyboardmanager` structs.
- update the `glutin` dependency to use a specific github repository and branch - add a new dependency `glutin-winit` from the same github repository and branch - update the `winit` dependency to use a specific github repository and branch
- update `cargo.toml` to refer to a different branch for `glutin` and `glutin-winit` - set `with_default_menu` to `true` in `create_event_loop` function - comment out unnecessary lines in `update_loop.rs` regarding `macos` configurations
- add a 'new window' item to the menu in macos.rs - change default_menu value to false in mod.rs - uncomment and adjust code related to macos initialization in update_loop.rs
- update the struct name from `updateloop` to `application` - change the method signature of `window_event` - remove `shouldrender` from the public interface of `window/mod.rs`
- removed the `create_window_allowed` field from the `application` struct - added new event handling logic in the `applicationhandler` trait for different start causes - removed unnecessary code related to window creation in the `try_create_window` method of `winitwindowwrapper`
- update the `proxy` field type in `neovimhandler` from `eventloopproxy<userevent>` to `eventloopproxy<eventpayload>` - update the `run` function in `neovimhandler` to use `eventloopproxy<eventpayload>` instead of `eventloopproxy<userevent>` - rename `userevent` to `eventpayload` in the `clipboard` module - update the `init` function in the `clipboard` module to accept `eventloop<eventpayload>` instead of `eventloop<userevent>` - replace `userevent` with `eventpayload` in the `drawcommandbatcher` module - change the type of `event_loop_proxy` in `neovimruntime` to `eventloopproxy<eventpayload>` - modify the `editor` module to use `eventpayload` instead of `userevent` - update the `handle_startup_errors` function in the `error_handling` module to take `eventloop<eventpayload>` instead of `eventloop<userevent>` - change the `main` function to use `eventloopproxy<eventpayload>` instead of `eventloopproxy<userevent>` - adjust the function parameters in the `init` function of the `openglskiarenderer` module to accept `eventloopproxy<eventpayload>` instead of `eventloopproxy<userevent>` - replace `let proxy: eventloopproxy<userevent>` with `let proxy: eventloopproxy<eventpayload>` in the `vsyncmacos
- update the version of `skia-safe` to `0.80.0` with changes in features - update the version of `windows` to `0.58.0` - add dependencies `objc2-metal`, `calayer`, and `cametallayer` to `objc2-quartz-core` - change the version of `skia-safe` to `0.80.0` with additional feature of `metal` - add a new file `src/renderer/metal.rs` with extensive changes - update the file `src/cmd_line.rs` by changing the comment about opengl on windows to include macos - modify the file `src/renderer/d3d.rs` by removing unnecessary code and adding some imports and constants - introduce a new file `src/renderer/metal.rs` with a significant amount of new code - add a new file `src/renderer/mod.rs` with changes for `metal` window configuration type - include changes for `metal` renderer implementation in skia module
- add `rustc-hash` version `2.0.0` to `cargo.toml` - change condition in `save_window_size` function to check if routes are empty - modify window size saving process in the `save_window_size` function for `window_wrapper` - refactor `handle_animation_steps` function in `application` struct to improve animation handling - improve code in the `animate` and `schedule_render` functions of the `application` struct
- change `window` type from `window` to `rc<window>` in `metalskiarenderer` struct - change `window` type from `windowid` to `window` in `routewindow` struct - change `window` type from `option<window>` to `option<rc<window>>` in `openglskiarenderer` struct - change `window` type from `option<window>` to `option<rc<window>>` in `openglskiarenderer` struct - change `window` type from `window` to `rc<window>` in `openglskiarenderer` struct
- change `pub fn new(window: window, srgb: bool, vsync: bool)` signature to use `rc<window>` instead - add `#[derive(clone]` to `enum windowconfigtype` and `struct windowconfig` for cloning support - modify `pub fn build_window_config(` to handle `window` as a reference and adjust `windowconfig` creation - revise `pub fn create_skia_renderer(` to accept a reference to `window` and update `windowconfigtype::metal` creation - refactor `impl openglskiarenderer` to remove unnecessary `rc::new(window)` conversion - update `fn build_window(` to treat `window` as a non-reference for property assignment - adjust `create_skia_renderer(` in `error_window.rs` and `window_wrapper.rs` to take a reference to `windowconfig`
- update the method of setting window visibility in `error_window.rs` - refactor mutable borrows in `window_wrapper.rs` - remove unnecessary code blocks in `window_wrapper.rs`
- remove unnecessary initialization of `window` in `metalskiarenderer` - comment out an animation calculation loop in `application` - simplify the logic for rendering in `application` - remove debug outputs in `winitwindowwrapper`
- refactor the `is_minimized` check to simplify and improve readability - remove unnecessary commented-out code related to window size calculations - add a debug print statement to show the grid size in `update_grid_size_from_window`
- update `cargo.toml` to use local paths for `glutin` and `glutin-winit` - include `winit` as a local path in `cargo.toml` - add `winit` as a local path in `cargo.toml` - add `window_id` to a callback function in `vsync_macos_display_link.rs` - send `userevent::neovimexited` with `window_id` in `run` function - send `userevent::redrawrequested` with `window_id` in `vsync_macos_display_link_callback` - send `userevent::configschanged` with `window_id` for font change notification - update window event creation to include `window_id`
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
ℹ️⚠️ Doesn't work as expected yet. Do not use this as a daily build. Not ready for review.
What kind of change does this PR introduce?
Did this PR introduce a breaking change?
A breaking change includes anything that breaks backwards compatibility either at compile or run time.