Remove option_as_alt example state

This commit is contained in:
Mads Marquart
2024-03-01 09:19:35 +01:00
parent 1edf4f1238
commit 1bef238c2a

View File

@@ -199,8 +199,6 @@ impl Application {
window.set_ime_allowed(ime); window.set_ime_allowed(ime);
let state = WindowState { let state = WindowState {
#[cfg(macos_platform)]
option_as_alt: window.option_as_alt(),
window, window,
custom_idx: self.custom_cursors.len() - 1, custom_idx: self.custom_cursors.len() - 1,
cursor_grab: CursorGrabMode::None, cursor_grab: CursorGrabMode::None,
@@ -372,14 +370,14 @@ impl Application {
Action::PrintHelp => self.print_help(), Action::PrintHelp => self.print_help(),
#[cfg(macos_platform)] #[cfg(macos_platform)]
Action::CycleOptionAsAlt => { Action::CycleOptionAsAlt => {
state.option_as_alt = match state.option_as_alt { let new = match window.option_as_alt() {
OptionAsAlt::None => OptionAsAlt::OnlyLeft, OptionAsAlt::None => OptionAsAlt::OnlyLeft,
OptionAsAlt::OnlyLeft => OptionAsAlt::OnlyRight, OptionAsAlt::OnlyLeft => OptionAsAlt::OnlyRight,
OptionAsAlt::OnlyRight => OptionAsAlt::Both, OptionAsAlt::OnlyRight => OptionAsAlt::Both,
OptionAsAlt::Both => OptionAsAlt::None, OptionAsAlt::Both => OptionAsAlt::None,
}; };
println!("Setting option as alt {:?}", state.option_as_alt); println!("Setting option as alt {:?}", new);
window.set_option_as_alt(state.option_as_alt); window.set_option_as_alt(new);
} }
#[cfg(macos_platform)] #[cfg(macos_platform)]
Action::CreateNewTab => { Action::CreateNewTab => {
@@ -649,10 +647,6 @@ struct WindowState {
zoom: f64, zoom: f64,
/// The amount of rotation of the window. /// The amount of rotation of the window.
rotated: f32, rotated: f32,
#[cfg(macos_platform)]
option_as_alt: OptionAsAlt,
// Cursor states. // Cursor states.
named_idx: usize, named_idx: usize,
custom_idx: usize, custom_idx: usize,