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_inputeventfilter.h"
#include "drm_backend.h" #include "drm_backend.h"
#include "wayland_server.h"
#include <QApplication> #include <QApplication>
#include <KWayland/Server/seat_interface.h>
namespace KWin namespace KWin
{ {
@ -82,10 +85,10 @@ bool DpmsInputEventFilter::touchDown(quint32 id, const QPointF &pos, quint32 tim
bool DpmsInputEventFilter::touchUp(quint32 id, quint32 time) bool DpmsInputEventFilter::touchUp(quint32 id, quint32 time)
{ {
Q_UNUSED(time)
m_touchPoints.removeAll(id); m_touchPoints.removeAll(id);
if (m_touchPoints.isEmpty() && m_doubleTapTimer.isValid() && m_secondTap) { if (m_touchPoints.isEmpty() && m_doubleTapTimer.isValid() && m_secondTap) {
if (m_doubleTapTimer.elapsed() < qApp->doubleClickInterval()) { if (m_doubleTapTimer.elapsed() < qApp->doubleClickInterval()) {
waylandServer()->seat()->setTimestamp(time);
notify(); notify();
} }
m_doubleTapTimer.invalidate(); m_doubleTapTimer.invalidate();

View File

@ -525,7 +525,7 @@ void WaylandBackend::createSurface()
m_seat->setInstallCursor(true); m_seat->setInstallCursor(true);
} }
// check for xdg shell // check for xdg shell
auto xdgIface = m_registry->interface(Registry::Interface::XdgShellUnstableV5); auto xdgIface = m_registry->interface(Registry::Interface::XdgShellUnstableV6);
if (xdgIface.name != 0) { if (xdgIface.name != 0) {
m_xdgShell = m_registry->createXdgShell(xdgIface.name, xdgIface.version, this); m_xdgShell = m_registry->createXdgShell(xdgIface.name, xdgIface.version, this);
if (m_xdgShell && m_xdgShell->isValid()) { if (m_xdgShell && m_xdgShell->isValid()) {

View File

@ -695,17 +695,22 @@ bool Rules::discardTemporary(bool force)
#define DISCARD_USED_SET_RULE( var ) \ #define DISCARD_USED_SET_RULE( var ) \
do { \ do { \
if ( var##rule == ( SetRule ) ApplyNow || ( withdrawn && var##rule == ( SetRule ) ForceTemporarily )) \ if ( var##rule == ( SetRule ) ApplyNow || ( withdrawn && var##rule == ( SetRule ) ForceTemporarily )) { \
var##rule = UnusedSetRule; \ var##rule = UnusedSetRule; \
changed = true; \
} \
} while ( false ) } while ( false )
#define DISCARD_USED_FORCE_RULE( var ) \ #define DISCARD_USED_FORCE_RULE( var ) \
do { \ do { \
if ( withdrawn && var##rule == ( ForceRule ) ForceTemporarily ) \ if ( withdrawn && var##rule == ( ForceRule ) ForceTemporarily ) { \
var##rule = UnusedForceRule; \ var##rule = UnusedForceRule; \
changed = true; \
} \
} while ( false ) } while ( false )
void Rules::discardUsed(bool withdrawn) bool Rules::discardUsed(bool withdrawn)
{ {
bool changed = false;
DISCARD_USED_FORCE_RULE(placement); DISCARD_USED_FORCE_RULE(placement);
DISCARD_USED_SET_RULE(position); DISCARD_USED_SET_RULE(position);
DISCARD_USED_SET_RULE(size); DISCARD_USED_SET_RULE(size);
@ -742,6 +747,8 @@ void Rules::discardUsed(bool withdrawn)
DISCARD_USED_SET_RULE(shortcut); DISCARD_USED_SET_RULE(shortcut);
DISCARD_USED_FORCE_RULE(disableglobalshortcuts); DISCARD_USED_FORCE_RULE(disableglobalshortcuts);
DISCARD_USED_SET_RULE(desktopfile); DISCARD_USED_SET_RULE(desktopfile);
return changed;
} }
#undef DISCARD_USED_SET_RULE #undef DISCARD_USED_SET_RULE
#undef DISCARD_USED_FORCE_RULE #undef DISCARD_USED_FORCE_RULE
@ -1129,8 +1136,9 @@ void RuleBook::discardUsed(AbstractClient* c, bool withdrawn)
it != m_rules.end(); it != m_rules.end();
) { ) {
if (c->rules()->contains(*it)) { if (c->rules()->contains(*it)) {
updated = true; if ((*it)->discardUsed(withdrawn)) {
(*it)->discardUsed(withdrawn); updated = true;
}
if ((*it)->isEmpty()) { if ((*it)->isEmpty()) {
c->removeRule(*it); c->removeRule(*it);
Rules* r = *it; Rules* r = *it;

View File

@ -116,7 +116,7 @@ public:
void write(KConfigGroup&) const; void write(KConfigGroup&) const;
bool isEmpty() const; bool isEmpty() const;
#ifndef KCMRULES #ifndef KCMRULES
void discardUsed(bool withdrawn); bool discardUsed(bool withdrawn);
bool match(const AbstractClient* c) const; bool match(const AbstractClient* c) const;
bool update(AbstractClient*, int selection); bool update(AbstractClient*, int selection);
bool isTemporary() const; bool isTemporary() const;