Merge branch 'fix-mouse-scroll' of https://github.com/page-down/kitty
This commit is contained in:
commit
26b976d17d
@ -795,6 +795,17 @@ scroll_event(double UNUSED xoffset, double yoffset, int flags, int modifiers) {
|
|||||||
if (t) w = t->windows + t->active_window;
|
if (t) w = t->windows + t->active_window;
|
||||||
}
|
}
|
||||||
if (!w) return;
|
if (!w) return;
|
||||||
|
// Also update mouse cursor position while kitty OS window is not focused.
|
||||||
|
// Allows scroll events to be delivered to the child with correct pointer co-ordinates even when
|
||||||
|
// the window is not focused on macOS
|
||||||
|
if (!osw->is_focused) {
|
||||||
|
unsigned int x = 0, y = 0;
|
||||||
|
bool in_left_half_of_cell;
|
||||||
|
if (cell_for_pos(w, &x, &y, &in_left_half_of_cell, osw)) {
|
||||||
|
w->mouse_pos.cell_x = x; w->mouse_pos.cell_y = y;
|
||||||
|
w->mouse_pos.in_left_half_of_cell = in_left_half_of_cell;
|
||||||
|
}
|
||||||
|
}
|
||||||
Screen *screen = w->render_data.screen;
|
Screen *screen = w->render_data.screen;
|
||||||
|
|
||||||
enum MomentumData { NoMomentumData, MomentumPhaseBegan, MomentumPhaseStationary, MomentumPhaseActive, MomentumPhaseEnded, MomentumPhaseCancelled, MomentumPhaseMayBegin };
|
enum MomentumData { NoMomentumData, MomentumPhaseBegan, MomentumPhaseStationary, MomentumPhaseActive, MomentumPhaseEnded, MomentumPhaseCancelled, MomentumPhaseMayBegin };
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user