Live reload animation slowdown
Browse files at this commit113ae1aaff54f6b235e24af4773832372ca04450Parent: df5512c1 changed file +3 -0
- src/niri.rs +3 -0
src/niri.rsmodified+3 -0
| @@ -3,6 +3,7 @@ use std::collections::{HashMap, HashSet}; | |||
| 3 | use std::ffi::OsString; | 3 | use std::ffi::OsString; |
| 4 | use std::path::PathBuf; | 4 | use std::path::PathBuf; |
| 5 | use std::rc::Rc; | 5 | use std::rc::Rc; |
| 6 | +use std::sync::atomic::Ordering; | ||
| 6 | use std::sync::{Arc, Mutex}; | 7 | use std::sync::{Arc, Mutex}; |
| 7 | use std::time::{Duration, Instant}; | 8 | use std::time::{Duration, Instant}; |
| 8 | use std::{env, mem, thread}; | 9 | use std::{env, mem, thread}; |
| @@ -75,6 +76,7 @@ use smithay::wayland::tablet_manager::TabletManagerState; | |||
| 75 | use smithay::wayland::text_input::TextInputManagerState; | 76 | use smithay::wayland::text_input::TextInputManagerState; |
| 76 | use smithay::wayland::virtual_keyboard::VirtualKeyboardManagerState; | 77 | use smithay::wayland::virtual_keyboard::VirtualKeyboardManagerState; |
| 77 | 78 | ||
| 79 | +use crate::animation; | ||
| 78 | use crate::backend::{Backend, RenderResult, Tty, Winit}; | 80 | use crate::backend::{Backend, RenderResult, Tty, Winit}; |
| 79 | use crate::config::{Config, TrackLayout}; | 81 | use crate::config::{Config, TrackLayout}; |
| 80 | use crate::cursor::{CursorManager, CursorTextureCache, RenderCursor, XCursor}; | 82 | use crate::cursor::{CursorManager, CursorTextureCache, RenderCursor, XCursor}; |
| @@ -457,6 +459,7 @@ impl State { | |||
| 457 | }; | 459 | }; |
| 458 | 460 | ||
| 459 | self.niri.layout.update_config(&config); | 461 | self.niri.layout.update_config(&config); |
| 462 | + animation::ANIMATION_SLOWDOWN.store(config.debug.animation_slowdown, Ordering::Relaxed); | ||
| 460 | 463 | ||
| 461 | let mut old_config = self.niri.config.borrow_mut(); | 464 | let mut old_config = self.niri.config.borrow_mut(); |
| 462 | 465 | ||