aboutsummaryrefslogtreecommitdiff
path: root/src/main.rs
diff options
context:
space:
mode:
authorIvan Molodetskikh <yalterz@gmail.com>2023-11-24 22:43:15 +0400
committerIvan Molodetskikh <yalterz@gmail.com>2023-11-24 22:48:30 +0400
commitae47f2116decc046836c9e02880af79bf5f507ee (patch)
tree0e32022d5efa9b2fe2a515448b3d2422c8ae043a /src/main.rs
parent9f24b48d8fc14169db5e676f25595f0f7fe17017 (diff)
downloadniri-ae47f2116decc046836c9e02880af79bf5f507ee.tar.gz
niri-ae47f2116decc046836c9e02880af79bf5f507ee.tar.bz2
niri-ae47f2116decc046836c9e02880af79bf5f507ee.zip
Move command spawning to a thread
It was showing up on profiles causing dropped frames.
Diffstat (limited to 'src/main.rs')
-rw-r--r--src/main.rs8
1 files changed, 2 insertions, 6 deletions
diff --git a/src/main.rs b/src/main.rs
index fcfd6f83..686abc81 100644
--- a/src/main.rs
+++ b/src/main.rs
@@ -164,14 +164,10 @@ fn main() {
};
// Spawn commands from cli and auto-start.
- if let Some((command, args)) = cli.command.split_first() {
- spawn(command, args);
- }
+ spawn(cli.command);
for elem in spawn_at_startup {
- if let Some((command, args)) = elem.command.split_first() {
- spawn(command, args);
- }
+ spawn(elem.command);
}
// Run the compositor.