gardesk/gar / f6d02e8

Browse files

Force cursor refresh on startup to clear DM artifacts

Warp pointer in-place after setting root cursor to ensure X11
redraws the cursor with our definition, clearing any stale cursor
images from the display manager.
Authored by mfwolffe <wolffemf@dukes.jmu.edu>
SHA
f6d02e8fb8c63e17480f82a8f7071730fb5c33d0
Parents
d920c3b
Tree
9bcd4e2

1 changed file

StatusFile+-
M gar/src/x11/connection.rs 13 0
gar/src/x11/connection.rsmodified
@@ -224,6 +224,19 @@ impl Connection {
224224
                 self.screen_width,
225225
                 self.screen_height,
226226
             )?;
227
+
228
+            // Force cursor refresh by warping pointer in place
229
+            // This clears any stale cursor artifacts from display manager
230
+            if let Ok(reply) = self.conn.query_pointer(self.root)?.reply() {
231
+                self.conn.warp_pointer(
232
+                    x11rb::NONE,
233
+                    self.root,
234
+                    0, 0, 0, 0,
235
+                    reply.root_x,
236
+                    reply.root_y,
237
+                )?;
238
+            }
239
+
227240
             self.conn.flush()?;
228241
         }
229242