libevdev mouse support

This commit is contained in:
Cacodemon345
2021-12-10 01:03:20 +06:00
parent 05943477a6
commit 7934d90039
5 changed files with 128 additions and 6 deletions

View File

@@ -4,6 +4,8 @@
#include "qt_softwarerenderer.hpp"
#include "qt_hardwarerenderer.hpp"
#include "evdev_mouse.hpp"
#include <QScreen>
#ifdef __APPLE__
@@ -25,6 +27,16 @@ RendererStack::RendererStack(QWidget *parent) :
imagebufs = QVector<QImage>(2);
imagebufs[0] = QImage{QSize(2048 + 64, 2048 + 64), QImage::Format_RGB32};
imagebufs[1] = QImage{QSize(2048 + 64, 2048 + 64), QImage::Format_RGB32};
#ifdef WAYLAND
if (QApplication::platformName().contains("wayland")) {
wl_init();
}
#endif
#ifdef EVDEV_INPUT
if (QApplication::platformName() == "xcb" || QApplication::platformName() == "eglfs") {
evdev_init();
}
#endif
}
RendererStack::~RendererStack()
@@ -67,6 +79,9 @@ void RendererStack::mousePoll()
if (QApplication::platformName().contains("wayland"))
wl_mouse_poll();
#endif
#ifdef EVDEV_INPUT
evdev_mouse_poll();
#endif
#endif
}