gardesk/gar / 4161b2e

Browse files

fix: ensure flush after destroy notify for pointer ungrab

Authored by mfwolffe <wolffemf@dukes.jmu.edu>
SHA
4161b2ede12946bb7d20a3b247848c7ce9be7e81
Parents
d93df2d
Tree
cf8310c

1 changed file

StatusFile+-
M gar/src/x11/events.rs 3 3
gar/src/x11/events.rsmodified
@@ -683,7 +683,7 @@ impl WindowManager {
683683
         self.unmanage_window(event.window);
684684
 
685685
         // Only do layout/focus work if the window was actually managed
686
-        // Unmanaged windows (like popup menus, tooltips) shouldn't trigger pointer warps
686
+        // Unmanaged windows (like popup menus, tooltips) shouldn't trigger layout recalc or pointer warps
687687
         if was_managed {
688688
             // Clear the entire root window to remove any leftover pixels
689689
             // This is needed because X11 without a compositor doesn't automatically repaint
@@ -699,10 +699,10 @@ impl WindowManager {
699699
                 // No windows left, warp to current monitor center
700700
                 self.warp_to_monitor(self.focused_monitor)?;
701701
             }
702
-
703
-            self.conn.flush()?;
704702
         }
705703
 
704
+        // Always flush to ensure any pointer ungrab or other operations are sent
705
+        self.conn.flush()?;
706706
         Ok(())
707707
     }
708708