gardesk/garchomp / d28773c

Browse files

fix fade-out animation completion detection

Check fade_out_complete() before cleanup_completed() to ensure
windows are marked unmapped after fade-out animation finishes.
Authored by espadonne
SHA
d28773c1589a28a0c7a2563b07c3c1b3fe7b3a49
Parents
fd1f785
Tree
4fb314a

1 changed file

StatusFile+-
M garchomp/src/compositor/mod.rs 4 4
garchomp/src/compositor/mod.rsmodified
@@ -855,6 +855,10 @@ impl Compositor {
855855
         let mut windows_to_unmap = Vec::new();
856856
 
857857
         for (id, w) in self.windows.iter_mut() {
858
+            // Check fade-out completion BEFORE cleanup (cleanup removes the animation)
859
+            if w.animations.fade_out_complete() {
860
+                windows_to_unmap.push(*id);
861
+            }
858862
             w.animations.cleanup_completed();
859863
             w.cleanup_lua_animation();
860864
             if w.animations.has_active_animations() {
@@ -863,10 +867,6 @@ impl Compositor {
863867
             if w.has_lua_animation() {
864868
                 has_active_animations = true;
865869
             }
866
-            // Mark windows that finished fade-out as unmapped
867
-            if w.animations.fade_out_complete() {
868
-                windows_to_unmap.push(*id);
869
-            }
870870
         }
871871
 
872872
         // Call Lua animation callbacks for active animations