From 97b9e516d1f3243ed0c551b240700ed958589182 Mon Sep 17 00:00:00 2001 From: Aleix Pol Date: Thu, 15 Apr 2021 02:43:27 +0200 Subject: [PATCH] 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 --- src/libinput/connection.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/libinput/connection.cpp b/src/libinput/connection.cpp index 279f7cc451..9cca61a3bf 100644 --- a/src/libinput/connection.cpp +++ b/src/libinput/connection.cpp @@ -576,7 +576,7 @@ void Connection::processEvents() #ifndef KWIN_BUILD_TESTING auto client = workspace()->activeClient(); const auto *output = static_cast( - kwinApp()->platform()->enabledOutputs()[client->screen()]); + kwinApp()->platform()->enabledOutputs()[client ? client->screen() : tte->device()->screenId()]); const QPointF globalPos = devicePointToGlobalPosition(tte->transformedPosition(output->modeSize()), output);