[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-commits
Subject:    [kwin/Plasma/5.12] plugins/platforms/drm: Update seat's timestamp after waking up screen through dou
From:       Martin_Flöser <null () kde ! org>
Date:       2018-05-20 13:40:45
Message-ID: E1fKOZp-0002KM-EG () code ! kde ! org
[Download RAW message or body]

Git commit 69afe4d266ffbde364913d31fbcbc00769b4b390 by Martin Fl=C3=B6ser.
Committed on 20/05/2018 at 13:38.
Pushed by graesslin into branch 'Plasma/5.12'.

Update seat's timestamp after waking up screen through double tap

Summary:
The drm platform has a special handling for touch events while the
screen is in dpms. All touch events are filtered out, but a double
tap wakes up the screen.

Due to the filtering out of the events the idle timers were not reset.
So if you only double tapped, the screen turned on, but not off again.

This change updates the timestamp after double tap, so that the idle
timers are restarted. All other events are still filtered out, to not
have "fake" events (e.g. smart phone in pocket) wake up the device.

BUG: 392754
FIXED-IN: 5.12.6

Test Plan: only compile tested

Reviewers: #kwin, #plasma

Subscribers: kwin

Tags: #kwin

Differential Revision: https://phabricator.kde.org/D12668

M  +4    -1    plugins/platforms/drm/drm_inputeventfilter.cpp

https://commits.kde.org/kwin/69afe4d266ffbde364913d31fbcbc00769b4b390

diff --git a/plugins/platforms/drm/drm_inputeventfilter.cpp b/plugins/platf=
orms/drm/drm_inputeventfilter.cpp
index e4ef49804..e2625ca3e 100644
--- a/plugins/platforms/drm/drm_inputeventfilter.cpp
+++ b/plugins/platforms/drm/drm_inputeventfilter.cpp
@@ -19,9 +19,12 @@ along with this program.  If not, see <http://www.gnu.or=
g/licenses/>.
 *********************************************************************/
 #include "drm_inputeventfilter.h"
 #include "drm_backend.h"
+#include "wayland_server.h"
 =

 #include <QApplication>
 =

+#include <KWayland/Server/seat_interface.h>
+
 namespace KWin
 {
 =

@@ -82,10 +85,10 @@ bool DpmsInputEventFilter::touchDown(quint32 id, const =
QPointF &pos, quint32 tim
 =

 bool DpmsInputEventFilter::touchUp(quint32 id, quint32 time)
 {
-    Q_UNUSED(time)
     m_touchPoints.removeAll(id);
     if (m_touchPoints.isEmpty() && m_doubleTapTimer.isValid() && m_secondT=
ap) {
         if (m_doubleTapTimer.elapsed() < qApp->doubleClickInterval()) {
+            waylandServer()->seat()->setTimestamp(time);
             notify();
         }
         m_doubleTapTimer.invalidate();

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic