|
@@ -7,24 +7,7 @@ CWaylandMouseInput::CWaylandMouseInput (WallpaperEngine::Render::Drivers::CWayla
|
|
|
waylandDriver (driver),
|
|
waylandDriver (driver),
|
|
|
m_pos () {}
|
|
m_pos () {}
|
|
|
|
|
|
|
|
-void CWaylandMouseInput::update () {
|
|
|
|
|
- if (!this->waylandDriver->getApp ().getContext ().settings.mouse.enabled) {
|
|
|
|
|
- return;
|
|
|
|
|
- }
|
|
|
|
|
-
|
|
|
|
|
- if (!waylandDriver->viewportInFocus || !waylandDriver->viewportInFocus->rendering) {
|
|
|
|
|
- return;
|
|
|
|
|
- }
|
|
|
|
|
-
|
|
|
|
|
- // TODO: IS CLEARING STATE HERE A GOOD SOLUTION? OR SHOULD BE HANDLED SOMEWHERE ELSE?
|
|
|
|
|
- if (waylandDriver->viewportInFocus->leftClick == MouseClickStatus::Released) {
|
|
|
|
|
- waylandDriver->viewportInFocus->leftClick = MouseClickStatus::Waiting;
|
|
|
|
|
- }
|
|
|
|
|
-
|
|
|
|
|
- if (waylandDriver->viewportInFocus->rightClick == MouseClickStatus::Released) {
|
|
|
|
|
- waylandDriver->viewportInFocus->rightClick = MouseClickStatus::Waiting;
|
|
|
|
|
- }
|
|
|
|
|
-}
|
|
|
|
|
|
|
+void CWaylandMouseInput::update () {}
|
|
|
|
|
|
|
|
glm::dvec2 CWaylandMouseInput::position () const {
|
|
glm::dvec2 CWaylandMouseInput::position () const {
|
|
|
if (!this->waylandDriver->getApp ().getContext ().settings.mouse.enabled) {
|
|
if (!this->waylandDriver->getApp ().getContext ().settings.mouse.enabled) {
|
|
@@ -41,12 +24,12 @@ WallpaperEngine::Input::MouseClickStatus CWaylandMouseInput::leftClick () const
|
|
|
if (waylandDriver->viewportInFocus && waylandDriver->viewportInFocus->rendering)
|
|
if (waylandDriver->viewportInFocus && waylandDriver->viewportInFocus->rendering)
|
|
|
return waylandDriver->viewportInFocus->leftClick;
|
|
return waylandDriver->viewportInFocus->leftClick;
|
|
|
|
|
|
|
|
- return MouseClickStatus::Waiting;
|
|
|
|
|
|
|
+ return MouseClickStatus::Released;
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
WallpaperEngine::Input::MouseClickStatus CWaylandMouseInput::rightClick () const {
|
|
WallpaperEngine::Input::MouseClickStatus CWaylandMouseInput::rightClick () const {
|
|
|
if (waylandDriver->viewportInFocus && waylandDriver->viewportInFocus->rendering)
|
|
if (waylandDriver->viewportInFocus && waylandDriver->viewportInFocus->rendering)
|
|
|
return waylandDriver->viewportInFocus->rightClick;
|
|
return waylandDriver->viewportInFocus->rightClick;
|
|
|
|
|
|
|
|
- return MouseClickStatus::Waiting;
|
|
|
|
|
|
|
+ return MouseClickStatus::Released;
|
|
|
}
|
|
}
|