File indexing completed on 2024-11-10 04:55:56

0001 /*
0002     KWin - the KDE window manager
0003     This file is part of the KDE project.
0004 
0005     SPDX-FileCopyrightText: 2016 Martin Gräßlin <mgraesslin@kde.org>
0006     SPDX-FileCopyrightText: 2019 David Edmundson <davidedmundson@kde.org>
0007 
0008     SPDX-License-Identifier: GPL-2.0-or-later
0009 */
0010 #include <QApplication>
0011 #include <QEventLoop>
0012 #include <QTimer>
0013 #include <QWidget>
0014 #include <unistd.h>
0015 
0016 #include <csignal>
0017 
0018 int main(int argc, char *argv[])
0019 {
0020     qputenv("QT_QPA_PLATFORM", QByteArrayLiteral("wayland"));
0021     QApplication app(argc, argv);
0022     QWidget w;
0023     w.setGeometry(QRect(0, 0, 100, 200));
0024     w.show();
0025 
0026     auto freezeHandler = [](int) {
0027         while (true) {
0028             sleep(10000);
0029         }
0030     };
0031 
0032     signal(SIGUSR1, freezeHandler);
0033 
0034     return app.exec();
0035 }