diff --git a/CMakeLists.txt b/CMakeLists.txt
index 48ebff9b95..efd2362dfa 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -368,6 +368,7 @@ set(kwin_KDEINIT_SRCS
globalshortcuts.cpp
input.cpp
input_event.cpp
+ input_event_spy.cpp
keyboard_input.cpp
pointer_input.cpp
touch_input.cpp
diff --git a/input_event_spy.cpp b/input_event_spy.cpp
index 0b1f5004f4..a7538ab3b2 100644
--- a/input_event_spy.cpp
+++ b/input_event_spy.cpp
@@ -20,6 +20,9 @@ along with this program. If not, see .
#include "input_event_spy.h"
#include "input.h"
+#include
+#include
+
namespace KWin
{
diff --git a/input_event_spy.h b/input_event_spy.h
index 108dca39ec..843e148ffa 100644
--- a/input_event_spy.h
+++ b/input_event_spy.h
@@ -23,6 +23,9 @@ along with this program. If not, see .
#include
+class QPointF;
+class QSizeF;
+
namespace KWin
{
class KeyEvent;