@@ -64,7 +64,7 @@ use std::{
6464 fmt,
6565 hash:: Hash ,
6666 sync:: {
67- Arc , LazyLock , Mutex ,
67+ LazyLock , Mutex ,
6868 atomic:: { AtomicBool , AtomicU8 , AtomicUsize , Ordering } ,
6969 } ,
7070} ;
@@ -91,21 +91,21 @@ impl fmt::Debug for CosmicStack {
9191 }
9292}
9393
94- #[ derive( Debug , Clone ) ]
94+ #[ derive( Debug ) ]
9595pub struct CosmicStackInternal {
96- windows : Arc < Mutex < Vec < CosmicSurface > > > ,
97- active : Arc < AtomicUsize > ,
98- activated : Arc < AtomicBool > ,
99- group_focused : Arc < AtomicBool > ,
100- previous_index : Arc < Mutex < Option < ( Serial , usize ) > > > ,
101- scroll_to_focus : Arc < AtomicBool > ,
102- previous_keyboard : Arc < AtomicUsize > ,
103- pointer_entered : Arc < AtomicU8 > ,
104- reenter : Arc < AtomicBool > ,
105- potential_drag : Arc < Mutex < Option < usize > > > ,
106- override_alive : Arc < AtomicBool > ,
107- geometry : Arc < Mutex < Option < Rectangle < i32 , Global > > > > ,
108- mask : Arc < Mutex < Option < tiny_skia:: Mask > > > ,
96+ windows : Mutex < Vec < CosmicSurface > > ,
97+ active : AtomicUsize ,
98+ activated : AtomicBool ,
99+ group_focused : AtomicBool ,
100+ previous_index : Mutex < Option < ( Serial , usize ) > > ,
101+ scroll_to_focus : AtomicBool ,
102+ previous_keyboard : AtomicUsize ,
103+ pointer_entered : AtomicU8 ,
104+ reenter : AtomicBool ,
105+ potential_drag : Mutex < Option < usize > > ,
106+ override_alive : AtomicBool ,
107+ geometry : Mutex < Option < Rectangle < i32 , Global > > > ,
108+ mask : Mutex < Option < tiny_skia:: Mask > > ,
109109}
110110
111111impl CosmicStackInternal {
@@ -146,19 +146,19 @@ impl CosmicStack {
146146 let width = windows[ 0 ] . geometry ( ) . size . w ;
147147 CosmicStack ( IcedElement :: new (
148148 CosmicStackInternal {
149- windows : Arc :: new ( Mutex :: new ( windows) ) ,
150- active : Arc :: new ( AtomicUsize :: new ( 0 ) ) ,
151- activated : Arc :: new ( AtomicBool :: new ( false ) ) ,
152- group_focused : Arc :: new ( AtomicBool :: new ( false ) ) ,
153- previous_index : Arc :: new ( Mutex :: new ( None ) ) ,
154- scroll_to_focus : Arc :: new ( AtomicBool :: new ( false ) ) ,
155- previous_keyboard : Arc :: new ( AtomicUsize :: new ( 0 ) ) ,
156- pointer_entered : Arc :: new ( AtomicU8 :: new ( 0 ) ) ,
157- reenter : Arc :: new ( AtomicBool :: new ( false ) ) ,
158- potential_drag : Arc :: new ( Mutex :: new ( None ) ) ,
159- override_alive : Arc :: new ( AtomicBool :: new ( true ) ) ,
160- geometry : Arc :: new ( Mutex :: new ( None ) ) ,
161- mask : Arc :: new ( Mutex :: new ( None ) ) ,
149+ windows : Mutex :: new ( windows) ,
150+ active : AtomicUsize :: new ( 0 ) ,
151+ activated : AtomicBool :: new ( false ) ,
152+ group_focused : AtomicBool :: new ( false ) ,
153+ previous_index : Mutex :: new ( None ) ,
154+ scroll_to_focus : AtomicBool :: new ( false ) ,
155+ previous_keyboard : AtomicUsize :: new ( 0 ) ,
156+ pointer_entered : AtomicU8 :: new ( 0 ) ,
157+ reenter : AtomicBool :: new ( false ) ,
158+ potential_drag : Mutex :: new ( None ) ,
159+ override_alive : AtomicBool :: new ( true ) ,
160+ geometry : Mutex :: new ( None ) ,
161+ mask : Mutex :: new ( None ) ,
162162 } ,
163163 ( width, TAB_HEIGHT ) ,
164164 handle,
0 commit comments