x11: exit when in wayland env

Signed-off-by: Hongfei Shang <shanghongfei@kylinos.cn>
This commit is contained in:
Hongfei Shang 2022-07-07 17:06:27 +08:00
parent e8af3094f6
commit fa965fc613
1 changed files with 7 additions and 2 deletions

View File

@ -440,9 +440,14 @@ static void messageOutput(QtMsgType type, const QMessageLogContext &context, con
int main(int argc, char * argv[])
{
qDebug() << "==================kdemain in before message handler===========================";
qDebug() << "==================kwin_x11 in before message handler===========================";
qInstallMessageHandler(messageOutput);
qDebug() << "==================kdemain in===========================";
QByteArray wayland = qgetenv("WAYLAND_DISPLAY");
if (!wayland.isEmpty()) {
qDebug() << "Current env is wayland, exit kwin_x11";
return 0;
}
qDebug() << "==================kwin_x11 in===========================";
KWin::Application::setupMalloc();
KWin::Application::setupLocalizedString();