Fix fake scroll when scrolling in unfocused kitty window

Scrolling should happen in the kitty window under the mouse cursor, not in the currently active kitty window.
This commit is contained in:
Luflosi
2020-06-04 23:57:01 +02:00
parent 04b6bf3b74
commit 85fe783652
4 changed files with 3 additions and 4 deletions

View File

@@ -203,8 +203,7 @@ on_key_input(GLFWkeyevent *ev) {
}
void
fake_scroll(int amount, bool upwards) {
Window *w = active_window();
fake_scroll(Window *w, int amount, bool upwards) {
if (!w) return;
int key = upwards ? GLFW_KEY_UP : GLFW_KEY_DOWN;
while (amount-- > 0) {