forge
Explore
Log in

Don't you dare go Hollow

Redraw important hotkeys when hide-not-bound changes

Browse files at this commit

aee25c9efcfa85b6029d5d1a2b7aaac7d87ae9d1Ivan MolodetskikhParent: f51d761
src/niri.rsmodified+8 -3
@@ -1790,10 +1790,10 @@ impl State {
1790 1790
1791 let binds_changed = config.binds != old_config.binds;1791 let binds_changed = config.binds != old_config.binds;
1792 let new_mod_key = self.backend.mod_key(&config);1792 let new_mod_key = self.backend.mod_key(&config);
1793+ let mut hotkey_overlay_changed =
1794+ config.hotkey_overlay.hide_not_bound != old_config.hotkey_overlay.hide_not_bound;
1793 if new_mod_key != self.backend.mod_key(&old_config) || binds_changed {1795 if new_mod_key != self.backend.mod_key(&old_config) || binds_changed {
1794- self.niri1796+ hotkey_overlay_changed = true;
1795- .hotkey_overlay
1796- .on_hotkey_config_updated(new_mod_key);
1797 self.niri.mods_with_mouse_binds = mods_with_mouse_binds(new_mod_key, &config.binds);1797 self.niri.mods_with_mouse_binds = mods_with_mouse_binds(new_mod_key, &config.binds);
1798 self.niri.mods_with_horizontal_wheel_binds =1798 self.niri.mods_with_horizontal_wheel_binds =
1799 mods_with_horizontal_wheel_binds(new_mod_key, &config.binds);1799 mods_with_horizontal_wheel_binds(new_mod_key, &config.binds);
@@ -1804,6 +1804,11 @@ impl State {
1804 self.niri.mods_with_finger_scroll_binds =1804 self.niri.mods_with_finger_scroll_binds =
1805 mods_with_finger_scroll_binds(new_mod_key, &config.binds);1805 mods_with_finger_scroll_binds(new_mod_key, &config.binds);
1806 }1806 }
1807+ if hotkey_overlay_changed {
1808+ self.niri
1809+ .hotkey_overlay
1810+ .on_hotkey_config_updated(new_mod_key);
1811+ }
1807 1812
1808 if config.window_rules != old_config.window_rules {1813 if config.window_rules != old_config.window_rules {
1809 window_rules_changed = true;1814 window_rules_changed = true;