-
Notifications
You must be signed in to change notification settings - Fork 8.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[VT Mouse Mode] Release is not fired when a drag begins inside and exits the terminal window #6401
Comments
SGR (1006)
is on, mouse is not captured when dragging outside the terminal window.
Great catch. Thanks! |
(Renamed a bit for tracking purposes.) |
This comment has been minimized.
This comment has been minimized.
I know that this doesn't |
gnome-terminal (at least) sends mouse events whose x/y are at the extreme ends of the buffer when a drag starts inside the terminal and then exits it. We would previously discard any mouse events that exited the borders of the viewport. Now we will keep emitting events where X/Y=0/w/h. Fixes #6401 in Terminal.
This pull request fixes capture and event generation in VT mouse mode for both conhost and terminal. Fixes #6401. [1/3] Terminal: clamp mouse events to the viewport, don't throw them away gnome-terminal (at least) sends mouse events whose x/y are at the extreme ends of the buffer when a drag starts inside the terminal and then exits it. We would previously discard any mouse events that exited the borders of the viewport. Now we will keep emitting events where X/Y=0/w/h. [2/3] conhost: clamp VT mouse to viewport, capture pointer This is the same as (1), but for conhost. conhost wasn't already capturing the pointer when VT mouse mode was in use. By capturing, we ensure that events that happen outside the screen still result in events sent to an application (like a release after a drag) [3/3] wpf: capture the pointer when VT mouse is enabled This is the same as (2), but for the WPF control. Clamping is handled in TerminalCore in (1), so we didn't need to do it in WPF.
This pull request fixes capture and event generation in VT mouse mode for both conhost and terminal. Fixes #6401. [1/3] Terminal: clamp mouse events to the viewport, don't throw them away gnome-terminal (at least) sends mouse events whose x/y are at the extreme ends of the buffer when a drag starts inside the terminal and then exits it. We would previously discard any mouse events that exited the borders of the viewport. Now we will keep emitting events where X/Y=0/w/h. [2/3] conhost: clamp VT mouse to viewport, capture pointer This is the same as (1), but for conhost. conhost wasn't already capturing the pointer when VT mouse mode was in use. By capturing, we ensure that events that happen outside the screen still result in events sent to an application (like a release after a drag) [3/3] wpf: capture the pointer when VT mouse is enabled This is the same as (2), but for the WPF control. Clamping is handled in TerminalCore in (1), so we didn't need to do it in WPF. (cherry picked from commit d29be59)
This pull request fixes capture and event generation in VT mouse mode for both conhost and terminal. Fixes #6401. [1/3] Terminal: clamp mouse events to the viewport, don't throw them away gnome-terminal (at least) sends mouse events whose x/y are at the extreme ends of the buffer when a drag starts inside the terminal and then exits it. We would previously discard any mouse events that exited the borders of the viewport. Now we will keep emitting events where X/Y=0/w/h. [2/3] conhost: clamp VT mouse to viewport, capture pointer This is the same as (1), but for conhost. conhost wasn't already capturing the pointer when VT mouse mode was in use. By capturing, we ensure that events that happen outside the screen still result in events sent to an application (like a release after a drag) [3/3] wpf: capture the pointer when VT mouse is enabled This is the same as (2), but for the WPF control. Clamping is handled in TerminalCore in (1), so we didn't need to do it in WPF. (cherry picked from commit d29be59)
🎉This issue was addressed in #7166, which has now been successfully released as Handy links: |
🎉This issue was addressed in #7166, which has now been successfully released as Handy links: |
Environment
Steps to reproduce
Use WSL profile, enable the mouse tracking mode
SGR (1006)
:echo -e '\e[?1003;1006h'
If you press the mouse button in the terminal window and move the cursor outside the window and release the button there, the application running in the terminal does not receive a message that the button has been released.
When the mouse tracking mode is on, while holding any mouse button and moving the cursor outside the window, the mouse tracking should not stop.
Expected behavior
If the mouse button was pressed inside the terminal, then the message about releasing the mouse button should come even if the mouse cursor has moved outside the window.
Actual behavior
А message about releasing the mouse button (and any tracking messages) does not come if the mouse cursor has moved outside the window.
The text was updated successfully, but these errors were encountered: