Changeset View
Changeset View
Standalone View
Standalone View
main_wayland.cpp
Show First 20 Lines • Show All 666 Lines • ▼ Show 20 Line(s) | 660 | #endif | |||
---|---|---|---|---|---|
667 | QCommandLineOption listBackendsOption(QStringLiteral("list-backends"), | 667 | QCommandLineOption listBackendsOption(QStringLiteral("list-backends"), | ||
668 | i18n("List all available backends and quit.")); | 668 | i18n("List all available backends and quit.")); | ||
669 | parser.addOption(listBackendsOption); | 669 | parser.addOption(listBackendsOption); | ||
670 | 670 | | |||
671 | QCommandLineOption screenLockerOption(QStringLiteral("lockscreen"), | 671 | QCommandLineOption screenLockerOption(QStringLiteral("lockscreen"), | ||
672 | i18n("Starts the session in locked mode.")); | 672 | i18n("Starts the session in locked mode.")); | ||
673 | parser.addOption(screenLockerOption); | 673 | parser.addOption(screenLockerOption); | ||
674 | 674 | | |||
675 | QCommandLineOption noScreenLockerOption(QStringLiteral("no-lockscreen"), | ||||
676 | i18n("Starts the session without lock screen support.")); | ||||
677 | parser.addOption(noScreenLockerOption); | ||||
678 | | ||||
675 | QCommandLineOption exitWithSessionOption(QStringLiteral("exit-with-session"), | 679 | QCommandLineOption exitWithSessionOption(QStringLiteral("exit-with-session"), | ||
676 | i18n("Exit after the session application, which is started by KWin, closed."), | 680 | i18n("Exit after the session application, which is started by KWin, closed."), | ||
677 | QStringLiteral("/path/to/session")); | 681 | QStringLiteral("/path/to/session")); | ||
678 | parser.addOption(exitWithSessionOption); | 682 | parser.addOption(exitWithSessionOption); | ||
679 | 683 | | |||
680 | parser.addPositionalArgument(QStringLiteral("applications"), | 684 | parser.addPositionalArgument(QStringLiteral("applications"), | ||
681 | i18n("Applications to start once Wayland and Xwayland server are started"), | 685 | i18n("Applications to start once Wayland and Xwayland server are started"), | ||
682 | QStringLiteral("[/path/to/application...]")); | 686 | QStringLiteral("[/path/to/application...]")); | ||
▲ Show 20 Lines • Show All 97 Lines • ▼ Show 20 Line(s) | 766 | #endif | |||
780 | } | 784 | } | ||
781 | 785 | | |||
782 | // TODO: create backend without having the server running | 786 | // TODO: create backend without having the server running | ||
783 | KWin::WaylandServer *server = KWin::WaylandServer::create(&a); | 787 | KWin::WaylandServer *server = KWin::WaylandServer::create(&a); | ||
784 | 788 | | |||
785 | KWin::WaylandServer::InitalizationFlags flags; | 789 | KWin::WaylandServer::InitalizationFlags flags; | ||
786 | if (parser.isSet(screenLockerOption)) { | 790 | if (parser.isSet(screenLockerOption)) { | ||
787 | flags = KWin::WaylandServer::InitalizationFlag::LockScreen; | 791 | flags = KWin::WaylandServer::InitalizationFlag::LockScreen; | ||
792 | } else if (parser.isSet(noScreenLockerOption)) { | ||||
793 | flags = KWin::WaylandServer::InitalizationFlag::NoLockScreenIntegration; | ||||
788 | } | 794 | } | ||
789 | if (!server->init(parser.value(waylandSocketOption).toUtf8(), flags)) { | 795 | if (!server->init(parser.value(waylandSocketOption).toUtf8(), flags)) { | ||
790 | std::cerr << "FATAL ERROR: could not create Wayland server" << std::endl; | 796 | std::cerr << "FATAL ERROR: could not create Wayland server" << std::endl; | ||
791 | return 1; | 797 | return 1; | ||
792 | } | 798 | } | ||
793 | 799 | | |||
794 | a.initPlatform(*pluginIt); | 800 | a.initPlatform(*pluginIt); | ||
795 | if (!a.platform()) { | 801 | if (!a.platform()) { | ||
Show All 22 Lines |