mirror of
https://github.com/rust-windowing/winit.git
synced 2026-08-29 04:40:04 -04:00
win32: account for mouse wheel speed setting
Also adds a method to toggle this behavior during runtime.
This commit is contained in:
@@ -344,6 +344,11 @@ impl Window {
|
||||
}
|
||||
}
|
||||
|
||||
#[inline]
|
||||
pub fn set_use_system_scroll_speed(&self, should_use: bool) {
|
||||
self.window_state_lock().use_system_wheel_speed = should_use;
|
||||
}
|
||||
|
||||
fn set_icon(&self, mut new_icon: Icon, icon_type: IconType) {
|
||||
if let Some(icon) = new_icon.cast_ref::<RgbaIcon>() {
|
||||
let icon = match WinIcon::from_rgba(icon) {
|
||||
@@ -1303,6 +1308,7 @@ impl InitData<'_> {
|
||||
win.set_skip_taskbar(self.win_attributes.skip_taskbar);
|
||||
win.set_window_icon(self.attributes.window_icon.clone());
|
||||
win.set_taskbar_icon(self.win_attributes.taskbar_icon.clone());
|
||||
win.set_use_system_scroll_speed(self.win_attributes.use_system_wheel_speed);
|
||||
|
||||
let attributes = self.attributes.clone();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user