summaryrefslogtreecommitdiffstats
path: root/tests/auto
diff options
context:
space:
mode:
authorJohan Klokkhammer Helsing <johan.helsing@qt.io>2018-05-08 16:31:55 +0200
committerJohan Helsing <johan.helsing@qt.io>2018-05-09 09:55:24 +0000
commit7344822dd3991fa4b914531d7e2a42b1c05c1e9d (patch)
tree44e84db81a5f7441c0e69161607323ffb122fe9b /tests/auto
parent44f3b888a3f88ac8097ff65aec0101dbe6a369ef (diff)
Fix QWaylandXdgShellV6Integration::handleKeyboardFocusChanged
The implementation was broken because it: 1. Didn't activate popups. 2. Activated toplevels with keyboard focus twice. 3. Tried to cast to xdg-shell-v5 classes, so windows were never deactivated. Change-Id: If492ebdbcd10a3214424f7bf6ac01e7ba8704bbf Reviewed-by: Paul Olav Tvete <paul.tvete@qt.io>
Diffstat (limited to 'tests/auto')
-rw-r--r--tests/auto/client/shared/mocksurface.cpp5
1 files changed, 4 insertions, 1 deletions
diff --git a/tests/auto/client/shared/mocksurface.cpp b/tests/auto/client/shared/mocksurface.cpp
index 81a865f11..82ce37acb 100644
--- a/tests/auto/client/shared/mocksurface.cpp
+++ b/tests/auto/client/shared/mocksurface.cpp
@@ -70,7 +70,10 @@ void Compositor::sendShellSurfaceConfigure(void *data, const QList<QVariant> &pa
QSize size = parameters.at(1).toSize();
Q_ASSERT(size.isValid());
if (auto toplevel = surface->xdgToplevelV6()) {
- toplevel->send_configure(size.width(), size.height(), QByteArray());
+ QVector<uint> states = { ZXDG_TOPLEVEL_V6_STATE_ACTIVATED };
+ auto statesBytes = QByteArray::fromRawData(reinterpret_cast<const char *>(states.data()),
+ states.size() * static_cast<int>(sizeof(uint)));
+ toplevel->send_configure(size.width(), size.height(), statesBytes);
toplevel->xdgSurface()->send_configure(compositor->nextSerial());
} else if (auto wlShellSurface = surface->wlShellSurface()) {
const uint edges = 0;