mirror of
https://github.com/ghostty-org/ghostty.git
synced 2025-07-15 00:06:09 +03:00
core: mouse reports should always send on release even if outside
Fixes #481
This commit is contained in:
@ -1305,8 +1305,9 @@ fn mouseReport(
|
||||
.any => {},
|
||||
}
|
||||
|
||||
// The maximum pos values so we can determine if we're outside the window.
|
||||
// If we're outside the window, we do not report mouse events.
|
||||
// Handle scenarios where the mouse position is outside the viewport.
|
||||
// We always report release events no matter where they happen.
|
||||
if (action != .release) {
|
||||
const pos_out_viewport = pos_out_viewport: {
|
||||
const max_x: f32 = @floatFromInt(self.screen_size.width);
|
||||
const max_y: f32 = @floatFromInt(self.screen_size.height);
|
||||
@ -1325,6 +1326,7 @@ fn mouseReport(
|
||||
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
// This format reports X/Y
|
||||
const viewport_point = self.posToViewport(pos.x, pos.y);
|
||||
|
Reference in New Issue
Block a user