diff --git a/src/backends/libinput/connection.cpp b/src/backends/libinput/connection.cpp index 9487db9fec..aacea06f54 100644 --- a/src/backends/libinput/connection.cpp +++ b/src/backends/libinput/connection.cpp @@ -477,7 +477,10 @@ void Connection::processEvents() if (workspace()) { #ifndef KWIN_BUILD_TESTING auto client = workspace()->activeClient(); - const auto *output = static_cast(client ? client->output() : tte->device()->output()); + auto *output = static_cast(client ? client->output() : tte->device()->output()); + if (!output) { + output = static_cast(workspace()->activeOutput()); + } const QPointF globalPos = devicePointToGlobalPosition(tte->transformedPosition(output->modeSize()), output);