Repository navigation
A zone's pointer shows dwl's default cursor, never the zone's own image - #201
Merged
Merged
Conversation
…set, which would be drawn above every window wherever its hotspot put it
This was referenced Oct 2, 2026
…old when a surface of its own enters an output, a cursor image among them once the compositor takes it. Zone 0's image is told, a zone's client hears of its window through its proxy, and its image must hear nothing; a screenshot from the host holds no cursor, so the pixel count could not pass
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
While the pointer was over a zone's window, the zone could draw anywhere on the screen, over the chrome's windows and the other zones' borders included. It did this with its cursor image.
kryptik-wlproxyforwardswl_pointer.set_cursorunchanged, becausewl_seatis on its allowlist.setcursor()passed the image of whichever client had pointer focus towlr_cursor_set_surface().The fix
In
setcursor(), a client whose window under the pointer is zoned (c->zoneborder != unzonedcolor) gets dwl's default xcursor, never its own surface (tools/desktop/dwl-zone-borders.py). Zone 0's clients are unchanged.The cost: zone programs lose their own cursor shapes, such as a text cursor. Over a zone's window the pointer is always the arrow.
Other ways a zone's surface could reach the cursor
setcursor()is dwl's only caller ofwlr_cursor_set_surface(). The other routes are closed:wl_data_device_manager, which the proxy hides.wp_cursor_shape_manager_v1is not on the proxy's allowlist. A shape is drawn from the compositor's own cursor theme in any case.Back on zone 0's windows
A zone's image is never installed, so there is nothing to restore. Moving onto a border or the background sets the default cursor (
motionnotify), and a zone 0 client sets its own cursor when the pointer enters its window.Tests (desktop suite)
wlprobe cursor SECONDSmaps a window. On everywl_pointer.enterit asks for a cursor image of 2560x1600 with the hotspot in its middle, in a colour nothing else draws (cursor_rgb). If drawn, the image covers the whole 1280x800 screen.vm-drive.pyhas a newpointer:DX,DYstep, which moves the guest's mouse through QMP. The suite moves the pointer to the top-left corner and then into the newest window, which crosses that window's border and so focuses it.zone0-cursor-set: the host checks that its image covers more than half the screenshot. This shows a drawn cursor appears in a screendump, which a hardware-plane cursor would not.zone-cursor-asked: the host checks that not one pixel of the colour is drawn, and that the untrusted, work and chrome windows are framed as before.A later option, not built
Cap a zone's cursor at 64x64 with the hotspot clamped inside it, and keep both up to date on every commit to the cursor surface. Zone programs would keep their own shapes, but that takes more code in dwl or the proxy.
Overlap with #191 (fullscreen bar)
Both PRs change
wlprobe.c's mode check and usage line and the header comment ofkryptik-chrome. Whichever merges second keeps both. With both in, the comment would read: "No zone can draw over it by itself, read its input or capture it: the proxy passes no layer shell, global input or screencopy, dwl never draws a zone's cursor image, and a zone's window covers the chrome only fullscreen, by the user's Alt+e, until the chrome opens another window."