File indexing completed on 2024-04-28 05:30:21

0001 /*
0002     SPDX-FileCopyrightText: 2020 Vlad Zahorodnii <vlad.zahorodnii@kde.org>
0003 
0004     SPDX-License-Identifier: GPL-2.0-or-later
0005 */
0006 
0007 #include "inputpanelv1integration.h"
0008 #include "inputpanelv1window.h"
0009 #include "wayland/display.h"
0010 #include "wayland/inputmethod_v1.h"
0011 #include "wayland_server.h"
0012 
0013 namespace KWin
0014 {
0015 
0016 InputPanelV1Integration::InputPanelV1Integration(QObject *parent)
0017     : WaylandShellIntegration(parent)
0018 {
0019     InputPanelV1Interface *shell = new InputPanelV1Interface(waylandServer()->display(), this);
0020 
0021     connect(shell, &InputPanelV1Interface::inputPanelSurfaceAdded,
0022             this, &InputPanelV1Integration::createWindow);
0023 }
0024 
0025 void InputPanelV1Integration::createWindow(InputPanelSurfaceV1Interface *shellSurface)
0026 {
0027     Q_EMIT windowCreated(new InputPanelV1Window(shellSurface));
0028 }
0029 
0030 } // namespace KWin
0031 
0032 #include "moc_inputpanelv1integration.cpp"