[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-commits
Subject: [kwin] /: Support starting kwin_wayland without XWayland support
From: Martin_Flöser <null () kde ! org>
Date: 2017-09-30 11:05:26
Message-ID: E1dyFaI-0003d2-MW () code ! kde ! org
[Download RAW message or body]
Git commit 343d8c9b626aba7d5d3ee9440a83e0b865fa4458 by Martin Flöser.
Committed on 30/09/2017 at 11:04.
Pushed by graesslin into branch 'master'.
Support starting kwin_wayland without XWayland support
Summary:
Just continues with the steps without starting XWayland.
This does not yet fully support kwin_wayland without X11, it currently
still crashes on teardown.
Test Plan: kwin_wayland --socket=wayland-1 kwrite (note the missing --xwayland)
Reviewers: #kwin, #plasma
Subscribers: plasma-devel, kwin
Tags: #kwin
Differential Revision: https://phabricator.kde.org/D7924
M +20 -8 main_wayland.cpp
M +1 -0 main_wayland.h
https://commits.kde.org/kwin/343d8c9b626aba7d5d3ee9440a83e0b865fa4458
diff --git a/main_wayland.cpp b/main_wayland.cpp
index c1915fc9c..162842d98 100644
--- a/main_wayland.cpp
+++ b/main_wayland.cpp
@@ -159,7 +159,14 @@ void ApplicationWayland::continueStartupWithScreens()
createScreens();
if (!m_startXWayland) {
- continueStartupWithX();
+ createCompositor();
+ connect(Compositor::self(), &Compositor::sceneCreated, this,
+ [this] {
+ startSession();
+ createWorkspace();
+ notifyKSplash();
+ }
+ );
return;
}
createCompositor();
@@ -214,6 +221,18 @@ void ApplicationWayland::continueStartupWithX()
::exit(1);
}
+ m_environment.insert(QStringLiteral("DISPLAY"), QString::fromUtf8(qgetenv("DISPLAY")));
+
+ startSession();
+ createWorkspace();
+
+ Xcb::sync(); // Trigger possible errors, there's still a chance to abort
+
+ notifyKSplash();
+}
+
+void ApplicationWayland::startSession()
+{
if (!m_inputMethodServerToStart.isEmpty()) {
int socket = dup(waylandServer()->createInputMethodConnection());
if (socket >= 0) {
@@ -239,7 +258,6 @@ void ApplicationWayland::continueStartupWithX()
}
}
- m_environment.insert(QStringLiteral("DISPLAY"), QString::fromUtf8(qgetenv("DISPLAY")));
// start session
if (!m_sessionArgument.isEmpty()) {
QProcess *p = new Process(this);
@@ -260,12 +278,6 @@ void ApplicationWayland::continueStartupWithX()
p->start(application);
}
}
-
- createWorkspace();
-
- Xcb::sync(); // Trigger possible errors, there's still a chance to abort
-
- notifyKSplash();
}
void ApplicationWayland::createX11Connection()
diff --git a/main_wayland.h b/main_wayland.h
index c7f67410f..e7a642f56 100644
--- a/main_wayland.h
+++ b/main_wayland.h
@@ -63,6 +63,7 @@ private:
void continueStartupWithScreens();
void continueStartupWithX();
void startXwaylandServer();
+ void startSession();
bool m_startXWayland = false;
int m_xcbConnectionFd = -1;
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic