libinput: Make sure we don't crash if we start without an output
This commit is contained in:
parent
4dca6408c2
commit
5f16757090
1 changed files with 4 additions and 1 deletions
|
@ -477,7 +477,10 @@ void Connection::processEvents()
|
||||||
if (workspace()) {
|
if (workspace()) {
|
||||||
#ifndef KWIN_BUILD_TESTING
|
#ifndef KWIN_BUILD_TESTING
|
||||||
auto client = workspace()->activeClient();
|
auto client = workspace()->activeClient();
|
||||||
const auto *output = static_cast<AbstractWaylandOutput *>(client ? client->output() : tte->device()->output());
|
auto *output = static_cast<AbstractWaylandOutput *>(client ? client->output() : tte->device()->output());
|
||||||
|
if (!output) {
|
||||||
|
output = static_cast<AbstractWaylandOutput *>(workspace()->activeOutput());
|
||||||
|
}
|
||||||
const QPointF globalPos =
|
const QPointF globalPos =
|
||||||
devicePointToGlobalPosition(tte->transformedPosition(output->modeSize()),
|
devicePointToGlobalPosition(tte->transformedPosition(output->modeSize()),
|
||||||
output);
|
output);
|
||||||
|
|
Loading…
Reference in a new issue