Merge branch 'Plasma/5.12' into Plasma/5.13

icc-effect-5.14.5
Martin Flöser 2018-05-20 15:41:48 +02:00
commit 9a9c34f352
4 changed files with 19 additions and 8 deletions

View File

@ -19,9 +19,12 @@ along with this program. If not, see <http://www.gnu.org/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_secondTap) {
if (m_doubleTapTimer.elapsed() < qApp->doubleClickInterval()) {
waylandServer()->seat()->setTimestamp(time);
notify();
}
m_doubleTapTimer.invalidate();

View File

@ -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()) {

View File

@ -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
@ -1129,8 +1136,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;

View File

@ -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;