mirror of
https://github.com/Zedfrigg/ironbar.git
synced 2025-07-06 12:51:03 +02:00
refactor: move most of the horrible add_module
macro content into proper functions
This commit is contained in:
parent
490f3f3f65
commit
2c1b2924d4
15 changed files with 317 additions and 344 deletions
|
@ -9,6 +9,7 @@ const STATE_ACTIVE: u32 = 2;
|
|||
const STATE_FULLSCREEN: u32 = 3;
|
||||
|
||||
static COUNTER: AtomicUsize = AtomicUsize::new(1);
|
||||
|
||||
fn get_id() -> usize {
|
||||
COUNTER.fetch_add(1, Ordering::Relaxed)
|
||||
}
|
||||
|
@ -108,9 +109,9 @@ where
|
|||
None
|
||||
}
|
||||
}
|
||||
Event::OutputEnter { output: _ } => None,
|
||||
Event::OutputLeave { output: _ } => None,
|
||||
Event::Parent { parent: _ } => None,
|
||||
Event::OutputEnter { output: _ }
|
||||
| Event::OutputLeave { output: _ }
|
||||
| Event::Parent { parent: _ } => None,
|
||||
Event::Done => {
|
||||
if info.ready || info.app_id.is_empty() {
|
||||
None
|
||||
|
@ -119,6 +120,7 @@ where
|
|||
Some(ToplevelChange::New)
|
||||
}
|
||||
}
|
||||
|
||||
_ => unreachable!(),
|
||||
};
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue