mirror of
https://github.com/niri-wm/niri.git
synced 2026-06-23 02:05:33 +07:00
Add live-reload of output positions
This commit is contained in:
@@ -542,6 +542,7 @@ impl State {
|
||||
animation::ANIMATION_SLOWDOWN.store(config.debug.animation_slowdown, Ordering::Relaxed);
|
||||
|
||||
let mut reload_xkb = None;
|
||||
let mut output_config_changed = false;
|
||||
let mut old_config = self.niri.config.borrow_mut();
|
||||
|
||||
// Reload the cursor.
|
||||
@@ -568,6 +569,10 @@ impl State {
|
||||
);
|
||||
}
|
||||
|
||||
if config.outputs != old_config.outputs {
|
||||
output_config_changed = true;
|
||||
}
|
||||
|
||||
*old_config = config;
|
||||
|
||||
// Release the borrow.
|
||||
@@ -581,6 +586,10 @@ impl State {
|
||||
}
|
||||
}
|
||||
|
||||
if output_config_changed {
|
||||
self.niri.reposition_outputs(None);
|
||||
}
|
||||
|
||||
self.niri.queue_redraw_all();
|
||||
// FIXME: apply output scale and whatnot.
|
||||
// FIXME: apply libinput device settings.
|
||||
|
||||
Reference in New Issue
Block a user