Rename KWin binary to kwin_x11
This servers two purposes. 1. it makes KWin/5 co-installable with KWin/4 as now binary and all libraries etc. are renamed or installed to a different location. 2. In future we need a dedicated X11 and Wayland main function anyway. Thus it makes most sense to rename to kwin_x11 directly instead of first renaming to kwin5. The reason why we need to have dedicated main functions is that kwin needs to check early whether X11 is working or Wayland is working. Right now the first thing kwin does is trying to connect to the XServer. This happens before the QApplication is constructed and before command line args are processed. On Wayland we won't want to test whether we can connect to the XServer. As it's too early to check whether we are starting kwin for X11 or Wayland the most convenient way is to have dedicated binaries - thus a rename is needed. Just renaming kwin for wayland is also not a good idea as in future the "main" kwin will be for wayland not for X11. Another case for the dedicated binaries is the Application class, which right now first tries to claim the X11 Window Manager Selection. Again on Wayland even with XWayland we won't need that. KWin will be the window manager for XWayland if KWin is the Wayland compositor. There is no need to even try to support anything else. Most likely it will even be KWin to start the XWayland server, so we can be sure that there is no other WM running and thus no need to claim the selection and abort if it fails. REVIEW: 118266
This commit is contained in:
parent
8c42df77e0
commit
52653aaede
3 changed files with 6 additions and 3 deletions
|
@ -186,6 +186,8 @@ endif()
|
|||
|
||||
# Binary name of KWin
|
||||
set(KWIN_NAME "kwin")
|
||||
set(KWIN_INTERNAL_NAME_X11 "kwin_x11")
|
||||
set(KWIN_INTERNAL_NAME_WAYLAND "kwin_wayland")
|
||||
set(KWIN_VERSION_MAJOR 4)
|
||||
set(KWIN_VERSION_MINOR 97)
|
||||
set(KWIN_VERSION_PATCH 0)
|
||||
|
@ -515,7 +517,7 @@ endif()
|
|||
kf5_add_kdeinit_executable( kwin ${kwin_KDEINIT_SRCS})
|
||||
|
||||
target_link_libraries(kdeinit_kwin ${kwinLibs})
|
||||
set_target_properties(kwin PROPERTIES OUTPUT_NAME ${KWIN_NAME})
|
||||
set_target_properties(kwin PROPERTIES OUTPUT_NAME ${KWIN_INTERNAL_NAME_X11})
|
||||
generate_export_header(kdeinit_kwin EXPORT_FILE_NAME kwin_export.h)
|
||||
|
||||
if(KWIN_BUILD_OPENGL)
|
||||
|
|
|
@ -5,6 +5,7 @@
|
|||
#cmakedefine KWIN_BUILD_KAPPMENU 1
|
||||
#cmakedefine KWIN_BUILD_ACTIVITIES 1
|
||||
#define KWIN_NAME "${KWIN_NAME}"
|
||||
#define KWIN_INTERNAL_NAME_X11 "${KWIN_INTERNAL_NAME_X11}"
|
||||
#define KWIN_CONFIG "${KWIN_NAME}rc"
|
||||
#define KWIN_VERSION_STRING "${KWIN_VERSION}"
|
||||
#define KWIN_KILLER_BIN "${CMAKE_INSTALL_PREFIX}/${LIBEXEC_INSTALL_DIR}/kwin_killer_helper"
|
||||
|
|
4
main.cpp
4
main.cpp
|
@ -153,7 +153,7 @@ public:
|
|||
addWM(QStringLiteral("metacity"));
|
||||
addWM(QStringLiteral("openbox"));
|
||||
addWM(QStringLiteral("fvwm2"));
|
||||
addWM(QStringLiteral(KWIN_NAME));
|
||||
addWM(QStringLiteral(KWIN_INTERNAL_NAME_X11));
|
||||
|
||||
QVBoxLayout *mainLayout = new QVBoxLayout(this);
|
||||
mainLayout->addWidget(mainWidget);
|
||||
|
@ -303,7 +303,7 @@ void Application::crashChecking()
|
|||
if (crashes >= 4) {
|
||||
// Something has gone seriously wrong
|
||||
AlternativeWMDialog dialog;
|
||||
QString cmd = QStringLiteral(KWIN_NAME);
|
||||
QString cmd = QStringLiteral(KWIN_INTERNAL_NAME_X11);
|
||||
if (dialog.exec() == QDialog::Accepted)
|
||||
cmd = dialog.selectedWM();
|
||||
else
|
||||
|
|
Loading…
Reference in a new issue