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 ab6d5c048a25bcb2f5bdb822ba3eda64019c61bc. REVIEW: 112579 CCBUG: 256242
This commit is contained in:
parent
e63e5f5712
commit
61f1bcc991
1 changed files with 10 additions and 2 deletions
12
main.cpp
12
main.cpp
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue