Commit a74f8766 authored by Martin Flöser's avatar Martin Flöser

Drop OperationModeX11AndWayland and introduce OperationModeWaylandOnly instead

The operation mode X11 and Wayland is no longer supported and probably
hasn't been supported for the last few years. But now there is the
possibility to run Wayland only, so introduce this as a dedicated new
OperationMode.
parent 0c8c047d
......@@ -131,7 +131,7 @@ void Application::setOperationMode(OperationMode mode)
bool Application::shouldUseWaylandForCompositing() const
{
return m_operationMode == OperationModeWaylandAndX11 || m_operationMode == OperationModeXwayland;
return m_operationMode == OperationModeWaylandOnly || m_operationMode == OperationModeXwayland;
}
void Application::start()
......
......@@ -70,10 +70,9 @@ public:
*/
OperationModeX11,
/**
* @brief KWin uses X11 for managing windows, but renders to a Wayland compositor.
* Input is received from the Wayland compositor.
* @brief KWin uses only Wayland
*/
OperationModeWaylandAndX11,
OperationModeWaylandOnly,
/**
* @brief KWin uses Wayland and controls a nested Xwayland server.
**/
......
......@@ -87,7 +87,7 @@ static void readDisplay(int pipe);
//************************************
ApplicationWayland::ApplicationWayland(int &argc, char **argv)
: Application(OperationModeWaylandAndX11, argc, argv)
: Application(OperationModeWaylandOnly, argc, argv)
{
}
......@@ -130,7 +130,9 @@ ApplicationWayland::~ApplicationWayland()
void ApplicationWayland::performStartup()
{
setOperationMode(m_startXWayland ? OperationModeXwayland : OperationModeWaylandAndX11);
if (m_startXWayland) {
setOperationMode(OperationModeXwayland);
}
// first load options - done internally by a different thread
createOptions();
waylandServer()->createInternalConnection();
......@@ -158,7 +160,7 @@ void ApplicationWayland::continueStartupWithScreens()
disconnect(kwinApp()->platform(), &Platform::screensQueried, this, &ApplicationWayland::continueStartupWithScreens);
createScreens();
if (!m_startXWayland) {
if (operationMode() == OperationModeWaylandOnly) {
createCompositor();
connect(Compositor::self(), &Compositor::sceneCreated, this,
[this] {
......
......@@ -1332,8 +1332,8 @@ QString Workspace::supportInformation() const
case Application::OperationModeX11:
support.append(QStringLiteral("X11 only"));
break;
case Application::OperationModeWaylandAndX11:
support.append(QStringLiteral("Wayland and X11"));
case Application::OperationModeWaylandOnly:
support.append(QStringLiteral("Wayland Only"));
break;
case Application::OperationModeXwayland:
support.append(QStringLiteral("Xwayland"));
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment