mirror of
https://github.com/ghostty-org/ghostty.git
synced 2025-07-16 08:46:08 +03:00
core: only update mouse hover point when no other mouse action
This commit is contained in:
@ -2069,8 +2069,10 @@ pub fn cursorPosCallback(
|
|||||||
self.renderer_state.mutex.lock();
|
self.renderer_state.mutex.lock();
|
||||||
defer self.renderer_state.mutex.unlock();
|
defer self.renderer_state.mutex.unlock();
|
||||||
|
|
||||||
// Update our mouse state
|
// Update our mouse state. We set this to null initially because we only
|
||||||
self.renderer_state.mouse.point = pos_vp;
|
// want to set it when we're not selecting or doing any other mouse
|
||||||
|
// event.
|
||||||
|
self.renderer_state.mouse.point = null;
|
||||||
|
|
||||||
// If we have an inspector, we need to always record position information
|
// If we have an inspector, we need to always record position information
|
||||||
if (self.inspector) |insp| {
|
if (self.inspector) |insp| {
|
||||||
@ -2136,6 +2138,7 @@ pub fn cursorPosCallback(
|
|||||||
|
|
||||||
// Handle link hovering
|
// Handle link hovering
|
||||||
if (try self.linkAtPos(pos)) |_| {
|
if (try self.linkAtPos(pos)) |_| {
|
||||||
|
self.renderer_state.mouse.point = pos_vp;
|
||||||
self.mouse.over_link = true;
|
self.mouse.over_link = true;
|
||||||
try self.rt_surface.setMouseShape(.pointer);
|
try self.rt_surface.setMouseShape(.pointer);
|
||||||
try self.queueRender();
|
try self.queueRender();
|
||||||
|
Reference in New Issue
Block a user