Adjust KSMServer to renamed KWin binary

REVIEW: 118482
wilder-5.14
Hrvoje Senjan 12 years ago committed by Martin Gräßlin
parent 3cac388d32
commit 6cbbe0a2fa
  1. 2
      ConfigureChecks.cmake
  2. 2
      ksmserver/config-ksmserver.h.cmake
  3. 4
      ksmserver/server.cpp
  4. 7
      ksmserver/startup.cpp

@ -24,6 +24,8 @@ if (PAM_FOUND)
define_pam_service(kscreensaver)
endif (PAM_FOUND)
set(KWIN_BIN "kwin_x11" CACHE STRING "Name of the KWin binary")
find_program(some_x_program NAMES iceauth xrdb xterm)
if (NOT some_x_program)
set(some_x_program /usr/bin/xrdb)

@ -10,3 +10,5 @@
#endif
#define KSCREENLOCKER_GREET_BIN "${CMAKE_INSTALL_PREFIX}/${LIBEXEC_INSTALL_DIR}/kscreenlocker_greet"
#define KWIN_BIN "${KWIN_BIN}"

@ -1002,8 +1002,8 @@ bool KSMServer::defaultSession() const
// - if that fails, just use KWin
void KSMServer::selectWm( const QString& kdewm )
{
wm = QStringLiteral( "kwin" ); // defaults
wmCommands = ( QStringList() << QStringLiteral( "kwin" ) );
wm = QStringLiteral( KWIN_BIN ); // defaults
wmCommands = ( QStringList() << QStringLiteral( KWIN_BIN ) );
if( qstrcmp( getenv( "KDE_FAILSAFE" ), "1" ) == 0 )
return; // failsafe, force kwin
if( !kdewm.isEmpty())

@ -34,6 +34,7 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
#include <krun.h>
#include <config-workspace.h>
#include <config-unix.h> // HAVE_LIMITS_H
#include <config-ksmserver.h>
#include <pwd.h>
#include <sys/types.h>
@ -200,11 +201,11 @@ void KSMServer::wmProcessChange()
if( wmProcess->state() == QProcess::NotRunning )
{ // wm failed to launch for some reason, go with kwin instead
kWarning( 1218 ) << "Window manager" << wm << "failed to launch";
if( wm == QStringLiteral( "kwin" ) )
if( wm == QStringLiteral( KWIN_BIN ) )
return; // uhoh, kwin itself failed
kDebug( 1218 ) << "Launching KWin";
wm = QStringLiteral( "kwin" );
wmCommands = ( QStringList() << QStringLiteral( "kwin" ) );
wm = QStringLiteral( KWIN_BIN );
wmCommands = ( QStringList() << QStringLiteral( KWIN_BIN ) );
// launch it
launchWM( QList< QStringList >() << wmCommands );
return;

Loading…
Cancel
Save