2014-08-12 07:08:48 +00:00
|
|
|
/********************************************************************
|
|
|
|
KWin - the KDE window manager
|
|
|
|
This file is part of the KDE project.
|
|
|
|
|
|
|
|
Copyright (C) 2014 Martin Gräßlin <mgraesslin@kde.org>
|
|
|
|
|
|
|
|
This program is free software; you can redistribute it and/or modify
|
|
|
|
it under the terms of the GNU General Public License as published by
|
|
|
|
the Free Software Foundation; either version 2 of the License, or
|
|
|
|
(at your option) any later version.
|
|
|
|
|
|
|
|
This program is distributed in the hope that it will be useful,
|
|
|
|
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
|
|
GNU General Public License for more details.
|
|
|
|
|
|
|
|
You should have received a copy of the GNU General Public License
|
|
|
|
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|
|
|
*********************************************************************/
|
|
|
|
#ifndef KWIN_MAIN_WAYLAND_H
|
|
|
|
#define KWIN_MAIN_WAYLAND_H
|
|
|
|
#include "main.h"
|
2015-06-29 08:51:37 +00:00
|
|
|
#include <QProcessEnvironment>
|
2014-08-12 07:08:48 +00:00
|
|
|
|
|
|
|
namespace KWin
|
|
|
|
{
|
2019-02-19 08:50:20 +00:00
|
|
|
namespace Xwl
|
|
|
|
{
|
|
|
|
class Xwayland;
|
|
|
|
}
|
2014-08-12 07:08:48 +00:00
|
|
|
|
2018-08-22 00:20:16 +00:00
|
|
|
class ApplicationWayland : public ApplicationWaylandAbstract
|
2014-08-12 07:08:48 +00:00
|
|
|
{
|
|
|
|
Q_OBJECT
|
|
|
|
public:
|
|
|
|
ApplicationWayland(int &argc, char **argv);
|
|
|
|
virtual ~ApplicationWayland();
|
|
|
|
|
2015-02-20 10:53:25 +00:00
|
|
|
void setStartXwayland(bool start) {
|
|
|
|
m_startXWayland = start;
|
|
|
|
}
|
2015-04-21 09:21:28 +00:00
|
|
|
void setApplicationsToStart(const QStringList &applications) {
|
|
|
|
m_applicationsToStart = applications;
|
|
|
|
}
|
2015-06-13 02:06:12 +00:00
|
|
|
void setInputMethodServerToStart(const QString &inputMethodServer) {
|
|
|
|
m_inputMethodServerToStart = inputMethodServer;
|
|
|
|
}
|
2018-08-22 00:20:16 +00:00
|
|
|
void setProcessStartupEnvironment(const QProcessEnvironment &environment) override {
|
2015-06-29 08:51:37 +00:00
|
|
|
m_environment = environment;
|
|
|
|
}
|
2015-11-19 08:16:23 +00:00
|
|
|
void setSessionArgument(const QString &session) {
|
|
|
|
m_sessionArgument = session;
|
|
|
|
}
|
2015-02-20 08:33:36 +00:00
|
|
|
|
2015-07-07 15:35:57 +00:00
|
|
|
QProcessEnvironment processStartupEnvironment() const override {
|
|
|
|
return m_environment;
|
|
|
|
}
|
|
|
|
|
2014-08-12 07:08:48 +00:00
|
|
|
protected:
|
|
|
|
void performStartup() override;
|
2015-02-20 10:53:25 +00:00
|
|
|
|
|
|
|
private:
|
2015-03-23 11:45:21 +00:00
|
|
|
void createBackend();
|
2015-02-20 13:57:06 +00:00
|
|
|
void continueStartupWithScreens();
|
2019-02-20 00:02:08 +00:00
|
|
|
void continueStartupWithScene();
|
2019-02-23 12:17:50 +00:00
|
|
|
void finalizeStartup();
|
2018-08-22 00:20:16 +00:00
|
|
|
void startSession() override;
|
2015-02-20 10:53:25 +00:00
|
|
|
|
|
|
|
bool m_startXWayland = false;
|
2015-04-21 09:21:28 +00:00
|
|
|
QStringList m_applicationsToStart;
|
2015-06-13 02:06:12 +00:00
|
|
|
QString m_inputMethodServerToStart;
|
2015-06-29 08:51:37 +00:00
|
|
|
QProcessEnvironment m_environment;
|
2015-11-19 08:16:23 +00:00
|
|
|
QString m_sessionArgument;
|
2019-02-19 08:50:20 +00:00
|
|
|
|
|
|
|
Xwl::Xwayland *m_xwayland = nullptr;
|
2014-08-12 07:08:48 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
#endif
|