Do not use KGLobalSettings::isMultiHead
KGlobalSettings is kde4supports, so just check the env variable directly.
This commit is contained in:
parent
d85802da4e
commit
16fdecb495
1 changed files with 8 additions and 1 deletions
9
main.cpp
9
main.cpp
|
@ -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
|
||||||
|
|
Loading…
Reference in a new issue