Skip to content

fix: platform-specific bugs in darwin.go windows.go x11.go wayland.go - #76

Merged
vcaesar merged 3 commits into
masterfrom
pure-go
Oct 4, 2026
Merged

vcaesar merged 3 commits into
masterfrom
pure-go

Conversation

@vcaesar

@vcaesar vcaesar commented Oct 4, 2026

Copy link
Copy Markdown
Member
  • Add darwin_test.go, wayland_test.go
  • Update darwin.go and 5 others

Generated with Codg
Assisted-by: claude-fable-5-1 via Codg codg@atomai.cc

Please provide Issues links to:

  • Issues: #

Provide test code:

    

Description

...

- Add darwin_test.go, wayland_test.go
- Update darwin.go and 5 others

Generated with Codg
Assisted-by: claude-fable-5-1 via Codg <codg@atomai.cc>
Copilot AI balanced review requested due to automatic review settings October 4, 2026 06:35

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot review overview

🟡 Changes recommended

Session lifecycle races and incorrect click/drag state handling can leak hooks or emit inaccurate events.

Review effort: Balanced
Findings: 4 High severity · 3 Medium severity

Open (7)
What changed in this PR

Improves parity and lifecycle behavior across pure-Go platform backends.

Changes:

  • Corrects mouse release, click, drag, wheel, and button mappings.
  • Improves backend teardown handling.
  • Adds platform-specific regression tests.
File Description
darwin.go Updates Quartz event handling and lifecycle.
darwin_test.go Adds Darwin regression tests.
wayland.go Improves teardown and mouse events.
wayland_test.go Adds Wayland mapping tests.
windows.go Fixes hook startup and callback types.
windows_test.go Tests wheel and button releases.
x11.go Adds teardown ownership and mouse parity.
x11_test.go Expands X11 event tests.

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment thread darwin.go Outdated
// so an End() that ran before this point is not missed.
lck.Lock()
mac = &darwinState{tapPort: port, source: source, runLoop: runLoop}
live := asyncon
Comment thread wayland.go Outdated
// so an End() that ran before this point is not missed.
lck.Lock()
wl = st
live := asyncon
Comment thread windows.go Outdated
// hooks would stay installed on a thread nobody ever posts WM_QUIT to).
lck.Lock()
win = &winState{keyboardHook: kbHook, mouseHook: msHook, threadID: uint32(tid)}
live := asyncon
Comment thread x11.go Outdated
// so an End() that ran before this point is not missed.
lck.Lock()
xst = st
live := asyncon
Comment thread darwin.go Outdated
lck.Lock()
st := mac
lck.Unlock()
if st == nil || st.pressX != released.X || st.pressY != released.Y {
Comment thread wayland.go Outdated
Comment on lines +308 to +311
if press {
st.pressX, st.pressY = x, y
}
clicked := !press && st.pressX == x && st.pressY == y
Comment thread x11.go Outdated
Comment on lines +467 to +471
lck.Lock()
if press {
st.pressX, st.pressY = x, y
}
clicked := !press && st.pressX == x && st.pressY == y
- Update windows.go, windows_test.go

Generated with Codg
Assisted-by: claude-opus-5-5 via Codg <codg@atomai.cc>
- Add session.go, session_test.go
- Update darwin.go and 8 others

Generated with Codg
Assisted-by: claude-opus-5-5 via Codg <codg@atomai.cc>
@vcaesar
vcaesar merged commit 0d88287 into master Oct 4, 2026
10 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants