summaryrefslogtreecommitdiff
path: root/tests/auto/compositor/compositor/testcompositor.h
blob: 3c11540018299161e91a63cdff1b36f76d72ab09 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
// Copyright (C) 2016 The Qt Company Ltd.
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only WITH Qt-GPL-exception-1.0

#include "qwaylandcompositor.h"
#include "qwaylandsurface.h"
#include "qwaylandwlshell.h"

class TestCompositor : public QWaylandCompositor
{
    Q_OBJECT
public:
    TestCompositor(bool createInputDev = false);
    void create() override;
    void flushClients();

public slots:
    void onSurfaceCreated(QWaylandSurface *surface);
    void onSurfaceAboutToBeDestroyed(QWaylandSurface *surface);

protected:
    QWaylandSeat *createSeat() override;
    QWaylandKeyboard *createKeyboardDevice(QWaylandSeat *seat) override;

public:
    QList<QWaylandSurface *> surfaces;
    QWaylandWlShell* shell;
    bool m_createSeat;
};