Commit b99cbb7b authored by David Edmundson's avatar David Edmundson

Remove multihead from Plasmashell scripting

Plasmashell literally never checks the X screen, but we expose it in
this scripting system.

This patch Hardcodes it to the values you'd have on a normal system.

The existing screenCount is unchanged and will still work.

Test Plan: compiles

Reviewers: #plasma, mart

Reviewed By: #plasma, mart

Subscribers: apol, plasma-devel

Tags: #plasma

Differential Revision:
parent ad52844c
......@@ -137,34 +137,12 @@ QString AppInterface::languageId() const
bool AppInterface::multihead() const
#ifdef Q_OS_WIN
return GetSystemMetrics(SM_CMONITORS) > 1;
QByteArray multiHead = qgetenv("KDE_MULTIHEAD");
if (!multiHead.isEmpty()) {
return (multiHead.toLower() == "true");
return false;
int AppInterface::multiheadScreen() const
int id = -1;
#ifdef HAVE_X11
if (multihead()) {
// with multihead, we "lie" and say that screen 0 is the default screen, in fact, we pretend
// we have only one screen at all
Display *dpy = XOpenDisplay(NULL);
if (dpy) {
id = DefaultScreen(dpy);
return id;
return 0;
void AppInterface::lockCorona(bool locked)
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