Port IVI Application test from shared_old

Change-Id: I65fbe66fe75fe4372852deadefea796576860d67
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>
This commit is contained in:
David Edmundson 2021-05-05 23:45:03 +01:00
parent dd6ca292da
commit 6a244c5e13
3 changed files with 9 additions and 1 deletions

View File

@ -8,6 +8,7 @@ add_library(SharedClientTest
coreprotocol.cpp coreprotocol.h
datadevice.cpp datadevice.h
fullscreenshellv1.cpp fullscreenshellv1.h
iviapplication.cpp iviapplication.h
mockcompositor.cpp mockcompositor.h
textinput.cpp textinput.h
xdgoutputv1.cpp xdgoutputv1.h
@ -19,6 +20,7 @@ set_property(TARGET SharedClientTest PROPERTY AUTOMOC ON)
qt6_generate_wayland_protocol_server_sources(SharedClientTest
FILES
${PROJECT_SOURCE_DIR}/src/3rdparty/protocol/fullscreen-shell-unstable-v1.xml
${PROJECT_SOURCE_DIR}/src/3rdparty/protocol/ivi-application.xml
${PROJECT_SOURCE_DIR}/src/3rdparty/protocol/wp-primary-selection-unstable-v1.xml
${PROJECT_SOURCE_DIR}/src/3rdparty/protocol/tablet-unstable-v2.xml
${PROJECT_SOURCE_DIR}/src/3rdparty/protocol/text-input-unstable-v2.xml

View File

@ -1,5 +1,6 @@
/****************************************************************************
**
** Copyright (C) 2021 David Edmundson <davidedmundson@kde.org>
** Copyright (C) 2018 The Qt Company Ltd.
** Contact: https://www.qt.io/licensing/
**
@ -45,6 +46,8 @@ DefaultCompositor::DefaultCompositor()
add<XdgWmBase>();
add<Shm>();
add<FullScreenShellV1>();
add<IviApplication>();
// TODO: other shells, viewporter, xdgoutput etc
QObject::connect(get<WlCompositor>(), &WlCompositor::surfaceCreated, [&] (Surface *surface){

View File

@ -1,5 +1,6 @@
/****************************************************************************
**
** Copyright (C) 2021 David Edmundson <davidedmundson@kde.org>
** Copyright (C) 2018 The Qt Company Ltd.
** Contact: https://www.qt.io/licensing/
**
@ -32,8 +33,9 @@
#include "corecompositor.h"
#include "coreprotocol.h"
#include "datadevice.h"
#include "xdgshell.h"
#include "fullscreenshellv1.h"
#include "iviapplication.h"
#include "xdgshell.h"
#include <QtGui/QGuiApplication>
@ -66,6 +68,7 @@ public:
Surface *cursorSurface() { auto *p = pointer(); return p ? p->cursorSurface() : nullptr; }
Keyboard *keyboard() { auto *seat = get<Seat>(); Q_ASSERT(seat); return seat->m_keyboard; }
FullScreenShellV1 *fullScreenShellV1() {return get<FullScreenShellV1>();};
IviSurface *iviSurface(int i = 0) { return get<IviApplication>()->m_iviSurfaces.value(i, nullptr); }
uint sendXdgShellPing();
void xdgPingAndWaitForPong();
// Things that can be changed run-time without confusing the client (i.e. don't require separate tests)