tablet: account for the activeClient to occasionally being nullptr

Instead use the device assigned output.

 #0  KWin::Toplevel::screen() const (this=0x0) at /home/apol/devel/frameworks/kwin/src/toplevel.cpp:409
 #1  0x00007fe60ad9bef9 in KWin::LibInput::Connection::processEvents() (this=0x55d9efc155f0) at kwin/src/libinput/connection.cpp:579
 #2  0x00007fe60ad4987c in KWin::InputRedirection::setupLibInput()::$_3::operator()() const (this=0x55d9efc29a70) at kwin/src/input.cpp:2315
This commit is contained in:
Aleix Pol 2021-04-15 02:43:27 +02:00 committed by Aleix Pol Gonzalez
parent b49c7497fa
commit 97b9e516d1

View file

@ -576,7 +576,7 @@ void Connection::processEvents()
#ifndef KWIN_BUILD_TESTING
auto client = workspace()->activeClient();
const auto *output = static_cast<AbstractWaylandOutput*>(
kwinApp()->platform()->enabledOutputs()[client->screen()]);
kwinApp()->platform()->enabledOutputs()[client ? client->screen() : tte->device()->screenId()]);
const QPointF globalPos =
devicePointToGlobalPosition(tte->transformedPosition(output->modeSize()),
output);