mirror of
https://github.com/niri-wm/niri.git
synced 2026-06-22 02:01:55 +07:00
id: Start from 1
This commit is contained in:
+3
-1
@@ -11,7 +11,9 @@ pub struct IdCounter {
|
||||
impl IdCounter {
|
||||
pub const fn new() -> Self {
|
||||
Self {
|
||||
value: AtomicU32::new(0),
|
||||
// Start from 1 to reduce the possibility that some other code that uses these IDs will
|
||||
// get confused.
|
||||
value: AtomicU32::new(1),
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user