Do not use KGLobalSettings::isMultiHead

KGlobalSettings is kde4supports, so just check the env variable
directly.
This commit is contained in:
Martin Gräßlin 2013-08-29 11:32:20 +02:00
parent d85802da4e
commit 16fdecb495

View file

@ -412,7 +412,14 @@ KDE_EXPORT int kdemain(int argc, char * argv[])
int number_of_screens = ScreenCount(dpy); int number_of_screens = ScreenCount(dpy);
// multi head // multi head
if (number_of_screens != 1 && KGlobalSettings::isMultiHead()) { auto isMultiHead = []() -> bool {
QByteArray multiHead = qgetenv("KDE_MULTIHEAD");
if (!multiHead.isEmpty()) {
return (multiHead.toLower() == "true");
}
return false;
};
if (number_of_screens != 1 && isMultiHead()) {
KWin::is_multihead = true; KWin::is_multihead = true;
KWin::screen_number = DefaultScreen(dpy); KWin::screen_number = DefaultScreen(dpy);
int pos; // Temporarily needed to reconstruct DISPLAY var if multi-head int pos; // Temporarily needed to reconstruct DISPLAY var if multi-head