kdeui: drop bogus multihead support

tottaly a hack, restoring applications on specific display will not work
either (not as long as it is possible to start session on any display, i.e.
restoring on specific display is unreliable)

Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
This commit is contained in:
Ivailo Monev 2023-09-01 16:19:18 +03:00
parent e482da9067
commit 1969c7c22a
4 changed files with 2 additions and 35 deletions

View file

@ -748,22 +748,6 @@ void KApplication::saveState( QSessionManager& sm )
// tell the session manager about our new lifecycle
QStringList restartCommand = sm.restartCommand();
if (KGlobalSettings::isMultiHead()) {
// if multihead is enabled, we save our -display argument so that
// we are restored onto the correct head... one problem with this
// is that the display is hard coded, which means we cannot restore
// to a different display (ie. if we are in a university lab and try,
// try to restore a multihead session, our apps could be started on
// someone else's display instead of our own)
QByteArray displayname = qgetenv("DISPLAY");
if (! displayname.isNull()) {
// only store the command if we actually have a DISPLAY
// environment variable
restartCommand.append(QLatin1String("-display"));
restartCommand.append(QLatin1String(displayname));
}
}
KCmdLineArgs *args = KCmdLineArgs::parsedArgs("kde");
if (args && args->isSet("tray")) {
restartCommand.append(QLatin1String("-tray"));

View file

@ -328,15 +328,6 @@ QString KGlobalSettings::musicPath()
return (path.isEmpty() ? QDir::homePath() : path);
}
bool KGlobalSettings::isMultiHead()
{
QByteArray multiHead = qgetenv("KDE_MULTIHEAD");
if (!multiHead.isEmpty()) {
return (multiHead.toLower() == "true");
}
return false;
}
bool KGlobalSettings::wheelMouseZooms()
{
KConfigGroup g(KGlobal::config(), "KDE");

View file

@ -319,14 +319,6 @@ public:
*/
static QFont smallestReadableFont();
/**
* Returns if the user specified multihead. In case the display
* has multiple screens, the return value of this function specifies
* if the user wants KDE to run on all of them or just on the primary
* @return true if the user chose multi head
*/
static bool isMultiHead();
/**
* Typically, QScrollView derived classes can be scrolled fast by
* holding down the Ctrl-button during wheel-scrolling.

View file

@ -102,7 +102,7 @@ public:
@param doActivate true to activate the window
**/
NETRootInfo(Display *display, Window supportWindow, const char *wmName,
const unsigned long properties[], int properties_size,
const unsigned long properties[], int properties_size,
int screen = -1, bool doActivate = true);
@ -137,7 +137,7 @@ public:
and therefore you cannot read all root window properties using it.
**/
NETRootInfo(Display *display, unsigned long properties, int screen = -1,
bool doActivate = true);
bool doActivate = true);
/**
Creates a shared copy of the specified NETRootInfo object.