Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/swift-file-length-budget.tsv
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
14270 Sources/TerminalController.swift
13172 Sources/Workspace.swift
12348 cmuxTests/AppDelegateShortcutRoutingTests.swift
12276 Sources/GhosttyTerminalView.swift
12296 Sources/GhosttyTerminalView.swift
11669 Sources/Panels/BrowserPanel.swift
9497 cmuxTests/CLINotifyProcessIntegrationRegressionTests.swift
8032 Sources/Panels/BrowserPanelView.swift
Expand Down
20 changes: 20 additions & 0 deletions Sources/GhosttyTerminalView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -7421,6 +7421,26 @@ class GhosttyNSView: NSView, NSUserInterfaceValidations {
ghostty_surface_mouse_pos(surface, eventPoint.x, bounds.height - eventPoint.y, mouseModsFromEvent(event))
}

override func rightMouseDragged(with event: NSEvent) {
// Forward right-button drags so mouse-reporting apps receive pointer
// motion while the right button is held. Without this, tmux's
// right-click context menu (press to open, drag to highlight, release
// to select) never sees the drag and cannot track hover state. Mirrors
// mouseDragged and matches upstream Ghostty, which funnels every drag
// variant to the same position-forwarding path.
mouseDragged(with: event)
}

override func otherMouseDragged(with event: NSEvent) {
// Only the middle button (buttonNumber 2) is forwarded to Ghostty, to
// stay consistent with otherMouseDown/otherMouseUp above.
guard event.buttonNumber == 2 else {
super.otherMouseDragged(with: event)
return
}
mouseDragged(with: event)
}

#if DEBUG
func debugHasPendingLeftMouseReleaseForTesting() -> Bool {
hasPendingLeftMouseRelease
Expand Down
Loading