gardesk/garshot / 1d9cd07

Browse files

selection: use sync() to ensure overlay cleanup completes

Authored by mfwolffe <wolffemf@dukes.jmu.edu>
SHA
1d9cd075ae763f2b401ffd55204703c6bbae0635
Parents
a59120d
Tree
90e16bd

1 changed file

StatusFile+-
M garshot/src/selection/overlay.rs 3 1
garshot/src/selection/overlay.rsmodified
@@ -289,7 +289,9 @@ impl Overlay {
289289
         conn.conn.free_gc(self.gc)?;
290290
         conn.conn.free_cursor(self.cursor)?;
291291
         conn.conn.destroy_window(self.window)?;
292
-        conn.conn.flush()?;
292
+        // Sync to ensure window is fully destroyed before continuing
293
+        // This prevents the selection overlay from lingering when annotation opens
294
+        conn.conn.sync()?;
293295
         Ok(())
294296
     }
295297