CWaylandMouseInput.cpp 465 B

1234567891011121314151617181920
  1. #include <glm/common.hpp>
  2. #include "CWaylandMouseInput.h"
  3. using namespace WallpaperEngine::Input;
  4. CWaylandMouseInput::CWaylandMouseInput(WallpaperEngine::Render::Drivers::CWaylandOpenGLDriver* driver) {
  5. waylandDriver = driver;
  6. }
  7. void CWaylandMouseInput::update ()
  8. {
  9. ;
  10. }
  11. glm::dvec2 CWaylandMouseInput::position() const {
  12. if (!waylandDriver || !waylandDriver->lastLSInFocus)
  13. return {0, 0};
  14. return waylandDriver->lastLSInFocus->mousePos;
  15. }