Make WindowSwitching (Alt+Tab) the default left touch screen edge
Summary: Based on the feedback from discussion on plasma-devel the currently only default touch action on a screen edge should be window switching. Given that our default window switcher is located on the left and works very nicely for touch event it becomes the default action on the left screen. Reviewers: #kwin, #plasma Subscribers: plasma-devel, kwin Tags: #kwin Differential Revision: https://phabricator.kde.org/D5551
This commit is contained in:
parent
014afe1c05
commit
c453eb696c
2 changed files with 6 additions and 4 deletions
|
@ -252,7 +252,7 @@ void KWinScreenEdgesConfig::monitorLoad()
|
|||
KConfigGroup tabBoxConfig(m_config, "TabBox");
|
||||
list.clear();
|
||||
// TabBox
|
||||
list.append(int(ElectricNone));
|
||||
list.append(int(ElectricLeft));
|
||||
list = tabBoxConfig.readEntry("TouchBorderActivate", list);
|
||||
foreach (int i, list) {
|
||||
monitorChangeEdge(ElectricBorder(i), int(TabBox));
|
||||
|
@ -347,6 +347,8 @@ void KWinScreenEdgesConfig::monitorDefaults()
|
|||
// Clear all edges
|
||||
for (int i = 0; i < 8; i++)
|
||||
m_ui->monitor->selectEdgeItem(i, 0);
|
||||
// select TabBox
|
||||
m_ui->monitor->selectEdgeItem(int(Monitor::Left), int(TabBox));
|
||||
}
|
||||
|
||||
void KWinScreenEdgesConfig::monitorShowEvent()
|
||||
|
|
|
@ -821,14 +821,14 @@ void TabBox::reconfigure()
|
|||
borderConfig = QStringLiteral("BorderAlternativeActivate");
|
||||
}
|
||||
|
||||
auto touchConfig = [this, config] (const QString &key, QHash<ElectricBorder, QAction *> &actions, TabBoxMode mode) {
|
||||
auto touchConfig = [this, config] (const QString &key, QHash<ElectricBorder, QAction *> &actions, TabBoxMode mode, const QStringList &defaults = QStringList{}) {
|
||||
// fist erase old config
|
||||
for (auto it = actions.begin(); it != actions.end(); ) {
|
||||
delete it.value();
|
||||
it = actions.erase(it);
|
||||
}
|
||||
// now new config
|
||||
const QStringList list = config.readEntry(key, QStringList());
|
||||
const QStringList list = config.readEntry(key, defaults);
|
||||
for (const auto &s : list) {
|
||||
bool ok;
|
||||
const int i = s.toInt(&ok);
|
||||
|
@ -841,7 +841,7 @@ void TabBox::reconfigure()
|
|||
actions.insert(ElectricBorder(i), a);
|
||||
}
|
||||
};
|
||||
touchConfig(QStringLiteral("TouchBorderActivate"), m_touchActivate, TabBoxWindowsMode);
|
||||
touchConfig(QStringLiteral("TouchBorderActivate"), m_touchActivate, TabBoxWindowsMode, QStringList{QString::number(int(ElectricLeft))});
|
||||
touchConfig(QStringLiteral("TouchBorderAlternativeActivate"), m_touchAlternativeActivate, TabBoxWindowsAlternativeMode);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue