summaryrefslogtreecommitdiffstats
path: root/src/plugins/shellintegration/fullscreen-shell-v1/qwaylandfullscreenshellv1surface.cpp
blob: 8874c0bf21622627624a5fc414cde6965533c27c (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
// Copyright (C) 2018 Pier Luigi Fiorini <pierluigi.fiorini@gmail.com>
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only

#include <QtWaylandClient/private/qwaylandscreen_p.h>

#include "qwaylandfullscreenshellv1surface.h"

QT_BEGIN_NAMESPACE

namespace QtWaylandClient {

QWaylandFullScreenShellV1Surface::QWaylandFullScreenShellV1Surface(QtWayland::zwp_fullscreen_shell_v1 *shell, QWaylandWindow *window)
    : QWaylandShellSurface(window)
    , m_shell(shell)
    , m_window(window)
{
    auto *screen = m_window->waylandScreen();
    auto *output = screen ? screen->output() : nullptr;
    m_shell->present_surface(m_window->wlSurface(),
                             QtWayland::zwp_fullscreen_shell_v1::present_method_default,
                             output);
}

} // namespace QtWaylandClient

QT_END_NAMESPACE