Skip to content

No mouse drag end event when dragging mouse out of the window #7244

@anhpt379

Description

@anhpt379

Describe the bug
I'm on macOS Sonoma 14.3.1. When using tmux (version 3.4), the MouseDragEnd1Pane event doesn't get triggered when I drag the mouse out of the current window. I've tried with the default macOS Terminal app, and WezTerm, they don't have this issue.

To Reproduce
Steps to reproduce the behavior:

  1. Copy this config to /tmp/tmux.conf:
set-option -g mouse on
set-option -g mode-keys vi
bind-key -T copy-mode-vi MouseDragEnd1Pane display-message "Drag ended"
  1. Launch tmux with the config file above: tmux -f /tmp/tmux.conf.
  2. Press the left mouse button in the middle of a text line in the window.
  3. Hold and drag the mouse to the left, outside of the current window.
  4. Release the left mouse button.
  5. No Drag ended doesn't show up, meaning the mouse drag end event doesn't fire.

Environment details

kitty 0.33.1 (a5fea33757) created by Kovid Goyal
Darwin L2HHKL97RH 23.3.0 Darwin Kernel Version 23.3.0: Wed Dec 20 21:30:44 PST 2023; root:xnu-10002.81.5~7/RELEASE_ARM64_T6000 arm64
ProductName:		macOS ProductVersion:		14.3.1 BuildVersion:		23D60
Frozen: True
Paths:
  kitty: /Users/panh/Applications/kitty.app/Contents/MacOS/kitty
  base dir: /Users/panh/Applications/kitty.app/Contents/Resources/kitty
  extensions dir: /Users/panh/Applications/kitty.app/Contents/Resources/Python/lib/kitty-extensions
  system shell: /bin/bash

Config options different from defaults:
Removed shortcuts:
	cmd+, →  edit_config_file
	cmd+enter →  new_window
	cmd+h →  hide_macos_app
	cmd+k →  clear_terminal to_cursor active
	cmd+m →  minimize_macos_window
	cmd+n →  new_os_window
	cmd+q →  quit
	cmd+t →  new_tab
	cmd+w →  close_tab
	ctrl+cmd+, →  load_config_file
	ctrl+cmd+f →  toggle_fullscreen
	opt+cmd+h →  hide_macos_other_apps
	opt+cmd+r →  clear_terminal reset active
	opt+cmd+s →  toggle_macos_secure_keyboard_entry
	shift+cmd+/ →  open_url https://sw.kovidgoyal.net/kitty/
	shift+cmd+[ →  previous_tab
	shift+cmd+] →  next_tab
	shift+cmd+d →  close_window
	shift+cmd+w →  close_os_window

Important environment variables seen by the kitty process:
	PATH                                /usr/local/bin:/System/Cryptexes/App/usr/bin:/usr/bin:/bin:/usr/sbin:/sbin:/var/run/com.apple.security.cryptexd/codex.system/bootstrap/usr/local/bin:/var/run/com.apple.security.cryptexd/codex.system/bootstrap/usr/bin:/var/run/com.apple.security.cryptexd/codex.system/bootstrap/usr/appleinternal/bin:/Applications/Privileges.app/Contents/Resources:/usr/local/munki:/Users/panh/Applications/kitty.app/Contents/MacOS
	LANG                                en_US.UTF-8
	SHELL                               /bin/bash
	DISPLAY                             /private/tmp/com.apple.launchd.gxTONFhPQD/org.xquartz:0
	USER                                panh

Additional context
It sort of works when using the default font size, and when the window is in full screen mode: dragging the mouse to the left edge of the screen and release, the message Drag ended shows up. But when switching to a different font size it stops working.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions