diff options
| author | Ivan Molodetskikh <yalterz@gmail.com> | 2024-01-16 08:44:04 +0400 |
|---|---|---|
| committer | Ivan Molodetskikh <yalterz@gmail.com> | 2024-01-16 09:46:02 +0400 |
| commit | 83719a49b7ddf8f6b5c7fa348ed9fc3a386eab23 (patch) | |
| tree | 3e7e99e4dd3c7fc93853f32bbd72c92bba994085 /src | |
| parent | da4967d43c5d24c58e77a0f296a3df388a06e37e (diff) | |
| download | niri-83719a49b7ddf8f6b5c7fa348ed9fc3a386eab23.tar.gz niri-83719a49b7ddf8f6b5c7fa348ed9fc3a386eab23.tar.bz2 niri-83719a49b7ddf8f6b5c7fa348ed9fc3a386eab23.zip | |
Add live-reload of output positions
Diffstat (limited to 'src')
| -rw-r--r-- | src/niri.rs | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/src/niri.rs b/src/niri.rs index 870da89e..69578804 100644 --- a/src/niri.rs +++ b/src/niri.rs @@ -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. |
