|
a/GUI/mainw/mainw.cpp |
|
b/GUI/mainw/mainw.cpp |
|
... |
|
... |
433 |
m_settings->setSplitterState(ui->splitter->saveState());
|
433 |
m_settings->setSplitterState(ui->splitter->saveState());
|
434 |
QSettings settings;
|
434 |
QSettings settings;
|
435 |
if (!m_overridemin2tray && settings.value("min2tray").toBool()) {
|
435 |
if (!m_overridemin2tray && settings.value("min2tray").toBool()) {
|
436 |
e->ignore();
|
436 |
e->ignore();
|
437 |
this->hide();
|
437 |
this->hide();
|
|
|
438 |
} else {
|
|
|
439 |
e->accept();
|
|
|
440 |
}
|
|
|
441 |
|
|
|
442 |
// It seems that we still have top level widgets at this point
|
|
|
443 |
// (e.g. the menus?). Checkable with
|
|
|
444 |
// QApplication::topLevelWidgets() The app is going to exit
|
|
|
445 |
// anyway, except apparently when running some KDE desktop
|
|
|
446 |
// versions ?? So call exit directly if we see KDE. I don't know
|
|
|
447 |
// that calling exit in all cases would be an issue actually.
|
|
|
448 |
char *cp = getenv("XDG_CURRENT_DESKTOP");
|
|
|
449 |
if (nullptr == cp) {
|
|
|
450 |
cp = getenv("XDG_SESSION_DESKTOP");
|
|
|
451 |
}
|
|
|
452 |
if (cp && !strcmp(cp, "KDE")) {
|
|
|
453 |
qApp->exit();
|
438 |
}
|
454 |
}
|
439 |
}
|
455 |
}
|
440 |
|
456 |
|
441 |
void GUI_Player::really_close(bool)
|
457 |
void GUI_Player::really_close(bool)
|
442 |
{
|
458 |
{
|