summaryrefslogtreecommitdiff
path: root/engine/src/windowing/window.rs
diff options
context:
space:
mode:
Diffstat (limited to 'engine/src/windowing/window.rs')
-rw-r--r--engine/src/windowing/window.rs22
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)