diff options
| author | HampusM <hampus@hampusmat.com> | 2026-11-27 17:00:24 +0100 |
|---|---|---|
| committer | HampusM <hampus@hampusmat.com> | 2026-11-27 17:00:24 +0100 |
| commit | 5411ac376b64c34b0e2c57b86edd859bcd196d26 (patch) | |
| tree | cf7749b881a8ca93cdacd8a03f57470cced35379 /engine/src/windowing/window.rs | |
| parent | aeb0b83b49c6da92114062b9ff436b8685d36a34 (diff) | |
Diffstat (limited to 'engine/src/windowing/window.rs')
| -rw-r--r-- | engine/src/windowing/window.rs | 22 |
1 files changed, 11 insertions, 11 deletions
diff --git a/engine/src/windowing/window.rs b/engine/src/windowing/window.rs index 1f67130..c601487 100644 --- a/engine/src/windowing/window.rs +++ b/engine/src/windowing/window.rs @@ -147,11 +147,6 @@ impl CreationAttributes window_attrs } - - pub(crate) fn apply_extra_attrs_to_window(&self, window: &winit::window::Window) - { - window.set_cursor_visible(self.cursor_visible); - } } impl Default for CreationAttributes @@ -243,13 +238,16 @@ impl Window } } - pub(super) fn apply_to_settings(&self, settings: &mut super::WindowSettings) -> bool + pub(super) fn apply_to_settings( + &self, + settings: &mut super::WindowSettings, + ) -> super::WindowSettingsChangeFlags { - let mut is_settings_changed = false; + let mut settings_change_flags = super::WindowSettingsChangeFlags::empty(); if self.title != *settings.title { settings.title = self.title.clone().into_boxed_str(); - is_settings_changed = true; + settings_change_flags.insert(super::WindowSettingsChangeFlags::TITLE); } // For cursor visibility specifically, we especially do not want to set it unless @@ -258,15 +256,17 @@ impl Window // and the cursor is made invisible. if self.cursor_visible != settings.cursor_visible { settings.cursor_visible = self.cursor_visible; - is_settings_changed = true; + settings_change_flags + .insert(super::WindowSettingsChangeFlags::CURSOR_VISIBLE); } if self.cursor_grab_mode != settings.cursor_grab_mode { settings.cursor_grab_mode = self.cursor_grab_mode; - is_settings_changed = true; + settings_change_flags + .insert(super::WindowSettingsChangeFlags::CURSOR_GRAB_MODE); } - is_settings_changed + settings_change_flags } pub(crate) fn set_scale_factor(&mut self, scale_factor: f64) |
