master
Pietro Brenna 2020-03-29 13:09:07 +02:00
parent 8468537f1c
commit c2f83e889f
1 changed files with 3 additions and 4 deletions

View File

@ -92,20 +92,19 @@ fn build_ui(application: &gtk::Application) {
let w_state2 = w_state.clone(); let w_state2 = w_state.clone();
let w_state3 = w_state.clone(); let w_state3 = w_state.clone();
let w_state4 = w_state.clone(); let w_state4 = w_state.clone();
let w_state5 = w_state.clone();
accel_group.connect_accel_group( accel_group.connect_accel_group(
key, key,
modifier, modifier,
gtk::AccelFlags::VISIBLE, gtk::AccelFlags::VISIBLE,
clone!(@weak window => @default-return true, move |_accel_g, _win, _key, _modif| { clone!(@weak window => @default-return true, move |_accel_g, _win, _key, _modif| {
match w_state5.get_full() { match w_state4.get_full() {
FullScreenState::Full => { FullScreenState::Full => {
window.unfullscreen(); window.unfullscreen();
w_state5.set_full(FullScreenState::NotFull); w_state4.set_full(FullScreenState::NotFull);
} }
FullScreenState::NotFull => { FullScreenState::NotFull => {
window.fullscreen(); window.fullscreen();
w_state5.set_full(FullScreenState::Full); w_state4.set_full(FullScreenState::Full);
} }
_ => {} _ => {}
} }