summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/client/qwaylandxdgshellv6integration.cpp9
-rw-r--r--tests/auto/client/shared/mocksurface.cpp5
2 files changed, 7 insertions, 7 deletions
diff --git a/src/client/qwaylandxdgshellv6integration.cpp b/src/client/qwaylandxdgshellv6integration.cpp
index d3327ff39..2713ac37b 100644
--- a/src/client/qwaylandxdgshellv6integration.cpp
+++ b/src/client/qwaylandxdgshellv6integration.cpp
@@ -41,9 +41,6 @@
#include <QtWaylandClient/private/qwaylandwindow_p.h>
#include <QtWaylandClient/private/qwaylanddisplay_p.h>
-#include <QtWaylandClient/private/qwaylandxdgsurface_p.h>
-#include <QtWaylandClient/private/qwaylandxdgpopup_p.h>
-#include <QtWaylandClient/private/qwaylandxdgshell_p.h>
#include <QtWaylandClient/private/qwaylandxdgshellv6_p.h>
QT_BEGIN_NAMESPACE
@@ -82,12 +79,12 @@ void QWaylandXdgShellV6Integration::handleKeyboardFocusChanged(QWaylandWindow *n
{
if (newFocus) {
auto *xdgSurface = qobject_cast<QWaylandXdgSurfaceV6 *>(newFocus->shellSurface());
- if (xdgSurface && xdgSurface->handlesActiveState())
+ if (xdgSurface && !xdgSurface->handlesActiveState())
m_display->handleWindowActivated(newFocus);
}
- if (oldFocus && qobject_cast<QWaylandXdgPopup *>(oldFocus->shellSurface())) {
+ if (oldFocus && qobject_cast<QWaylandXdgSurfaceV6 *>(oldFocus->shellSurface())) {
auto *xdgSurface = qobject_cast<QWaylandXdgSurfaceV6 *>(oldFocus->shellSurface());
- if (xdgSurface && xdgSurface->handlesActiveState())
+ if (xdgSurface && !xdgSurface->handlesActiveState())
m_display->handleWindowDeactivated(oldFocus);
}
}
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;