Merge branch 'Plasma/5.9'
commit
f55b606065
|
@ -20,6 +20,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
#include "kwin_wayland_test.h"
|
#include "kwin_wayland_test.h"
|
||||||
#include "cursor.h"
|
#include "cursor.h"
|
||||||
#include "input.h"
|
#include "input.h"
|
||||||
|
#include "keyboard_input.h"
|
||||||
#include "platform.h"
|
#include "platform.h"
|
||||||
#include "screens.h"
|
#include "screens.h"
|
||||||
#include "wayland_server.h"
|
#include "wayland_server.h"
|
||||||
|
@ -283,11 +284,26 @@ void ModifierOnlyShortcutTest::testCapsLock()
|
||||||
QCOMPARE(input()->keyboardModifiers(), Qt::ShiftModifier);
|
QCOMPARE(input()->keyboardModifiers(), Qt::ShiftModifier);
|
||||||
QCOMPARE(triggeredSpy.count(), 1);
|
QCOMPARE(triggeredSpy.count(), 1);
|
||||||
|
|
||||||
|
// meta on the other hand should trigger
|
||||||
|
group.writeEntry("Meta", QStringList{s_serviceName, s_path, s_serviceName, QStringLiteral("shortcut")});
|
||||||
|
group.writeEntry("Alt", QStringList());
|
||||||
|
group.writeEntry("Shift", QStringList{});
|
||||||
|
group.writeEntry("Control", QStringList());
|
||||||
|
group.sync();
|
||||||
|
workspace()->slotReconfigure();
|
||||||
|
kwinApp()->platform()->keyboardKeyPressed(KEY_LEFTMETA, timestamp++);
|
||||||
|
QCOMPARE(input()->keyboardModifiers(), Qt::ShiftModifier | Qt::MetaModifier);
|
||||||
|
QCOMPARE(input()->keyboard()->xkb()->modifiersRelevantForGlobalShortcuts(), Qt::MetaModifier);
|
||||||
|
kwinApp()->platform()->keyboardKeyReleased(KEY_LEFTMETA, timestamp++);
|
||||||
|
QEXPECT_FAIL("", "BUG 375355", Continue);
|
||||||
|
QCOMPARE(triggeredSpy.count(), 2);
|
||||||
|
|
||||||
// release caps lock
|
// release caps lock
|
||||||
kwinApp()->platform()->keyboardKeyPressed(KEY_CAPSLOCK, timestamp++);
|
kwinApp()->platform()->keyboardKeyPressed(KEY_CAPSLOCK, timestamp++);
|
||||||
kwinApp()->platform()->keyboardKeyReleased(KEY_CAPSLOCK, timestamp++);
|
kwinApp()->platform()->keyboardKeyReleased(KEY_CAPSLOCK, timestamp++);
|
||||||
QCOMPARE(input()->keyboardModifiers(), Qt::NoModifier);
|
QCOMPARE(input()->keyboardModifiers(), Qt::NoModifier);
|
||||||
QCOMPARE(triggeredSpy.count(), 1);
|
QEXPECT_FAIL("", "BUG 375355", Continue);
|
||||||
|
QCOMPARE(triggeredSpy.count(), 2);
|
||||||
}
|
}
|
||||||
|
|
||||||
void ModifierOnlyShortcutTest::testGlobalShortcutsDisabled_data()
|
void ModifierOnlyShortcutTest::testGlobalShortcutsDisabled_data()
|
||||||
|
|
|
@ -24,6 +24,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
#include "platform.h"
|
#include "platform.h"
|
||||||
|
|
||||||
#include <KGlobalAccel>
|
#include <KGlobalAccel>
|
||||||
|
#include <KLocalizedString>
|
||||||
#include <QAction>
|
#include <QAction>
|
||||||
#include <QDBusConnection>
|
#include <QDBusConnection>
|
||||||
#include <QDBusMessage>
|
#include <QDBusMessage>
|
||||||
|
@ -107,7 +108,7 @@ void KeyboardLayout::notifyLayoutChange()
|
||||||
QStringLiteral("org.kde.osdService"),
|
QStringLiteral("org.kde.osdService"),
|
||||||
QStringLiteral("kbdLayoutChanged"));
|
QStringLiteral("kbdLayoutChanged"));
|
||||||
|
|
||||||
msg << m_xkb->layoutName();
|
msg << i18nd("xkeyboard-config", m_xkb->layoutName().toUtf8().constData());
|
||||||
|
|
||||||
QDBusConnection::sessionBus().asyncCall(msg);
|
QDBusConnection::sessionBus().asyncCall(msg);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue