[InputRedirection] Don't crash on invalid Toplevel
Reviewed-By: Martin Gräßlin
This commit is contained in:
parent
38f19dafb2
commit
42ddf685c1
1 changed files with 6 additions and 4 deletions
10
input.cpp
10
input.cpp
|
@ -704,10 +704,12 @@ void InputRedirection::processPointerMotion(const QPointF &pos, uint32_t time)
|
|||
|
||||
if (waylandServer()->isScreenLocked()) {
|
||||
Toplevel *t = findToplevel(pos.toPoint());
|
||||
if (auto seat = findSeat()) {
|
||||
seat->setFocusedPointerSurface(t->surface(), t->pos());
|
||||
seat->setTimestamp(time);
|
||||
seat->setPointerPos(pos);
|
||||
if (t && t->surface()) {
|
||||
if (auto seat = findSeat()) {
|
||||
seat->setFocusedPointerSurface(t->surface(), t->pos());
|
||||
seat->setTimestamp(time);
|
||||
seat->setPointerPos(pos);
|
||||
}
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue