mirror of
https://bitbucket.org/smil3y/kde-workspace.git
synced 2025-02-23 18:32:50 +00:00
ksmserver: try filename match when checking if the command is the window manager
Exec may or may not be set to full path in the .desktop file for the window manager, still it is like brute-force guess note that the default in KSMServer::selectWm() is just kwin (filename) but programs are (usually) looked for first in PATH (QProcess does that now for example) Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
This commit is contained in:
parent
1bbca06982
commit
c920743903
1 changed files with 10 additions and 1 deletions
|
@ -930,7 +930,16 @@ bool KSMServer::isWM( const KSMClient* client ) const
|
|||
|
||||
bool KSMServer::isWM( const QString& command ) const
|
||||
{
|
||||
return command == wm;
|
||||
if (command == wm) {
|
||||
kDebug() << "the window manager is" << command;
|
||||
return true;
|
||||
}
|
||||
// both the command and window manager may or may not be absolute path thus the filename match
|
||||
if (QFileInfo(command).fileName() == QFileInfo(wm).fileName()) {
|
||||
kDebug() << "the window manager is" << command;
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
bool KSMServer::defaultSession() const
|
||||
|
|
Loading…
Add table
Reference in a new issue