fix duplicate scroll events
This commit is contained in:
parent
dc83e09f43
commit
d636de027b
1 changed files with 8 additions and 6 deletions
|
@ -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,6 +497,7 @@ static void window_process_xcb_event(UIWindow *window, xcb_generic_event_t *even
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (!(ui_event == UI_EVENT_SCROLL && !state)) {
|
||||||
UINode *n = node;
|
UINode *n = node;
|
||||||
while (n) {
|
while (n) {
|
||||||
if (node_dispatch(n, ui_event, state, &delta) > 0) {
|
if (node_dispatch(n, ui_event, state, &delta) > 0) {
|
||||||
|
@ -504,6 +505,7 @@ static void window_process_xcb_event(UIWindow *window, xcb_generic_event_t *even
|
||||||
}
|
}
|
||||||
n = n->parent;
|
n = n->parent;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
if (ui_event == UI_EVENT_BUTTON_LEFT_UPDATE) {
|
if (ui_event == UI_EVENT_BUTTON_LEFT_UPDATE) {
|
||||||
if (state) {
|
if (state) {
|
||||||
|
|
Loading…
Reference in a new issue