mirror of
https://github.com/ghostty-org/ghostty.git
synced 2025-07-17 01:06:08 +03:00
Merge pull request #2367 from ghostty-org/push-qtpouzmnnqqs
Mouse movement events are sent with shift until a button is pressed
This commit is contained in:
@ -3040,8 +3040,13 @@ pub fn cursorPosCallback(
|
|||||||
// Do a mouse report
|
// Do a mouse report
|
||||||
if (self.io.terminal.flags.mouse_event != .none) report: {
|
if (self.io.terminal.flags.mouse_event != .none) report: {
|
||||||
// Shift overrides mouse "grabbing" in the window, taken from Kitty.
|
// Shift overrides mouse "grabbing" in the window, taken from Kitty.
|
||||||
if (self.mouse.mods.shift and
|
// This only applies if there is a mouse button pressed so that
|
||||||
!self.mouseShiftCapture(false)) break :report;
|
// movement reports are not affected.
|
||||||
|
if (self.mouse.mods.shift and !self.mouseShiftCapture(false)) {
|
||||||
|
for (self.mouse.click_state) |state| {
|
||||||
|
if (state != .release) break :report;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
// We use the first mouse button we find pressed in order to report
|
// We use the first mouse button we find pressed in order to report
|
||||||
// since the spec (afaict) does not say...
|
// since the spec (afaict) does not say...
|
||||||
|
Reference in New Issue
Block a user