Code at the speed of thought – Zed is a high-performance, multiplayer code editor from the creators of Atom and Tree-sitter.
Fix XI2 Scrolling Issue (#12603)
Owen Law2b21c89e3cc3
diff --git a/crates/gpui/src/platform/linux/x11/client.rs b/crates/gpui/src/platform/linux/x11/client.rsindex ae06ec8cc75..36d11295745 100644--- a/crates/gpui/src/platform/linux/x11/client.rs+++ b/crates/gpui/src/platform/linux/x11/client.rs@@ -766,7 +766,7 @@ impl X11Client {valuator_idx += 1;}}- Event::XinputLeave(event) => {+ Event::XinputLeave(event) if event.mode == xinput::NotifyMode::NORMAL => {self.0.borrow_mut().scroll_x = None; // Set last scroll to `None` so that a large delta isn't created if scrolling is done outside the window (the valuator is global)self.0.borrow_mut().scroll_y = None;diff --git a/crates/gpui/src/platform/linux/x11/window.rs b/crates/gpui/src/platform/linux/x11/window.rsindex bc4fb0212c3..d5c1846d569 100644--- a/crates/gpui/src/platform/linux/x11/window.rs+++ b/crates/gpui/src/platform/linux/x11/window.rs@@ -261,8 +261,6 @@ impl X11WindowState {.event_mask(xproto::EventMask::EXPOSURE| xproto::EventMask::STRUCTURE_NOTIFY- | xproto::EventMask::ENTER_WINDOW- | xproto::EventMask::LEAVE_WINDOW| xproto::EventMask::FOCUS_CHANGE| xproto::EventMask::KEY_PRESS| xproto::EventMask::KEY_RELEASE,