backends/libinput: Fix crash upon receiving motion absolute events
The input events can be processed when the workspace is not available, e.g. during startup or shutdown, so add a corresponding guard. As a long term plan, we need to decouple Workspace from low-level input backend parts, but it will be a too invasive change for now. BUG: 449317 BUG: 465456
This commit is contained in:
parent
520fa3042a
commit
da26deaa5c
1 changed files with 3 additions and 1 deletions
|
@ -373,7 +373,9 @@ void Connection::processEvents()
|
|||
}
|
||||
case LIBINPUT_EVENT_POINTER_MOTION_ABSOLUTE: {
|
||||
PointerEvent *pe = static_cast<PointerEvent *>(event.get());
|
||||
Q_EMIT pe->device()->pointerMotionAbsolute(pe->absolutePos(workspace()->geometry().size()), pe->time(), pe->device());
|
||||
if (workspace()) {
|
||||
Q_EMIT pe->device()->pointerMotionAbsolute(pe->absolutePos(workspace()->geometry().size()), pe->time(), pe->device());
|
||||
}
|
||||
break;
|
||||
}
|
||||
case LIBINPUT_EVENT_TOUCH_DOWN: {
|
||||
|
|
Loading…
Reference in a new issue