kdeui: make use of KGlobalSettings::isMultiHead() in KApplication::saveState()

Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
This commit is contained in:
Ivailo Monev 2022-11-14 23:59:22 +02:00
parent 8e5dd5ea50
commit 2e9329f1a1
2 changed files with 1 additions and 4 deletions

View file

@ -580,8 +580,7 @@ void KApplication::saveState( QSessionManager& sm )
// tell the session manager about our new lifecycle
QStringList restartCommand = sm.restartCommand();
QByteArray multiHead = qgetenv("KDE_MULTIHEAD");
if (multiHead.toLower() == "true") {
if (KGlobalSettings::isMultiHead()) {
// if multihead is enabled, we save our -display argument so that
// we are restored onto the correct head... one problem with this
// is that the display is hard coded, which means we cannot restore

View file

@ -213,7 +213,6 @@ public:
/**
* This returns the current mouse settings.
* On Windows, settings are retrieved from the system.
* @return the current mouse settings
*/
static KMouseSettings & mouseSettings();
@ -362,7 +361,6 @@ public:
* Returns if the user specified multihead. In case the display
* has multiple screens, the return value of this function specifies
* if the user wants KDE to run on all of them or just on the primary
* On Windows, settings are retrieved from the system.
* @return true if the user chose multi head
*/
static bool isMultiHead();