mirror of
https://github.com/kovidgoyal/kitty.git
synced 2026-06-24 10:01:33 +00:00
Merge branch 'more_switch_cases' of https://github.com/Luflosi/kitty
This commit is contained in:
commit
fd298256d7
1 changed files with 5 additions and 0 deletions
|
|
@ -575,16 +575,21 @@ scroll_event(double UNUSED xoffset, double yoffset, int flags) {
|
|||
enum MomentumData momentum_data = (flags >> 1) & 7;
|
||||
|
||||
switch(momentum_data) {
|
||||
case NoMomentumData:
|
||||
break;
|
||||
case MomentumPhaseBegan:
|
||||
window_for_momentum_scroll = w->id;
|
||||
main_screen_for_momentum_scroll = screen->linebuf == screen->main_linebuf;
|
||||
break;
|
||||
case MomentumPhaseStationary:
|
||||
case MomentumPhaseActive:
|
||||
if (window_for_momentum_scroll != w->id || main_screen_for_momentum_scroll != (screen->linebuf == screen->main_linebuf)) return;
|
||||
break;
|
||||
case MomentumPhaseEnded:
|
||||
case MomentumPhaseCancelled:
|
||||
window_for_momentum_scroll = 0;
|
||||
break;
|
||||
case MomentumPhaseMayBegin:
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue