From f0d906f63b69d58b6235baf74a8232fcc9aa3156 Mon Sep 17 00:00:00 2001 From: omartelo Date: Thu, 22 Oct 2026 16:32:52 -0300 Subject: [PATCH] fix(native): keep Windows drags under the pointer on scaled displays Gio's Windows backend called SetCapture on WM_POINTERDOWN, which turns on DPI-unaware coordinate scaling for pointer events until the release. With display scaling above 100%, every pointer.Drag landed away from the cursor: the footer editor's dragged item and the terminal's selection alike. Upstream fixed it in c170b581 ("app: [Windows] rely on implicit pointer capture", gio#710). The fork's lich branch carries it now, merged with the rest of upstream main, and native/go.mod moves to that commit. --- CHANGELOG.md | 1 + native/go.mod | 2 +- native/go.sum | 4 ++-- 3 files changed, 4 insertions(+), 3 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 1666ce785..ed5ac79f1 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -17,6 +17,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ### Fixed +- On Windows with display scaling above 100%, a drag follows the pointer again: an item dragged in Settings › Footer or a selection dragged in the terminal landed away from the cursor, scaled as if the screen were at 100%. - On Windows, the window wears lich's icon and opens under lich's taskbar button, where it showed a generic icon and, launched from a lich pinned to the taskbar, opened as a separate button beside the pin. - Clicks across the window show their result at once, where many waited for the mouse to move: dialogs opening and closing, the dock's and Settings' close buttons, opening a file from the Code tab, the find bar's toggles, the Pulls filters and conversation, the sidebar's filter, and Settings' sections, switches, ladders and pickers. A segmented control no longer shows two options pressed right after a click. - A click on a folder in the Code tab's file tree, or in a pull request's file tree, opens or folds it at once, where it waited for the mouse to move. The Code tab also builds the tree of a checkout with tens of thousands of files in milliseconds where it took seconds, and a row's hover follows the pointer without lagging an event behind. diff --git a/native/go.mod b/native/go.mod index f0a0b99e4..b9b89caa2 100644 --- a/native/go.mod +++ b/native/go.mod @@ -32,4 +32,4 @@ require ( // moves, resizes and maximizes on Wayland and X11, app.TrafficLights (macOS's // buttons on an undecorated window), and the Editor's scroll offset (the // textarea's scrollbar). Every patch of ours lands on that branch. -replace gioui.org => github.com/lichdotdev/gio v0.0.0-20261021132818-f0df03d51088 +replace gioui.org => github.com/lichdotdev/gio v0.0.0-20261022192911-12496229bb5d diff --git a/native/go.sum b/native/go.sum index 77b09ce01..a1908548c 100644 --- a/native/go.sum +++ b/native/go.sum @@ -25,8 +25,8 @@ github.com/godbus/dbus/v5 v5.2.2 h1:TUR3TgtSVDmjiXOgAAyaZbYmIeP3DPkld3jgKGV8mXQ= github.com/godbus/dbus/v5 v5.2.2/go.mod h1:3AAv2+hPq5rdnr5txxxRwiGjPXamgoIHgz9FPBfOp3c= github.com/hexops/gotextdiff v1.0.3 h1:gitA9+qJrrTCsiCl7+kh75nPqQt1cx4ZkudSTLoUqJM= github.com/hexops/gotextdiff v1.0.3/go.mod h1:pSWU5MAI3yDq+fZBTazCSJysOMbxWL1BSow5/V2vxeg= -github.com/lichdotdev/gio v0.0.0-20261021132818-f0df03d51088 h1:LlSkhfkmtJSkhrCOotDhOycTKvuZPpQIblwxOmAf5NU= -github.com/lichdotdev/gio v0.0.0-20261021132818-f0df03d51088/go.mod h1:x8MAOooc/v4UUaB5o6BS/FpYdxnzh3LBvZlTBmYpnlQ= +github.com/lichdotdev/gio v0.0.0-20261022192911-12496229bb5d h1:L1XlAjanPzBJJyJgnNlGRUxyLOHJ/0SX3Yo3mXIMDDY= +github.com/lichdotdev/gio v0.0.0-20261022192911-12496229bb5d/go.mod h1:x8MAOooc/v4UUaB5o6BS/FpYdxnzh3LBvZlTBmYpnlQ= github.com/lichdotdev/godemirror v0.8.0 h1:sPnCNZ1JygGr6J4IoiT1Oe2tbv1HmrTbPXUDhC81T8I= github.com/lichdotdev/godemirror v0.8.0/go.mod h1:xCdFPbos7+4/bCymJIx7FnL4EpsuMpebRCbGM5Un4fg= github.com/yuin/goldmark v1.4.13 h1:fVcFKWvrslecOb/tg+Cc05dkeYx540o0FuFt3nUVDoE=