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.
This commit is contained in:
Martin Flöser 2017-09-30 15:09:06 +02:00
parent 0c8c047d78
commit a74f8766c3
4 changed files with 10 additions and 9 deletions

View file

@ -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()

5
main.h
View file

@ -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.
**/

View file

@ -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] {

View file

@ -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"));