Commit 9121fe49 authored by Thomas Lübking's avatar Thomas Lübking Committed by Martin Flöser
Browse files

Revert "Add ability to disable multihead support"

The variable is set not from config nor anywhere else when kwin is
started through ksmserver by startkde.

In addition the KGlobal implementation is twisted compared to the kcminit
config behavior (the config value defaults to true, not false - ie. if the
variable isn't set (by kcm init) it's reasonable to assume true either.

Therefore and in alignment with PW/2, the environment is read directly and
on absence resolved to "true".

To control the behavior, please export KDE_MULTIHEAD=true/false before starting KWin
(eg. in /usr/bin/startkde)

This reverts commit ab6d5c04.

REVIEW: 112579
CCBUG: 256242
parent 0c7fe70a
......@@ -48,7 +48,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
#include <QLabel>
#include <KComboBox>
#include <QVBoxLayout>
#include <KGlobalSettings>
#include "config-workspace.h"
......@@ -76,6 +75,15 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
#undef INT8
#undef INT32
static bool isMultiHead()
{
QByteArray multiHead = qgetenv("KDE_MULTIHEAD");
if (!multiHead.isEmpty()) {
return (multiHead.toLower() == "true");
}
return true;
}
namespace KWin
{
......@@ -495,7 +503,7 @@ KDE_EXPORT int kdemain(int argc, char * argv[])
int number_of_screens = ScreenCount(dpy);
// multi head
if (number_of_screens != 1 && KGlobalSettings::isMultiHead()) {
if (number_of_screens != 1 && isMultiHead()) {
KWin::is_multihead = true;
KWin::screen_number = DefaultScreen(dpy);
int pos; // Temporarily needed to reconstruct DISPLAY var if multi-head
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment