From 8e6af73784d64de1f02aac96b4facf7d03334fe4 Mon Sep 17 00:00:00 2001 From: apricotbucket28 <71973804+apricotbucket28@users.noreply.github.com> Date: Tue, 30 Jul 2024 23:02:48 -0300 Subject: [PATCH] x11: Do not check hover state on properties change (#15518) This fixes an issue where the window's hovered state would be incorrect, causing the cursor not to update because it would think the window wasn't hovered ([relevant check](https://github.com/zed-industries/zed/blob/a03beeeb5bcce3fbb464a5d2a06a6ae47e8dda92/crates/gpui/src/window.rs#L3016-L3017)). The code here doesn't really seem to make sense, since there's already the `XinputEnter` and `XinputLeave` events that indicate mouse focus state on the window. The properties change event wouldn't necessarily indicate when mouse focus changes. Thanks @Emc2356 for reporting this on the Discord and helping figure out the issue! Release Notes: - Linux: Fixed the cursor sometimes not changing on X11 --- crates/gpui/src/platform/linux/x11/window.rs | 9 --------- 1 file changed, 9 deletions(-) diff --git a/crates/gpui/src/platform/linux/x11/window.rs b/crates/gpui/src/platform/linux/x11/window.rs index b0f479c9bf..b3c8ea7cc7 100644 --- a/crates/gpui/src/platform/linux/x11/window.rs +++ b/crates/gpui/src/platform/linux/x11/window.rs @@ -791,15 +791,6 @@ impl X11WindowStatePtr { state.hidden = true; } } - - let hovered_window = self - .xcb_connection - .query_pointer(state.x_root_window) - .unwrap() - .reply() - .unwrap() - .child; - self.set_hovered(hovered_window == self.x_window); } pub fn close(&self) {