fix duplicate scroll events
This commit is contained in:
parent
dc83e09f43
commit
d636de027b
1 changed files with 8 additions and 6 deletions
14
src/window.c
14
src/window.c
|
@ -428,7 +428,7 @@ static void window_process_xcb_event(UIWindow *window, xcb_generic_event_t *even
|
|||
node_dispatch(window->root, UI_EVENT_RELAYOUT, 0, NULL);
|
||||
window_invalidate_node(window, window->root);
|
||||
#ifdef _UI_DEBUG
|
||||
node_dump(window->root, 0);
|
||||
//node_dump(window->root, 0);
|
||||
#endif
|
||||
}
|
||||
end_clock();
|
||||
|
@ -497,12 +497,14 @@ static void window_process_xcb_event(UIWindow *window, xcb_generic_event_t *even
|
|||
}
|
||||
}
|
||||
|
||||
UINode *n = node;
|
||||
while (n) {
|
||||
if (node_dispatch(n, ui_event, state, &delta) > 0) {
|
||||
break;
|
||||
if (!(ui_event == UI_EVENT_SCROLL && !state)) {
|
||||
UINode *n = node;
|
||||
while (n) {
|
||||
if (node_dispatch(n, ui_event, state, &delta) > 0) {
|
||||
break;
|
||||
}
|
||||
n = n->parent;
|
||||
}
|
||||
n = n->parent;
|
||||
}
|
||||
|
||||
if (ui_event == UI_EVENT_BUTTON_LEFT_UPDATE) {
|
||||
|
|
Loading…
Reference in a new issue