Fix refresh_focus
This commit is contained in:
parent
32805d8ee0
commit
a11c3e8f67
5 changed files with 35 additions and 3 deletions
|
|
@ -124,6 +124,11 @@ impl CosmicStack {
|
|||
.with_program(|p| p.windows.lock().unwrap()[p.active.load(Ordering::SeqCst)].clone())
|
||||
}
|
||||
|
||||
pub fn has_active(&self, window: &CosmicSurface) -> bool {
|
||||
self.0
|
||||
.with_program(|p| &p.windows.lock().unwrap()[p.active.load(Ordering::SeqCst)] == window)
|
||||
}
|
||||
|
||||
pub fn set_active(&self, window: &CosmicSurface) {
|
||||
self.0.with_program(|p| {
|
||||
if let Some(val) = p.windows.lock().unwrap().iter().position(|w| w == window) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue