Merge branch 'Plasma/5.13'
This commit is contained in:
commit
32a715b0c9
4 changed files with 21 additions and 8 deletions
|
@ -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();
|
||||
|
|
|
@ -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()) {
|
||||
|
|
20
rules.cpp
20
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;
|
||||
|
|
2
rules.h
2
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;
|
||||
|
|
Loading…
Reference in a new issue