From 6f176660fbe50c9a1299ec276e6ee3255b42a71d Mon Sep 17 00:00:00 2001 From: Aleix Pol Date: Tue, 11 Aug 2020 18:13:57 +0200 Subject: [PATCH] Fix tests build --- abstract_wayland_output.h | 2 +- libinput/connection.cpp | 7 +++++-- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/abstract_wayland_output.h b/abstract_wayland_output.h index 1876e7b27d..d09c041416 100644 --- a/abstract_wayland_output.h +++ b/abstract_wayland_output.h @@ -10,7 +10,7 @@ #define KWIN_ABSTRACT_WAYLAND_OUTPUT_H #include "abstract_output.h" -#include +#include "utils.h" #include #include diff --git a/libinput/connection.cpp b/libinput/connection.cpp index 8bba73ffc5..d66d3618a1 100644 --- a/libinput/connection.cpp +++ b/libinput/connection.cpp @@ -13,12 +13,12 @@ // TODO: Make it compile also in testing environment #ifndef KWIN_BUILD_TESTING +#include "../abstract_wayland_output.h" #include "../main.h" #include "../platform.h" #include "../screens.h" #endif -#include "../abstract_wayland_output.h" #include "../logind.h" #include "../udev.h" #include "libinput_logging.h" @@ -567,12 +567,15 @@ void Connection::processEvents() capabilities << InputRedirection::Wheel; } +#ifndef KWIN_BUILD_TESTING const auto *output = static_cast( kwinApp()->platform()->enabledOutputs()[tte->device()->screenId()]); const QPointF globalPos = devicePointToGlobalPosition(tte->transformedPosition(output->modeSize()), output); - +#else + const QPointF globalPos; +#endif emit tabletToolEvent(tabletEventType, globalPos, tte->pressure(), tte->xTilt(), tte->yTilt(), tte->rotation(),