[server] Do not return early on fail in touchDown fall back code

Summary:
Returning early would mean that SeatInterface::Private::touchInterface.ids
does not contain the id. Then the assert would fail in touchUp at some
point later when called by the compositor.

Reviewers: #kwin, #frameworks, davidedmundson

Reviewed By: #kwin, davidedmundson

Subscribers: kde-frameworks-devel

Tags: #frameworks

Differential Revision: https://phabricator.kde.org/D15468
This commit is contained in:
Roman Gilg 2018-09-13 10:12:15 +02:00
parent 29b8d0f258
commit de6f5a74ff

View file

@ -1332,7 +1332,7 @@ qint32 SeatInterface::touchDown(const QPointF &globalPosition)
} else if (id == 0 && focusedTouchSurface()) {
#if HAVE_LINUX_INPUT_H
const QPointF pos = globalPosition - d->touchInterface.focus.offset;
const bool result = forEachInterface<PointerInterface>(focusedTouchSurface(), d->pointers,
forEachInterface<PointerInterface>(focusedTouchSurface(), d->pointers,
[this, pos, serial] (PointerInterface *p) {
wl_pointer_send_enter(p->resource(), serial,
focusedTouchSurface()->resource(),
@ -1344,9 +1344,6 @@ qint32 SeatInterface::touchDown(const QPointF &globalPosition)
p->d_func()->sendFrame();
}
);
if (!result) {
return id;
}
#endif
}