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);
|
node_dispatch(window->root, UI_EVENT_RELAYOUT, 0, NULL);
|
||||||
window_invalidate_node(window, window->root);
|
window_invalidate_node(window, window->root);
|
||||||
#ifdef _UI_DEBUG
|
#ifdef _UI_DEBUG
|
||||||
node_dump(window->root, 0);
|
//node_dump(window->root, 0);
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
end_clock();
|
end_clock();
|
||||||
|
@ -497,12 +497,14 @@ static void window_process_xcb_event(UIWindow *window, xcb_generic_event_t *even
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
UINode *n = node;
|
if (!(ui_event == UI_EVENT_SCROLL && !state)) {
|
||||||
while (n) {
|
UINode *n = node;
|
||||||
if (node_dispatch(n, ui_event, state, &delta) > 0) {
|
while (n) {
|
||||||
break;
|
if (node_dispatch(n, ui_event, state, &delta) > 0) {
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
n = n->parent;
|
||||||
}
|
}
|
||||||
n = n->parent;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if (ui_event == UI_EVENT_BUTTON_LEFT_UPDATE) {
|
if (ui_event == UI_EVENT_BUTTON_LEFT_UPDATE) {
|
||||||
|
|
Loading…
Reference in a new issue