Repository navigation
Conversation
dwl 0.8 drops touch devices, so a laptop's touchscreen did nothing. dwl now attaches one to its cursor and turns the first finger into the pointer: down moves it there and presses the left button, moving drags, lifting releases. The press goes through dwl's own buttonpress, so a tap picks a window as a click does, under the same focus rules and the lock's. Zones are offered no touch, only those pointer events, so the proxy and its policy are unchanged. A touchscreen covers the built-in panel (eDP, LVDS or DSI) when there is one, and every screen otherwise. The desktop suite proves it on QEMU's virtio-multitouch: run-ovmf.sh's --touch adds one, bound to the GPU's first head; vm-drive.py's touch: step taps it through QMP; and gui-check's touch-picks-window has a tap give an unasked zone window the keyboard. vm-drive's fixture checks the step's events.
dwl's motionnotify picks the surface under the pointer before it moves the cursor. A mouse's small steps never show it, but a touch is one jump and the button at once: the press and release went to whatever the pointer had been resting on, while the keyboard went to the window tapped. A tap on one zone's window could click another's. touchpoint picks the surface again where the touch landed, as dwl's own focus-restoring call does, before the button goes out; a finger held down keeps its window as before. gui-check's touch round now rests the pointer on zone 0's window first, and holds the tap's press and release to untrusted's probe, with none for zone 0's. wlprobe's cursor mode says each pointer button it is sent.
Closed on a dock, the panel stays on, and a touch through the lid would click, and take the keyboard, on a screen no one sees, and hold off the idle lock. touchdown drops every touch while the lid is shut. touchpoint drops one, too, while a built-in panel is there but off, dark or disabled, rather than spread it over the other screens. A finger already down still ends through touchup or touchcancel. cleanuplisteners removes the five touch listeners with the cursor's own. One touchscreen is taken to be the laptop's, which the comment now says.
DevomB
added a commit
that referenced
this pull request
Oct 23, 2026
…ap clicks the window under the finger, and no touch acts through a shut lid
DevomB
marked this pull request as ready for review
October 23, 2026 12:17
This branch has not been deployed
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.
Based on #207 (hardware-list, 2fafcbd), which the next batch builds on.
The gap. dwl 0.8's
inputdevice()handles keyboards and pointers, and Kryptik's patch adds the lid switch. Every other device falls into/* TODO handle other input device types */. A laptop's touchscreen therefore did nothing: the kernel side was there (i2c-hid, hid-multitouch), and dwl dropped it.What changes (
tools/desktop/dwl-zone-borders.py, five exact-string edits beside the lid's):wlr_pointer_button_eventhanded to dwl's ownbuttonpress, so a tap picks a window as a click does: the same focus rules, and the lock's.motionnotify(0, NULL, 0, 0, 0, 0), dwl's own focus-restoring call. dwl'smotionnotifypicks the surface before it moves the cursor. Without the second pick, a tap's press and release went to whatever the pointer had been resting on, possibly another zone's window, while the keyboard went to the window tapped.WL_SEAT_CAPABILITY_TOUCHis not advertised, so the proxy and its policy are unchanged, and a zone sees only pointer events.cleanuplistenersremoves the five touch listeners with the cursor's own.The regression check runs on the shipped image in the desktop suite:
tools/image/run-ovmf.sh --touchadds QEMU'svirtio-multitouch-pci, bound to the GPU's first head. It refuses a QEMU without the device (it arrived in 8.1; the runners have 8.2.2).tools/image/vm-drive.py touch:X,Ytaps it through QMPinput-send-event(mttbegin and data, then the touch button; then end). The events are bound to that head, so the button reaches the touchscreen, not the mouse.build/guest-tests/gui-check.shaddstouch-picks-window:The check fails if there is no touchscreen, or if zone 0 did not hold the keyboard before the tap.
touch-presses-window:wlprobe cursorprints each pointer button it is sent);Without the second pick, the press goes to zone 0's probe and the check fails.
tools/tests/vm-drive.pychecks the step's two QMP batches, and that a tap off the screen is refused before QEMU is asked.Tests.
dwl-zone-borders.py --checkand an apply on patched dwl 0.8: all 90 edits apply, and the touch hunks land.touch_events().tools/tests/vm-drive.py, which needs Unix sockets this Windows host's Python lacks.touch-picks-windowandtouch-presses-windowon the image.Not in this PR: multi-finger gestures, a touchscreen on an external monitor (it maps to the built-in panel when one is on), and pen input.