File indexing completed on 2024-02-25 17:23:41

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_interface.h"
0011 #include "wayland_server.h"
0012 
0013 using namespace KWaylandServer;
0014 
0015 namespace KWin
0016 {
0017 
0018 InputPanelV1Integration::InputPanelV1Integration(QObject *parent)
0019     : WaylandShellIntegration(parent)
0020 {
0021     InputPanelV1Interface *shell = new InputPanelV1Interface(waylandServer()->display(), this);
0022 
0023     connect(shell, &InputPanelV1Interface::inputPanelSurfaceAdded,
0024             this, &InputPanelV1Integration::createWindow);
0025 }
0026 
0027 void InputPanelV1Integration::createWindow(InputPanelSurfaceV1Interface *shellSurface)
0028 {
0029     Q_EMIT windowCreated(new InputPanelV1Window(shellSurface));
0030 }
0031 
0032 } // namespace KWin