diff --git a/plugins/platforms/drm/drm_inputeventfilter.cpp b/plugins/platforms/drm/drm_inputeventfilter.cpp
index e4ef498041..e2625ca3ea 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 .
*********************************************************************/
#include "drm_inputeventfilter.h"
#include "drm_backend.h"
+#include "wayland_server.h"
#include
+#include
+
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_secondTap) {
if (m_doubleTapTimer.elapsed() < qApp->doubleClickInterval()) {
+ waylandServer()->seat()->setTimestamp(time);
notify();
}
m_doubleTapTimer.invalidate();
diff --git a/plugins/platforms/wayland/wayland_backend.cpp b/plugins/platforms/wayland/wayland_backend.cpp
index 1beec17101..e06881f097 100644
--- a/plugins/platforms/wayland/wayland_backend.cpp
+++ b/plugins/platforms/wayland/wayland_backend.cpp
@@ -525,7 +525,7 @@ void WaylandBackend::createSurface()
m_seat->setInstallCursor(true);
}
// check for xdg shell
- auto xdgIface = m_registry->interface(Registry::Interface::XdgShellUnstableV5);
+ auto xdgIface = m_registry->interface(Registry::Interface::XdgShellUnstableV6);
if (xdgIface.name != 0) {
m_xdgShell = m_registry->createXdgShell(xdgIface.name, xdgIface.version, this);
if (m_xdgShell && m_xdgShell->isValid()) {
diff --git a/rules.cpp b/rules.cpp
index 6bb91bf3c3..32b389dd79 100644
--- a/rules.cpp
+++ b/rules.cpp
@@ -695,17 +695,22 @@ bool Rules::discardTemporary(bool force)
#define DISCARD_USED_SET_RULE( var ) \
do { \
- if ( var##rule == ( SetRule ) ApplyNow || ( withdrawn && var##rule == ( SetRule ) ForceTemporarily )) \
+ if ( var##rule == ( SetRule ) ApplyNow || ( withdrawn && var##rule == ( SetRule ) ForceTemporarily )) { \
var##rule = UnusedSetRule; \
+ changed = true; \
+ } \
} while ( false )
#define DISCARD_USED_FORCE_RULE( var ) \
do { \
- if ( withdrawn && var##rule == ( ForceRule ) ForceTemporarily ) \
+ if ( withdrawn && var##rule == ( ForceRule ) ForceTemporarily ) { \
var##rule = UnusedForceRule; \
+ changed = true; \
+ } \
} while ( false )
-void Rules::discardUsed(bool withdrawn)
+bool Rules::discardUsed(bool withdrawn)
{
+ bool changed = false;
DISCARD_USED_FORCE_RULE(placement);
DISCARD_USED_SET_RULE(position);
DISCARD_USED_SET_RULE(size);
@@ -742,6 +747,8 @@ void Rules::discardUsed(bool withdrawn)
DISCARD_USED_SET_RULE(shortcut);
DISCARD_USED_FORCE_RULE(disableglobalshortcuts);
DISCARD_USED_SET_RULE(desktopfile);
+
+ return changed;
}
#undef DISCARD_USED_SET_RULE
#undef DISCARD_USED_FORCE_RULE
@@ -1057,6 +1064,8 @@ void RuleBook::load()
deleteAll();
if (!m_config) {
m_config = KSharedConfig::openConfig(QStringLiteral(KWIN_NAME "rulesrc"), KConfig::NoGlobals);
+ } else {
+ m_config->reparseConfiguration();
}
int count = m_config->group("General").readEntry("count", 0);
for (int i = 1;
@@ -1129,8 +1138,9 @@ void RuleBook::discardUsed(AbstractClient* c, bool withdrawn)
it != m_rules.end();
) {
if (c->rules()->contains(*it)) {
- updated = true;
- (*it)->discardUsed(withdrawn);
+ if ((*it)->discardUsed(withdrawn)) {
+ updated = true;
+ }
if ((*it)->isEmpty()) {
c->removeRule(*it);
Rules* r = *it;
diff --git a/rules.h b/rules.h
index 8ee403f17a..278f4c7b88 100644
--- a/rules.h
+++ b/rules.h
@@ -116,7 +116,7 @@ public:
void write(KConfigGroup&) const;
bool isEmpty() const;
#ifndef KCMRULES
- void discardUsed(bool withdrawn);
+ bool discardUsed(bool withdrawn);
bool match(const AbstractClient* c) const;
bool update(AbstractClient*, int selection);
bool isTemporary() const;