fixbug:#I774FQ/#I729TV
This commit is contained in:
parent
da39c91162
commit
82257a145f
|
@ -37,13 +37,14 @@ KBTitle::~KBTitle()
|
||||||
void KBTitle::initUI()
|
void KBTitle::initUI()
|
||||||
{
|
{
|
||||||
setFixedHeight(KEYBOARD_TITLE_DEFAULT_HEIGHT);
|
setFixedHeight(KEYBOARD_TITLE_DEFAULT_HEIGHT);
|
||||||
QString strBtnStyle = "QPushButton{ text-align:center; color: rgb(255, 255, 255, 255); border: none; border-radius: 4px; outline: none;}"
|
QString strBtnStyle = "QPushButton{ text-align:center; color: rgba(255, 255, 255, 255); border: none; border-radius: 4px; outline: none;}"
|
||||||
"QPushButton:hover{ background-color: rgb(255,255,255,15%); }"
|
"QPushButton:hover{ background-color: rgba(255,255,255,15%); }"
|
||||||
"QPushButton::pressed { background-color: rgba(255,255,255,40%); }"
|
"QPushButton::pressed { background-color: rgba(255,255,255,40%); }"
|
||||||
"QPushButton::checked { background-color: rgba(255,255,255,40%); }";
|
"QPushButton::checked { background-color: rgba(255,255,255,40%); }";
|
||||||
|
|
||||||
m_btnFloat = new QPushButton(this);
|
m_btnFloat = new QPushButton(this);
|
||||||
m_btnFloat->setFlat(true);
|
m_btnFloat->setFlat(true);
|
||||||
|
m_btnFloat->setFocusPolicy(Qt::NoFocus);
|
||||||
m_btnFloat->setIcon(QIcon(":/images/images/float.svg"));
|
m_btnFloat->setIcon(QIcon(":/images/images/float.svg"));
|
||||||
m_btnFloat->setObjectName("btn_float");
|
m_btnFloat->setObjectName("btn_float");
|
||||||
m_btnFloat->setIconSize(KEYBOARD_FIXED_DEFAULT_ICONSIZE);
|
m_btnFloat->setIconSize(KEYBOARD_FIXED_DEFAULT_ICONSIZE);
|
||||||
|
@ -53,6 +54,7 @@ void KBTitle::initUI()
|
||||||
|
|
||||||
m_btnClose = new QPushButton(this);
|
m_btnClose = new QPushButton(this);
|
||||||
m_btnClose->setFlat(true);
|
m_btnClose->setFlat(true);
|
||||||
|
m_btnClose->setFocusPolicy(Qt::NoFocus);
|
||||||
m_btnClose->setIcon(QIcon(":/images/images/close.svg"));
|
m_btnClose->setIcon(QIcon(":/images/images/close.svg"));
|
||||||
m_btnClose->setIconSize(KEYBOARD_FIXED_DEFAULT_ICONSIZE);
|
m_btnClose->setIconSize(KEYBOARD_FIXED_DEFAULT_ICONSIZE);
|
||||||
m_btnClose->setObjectName("btn_close");
|
m_btnClose->setObjectName("btn_close");
|
||||||
|
|
|
@ -1639,6 +1639,11 @@ void AuthDialog::onBiometricDbusChanged(bool bActive)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
QString AuthDialog::getCurAuthUserName()
|
||||||
|
{
|
||||||
|
return user.name;
|
||||||
|
}
|
||||||
|
|
||||||
QPixmap AuthDialog::makeRoundLogo(QString logo, int wsize, int hsize, int radius)
|
QPixmap AuthDialog::makeRoundLogo(QString logo, int wsize, int hsize, int radius)
|
||||||
{
|
{
|
||||||
QPixmap rectPixmap;
|
QPixmap rectPixmap;
|
||||||
|
|
|
@ -71,6 +71,7 @@ public:
|
||||||
void checkPassword();
|
void checkPassword();
|
||||||
int getBioNum();
|
int getBioNum();
|
||||||
bool getLineeditStatus();
|
bool getLineeditStatus();
|
||||||
|
QString getCurAuthUserName();
|
||||||
private:
|
private:
|
||||||
void initUI();
|
void initUI();
|
||||||
void startWaiting();
|
void startWaiting();
|
||||||
|
|
|
@ -260,15 +260,6 @@ FullBackgroundWidget::FullBackgroundWidget(QWidget *parent)
|
||||||
qApp->installNativeEventFilter(this);
|
qApp->installNativeEventFilter(this);
|
||||||
installEventFilter(this);
|
installEventFilter(this);
|
||||||
QTimer::singleShot(500,this,SLOT(switchToLinux()));
|
QTimer::singleShot(500,this,SLOT(switchToLinux()));
|
||||||
|
|
||||||
LogindIntegration *m_logind = new LogindIntegration(this);
|
|
||||||
|
|
||||||
|
|
||||||
connect(m_logind, &LogindIntegration::requestUnlock, this,
|
|
||||||
[this]() {
|
|
||||||
closeScreensaver();
|
|
||||||
});
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef USE_INTEL
|
#ifdef USE_INTEL
|
||||||
|
@ -438,6 +429,16 @@ void FullBackgroundWidget::paintEvent(QPaintEvent *event)
|
||||||
void FullBackgroundWidget::closeEvent(QCloseEvent *event)
|
void FullBackgroundWidget::closeEvent(QCloseEvent *event)
|
||||||
{
|
{
|
||||||
qDebug() << "FullBackgroundWidget::closeEvent";
|
qDebug() << "FullBackgroundWidget::closeEvent";
|
||||||
|
// 处理认证完成后收到屏幕变化信号,调用lockWidget指针崩溃问题
|
||||||
|
QDesktopWidget *desktop = QApplication::desktop();
|
||||||
|
disconnect(desktop, &QDesktopWidget::resized,
|
||||||
|
this, &FullBackgroundWidget::onDesktopResized);
|
||||||
|
disconnect(desktop, &QDesktopWidget::workAreaResized,
|
||||||
|
this, &FullBackgroundWidget::onDesktopResized);
|
||||||
|
disconnect(desktop, &QDesktopWidget::primaryScreenChanged,
|
||||||
|
this, &FullBackgroundWidget::onDesktopResized);
|
||||||
|
disconnect(desktop, &QDesktopWidget::screenCountChanged,
|
||||||
|
this, &FullBackgroundWidget::onDesktopResized);
|
||||||
if (isStartup)
|
if (isStartup)
|
||||||
setIsStartup(false);
|
setIsStartup(false);
|
||||||
if(future.isRunning()){
|
if(future.isRunning()){
|
||||||
|
@ -466,7 +467,6 @@ void FullBackgroundWidget::closeEvent(QCloseEvent *event)
|
||||||
if(widget)
|
if(widget)
|
||||||
widget->close();
|
widget->close();
|
||||||
}
|
}
|
||||||
|
|
||||||
if(QX11Info::isPlatformX11()){
|
if(QX11Info::isPlatformX11()){
|
||||||
closeGrab();
|
closeGrab();
|
||||||
}
|
}
|
||||||
|
@ -930,6 +930,13 @@ int FullBackgroundWidget::onSessionStatusChanged(uint status)
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void FullBackgroundWidget::onSessionActiveChanged(bool isActive)
|
||||||
|
{
|
||||||
|
if (lockWidget) {
|
||||||
|
lockWidget->onSessionActiveChanged(isActive);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
void FullBackgroundWidget::delayLockScreen()
|
void FullBackgroundWidget::delayLockScreen()
|
||||||
{
|
{
|
||||||
if (!m_timerLock) {
|
if (!m_timerLock) {
|
||||||
|
|
|
@ -75,6 +75,7 @@ public Q_SLOTS:
|
||||||
void propertiesChangedSlot(QString, QMap<QString, QVariant>, QStringList);
|
void propertiesChangedSlot(QString, QMap<QString, QVariant>, QStringList);
|
||||||
void onShowBlackBackGround();
|
void onShowBlackBackGround();
|
||||||
#endif
|
#endif
|
||||||
|
void onSessionActiveChanged(bool isActive);
|
||||||
|
|
||||||
Q_SIGNALS:
|
Q_SIGNALS:
|
||||||
void StartupModeChanged(bool isStartup);
|
void StartupModeChanged(bool isStartup);
|
||||||
|
|
|
@ -216,24 +216,7 @@ void LockWidget::key_enter_release(int key)
|
||||||
break;
|
break;
|
||||||
case SWITCHBTN:
|
case SWITCHBTN:
|
||||||
if(scrollArea && scrollArea->isVisible()) {
|
if(scrollArea && scrollArea->isVisible()) {
|
||||||
if(authDialog)
|
SwitchToUser(list.at(nowAt)->objectName());
|
||||||
{
|
|
||||||
if(list.at(nowAt)->objectName() != getenv("USER"))
|
|
||||||
authDialog->stopAuth();
|
|
||||||
}
|
|
||||||
if(list.at(nowAt)->objectName() == "Guest")
|
|
||||||
{
|
|
||||||
displayManager->switchToGuest();
|
|
||||||
}
|
|
||||||
else if(list.at(nowAt)->objectName() == "SwitchUser")
|
|
||||||
{
|
|
||||||
displayManager->switchToGreeter();
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
if(list.at(nowAt)->objectName() != getenv("USER"))
|
|
||||||
displayManager->switchToUser(list.at(nowAt)->objectName());
|
|
||||||
}
|
|
||||||
} else {
|
} else {
|
||||||
ui->btnSwitchUser->setStyleSheet(ON_NORMAL_SHEET);
|
ui->btnSwitchUser->setStyleSheet(ON_NORMAL_SHEET);
|
||||||
showUserMenu();
|
showUserMenu();
|
||||||
|
@ -1422,6 +1405,67 @@ void LockWidget::setVirkeyboardPos()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void LockWidget::SwitchToUser(QString strUserName)
|
||||||
|
{
|
||||||
|
bool isSwitchSelf = false;
|
||||||
|
if(authDialog) {
|
||||||
|
if (strUserName == authDialog->getCurAuthUserName()) {
|
||||||
|
isSwitchSelf = true;
|
||||||
|
} else {
|
||||||
|
authDialog->stopAuth();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (!isSwitchSelf) {
|
||||||
|
this->hide();
|
||||||
|
if (!m_timerChkActive) {
|
||||||
|
m_timerChkActive = new QTimer(this);
|
||||||
|
m_timerChkActive->setInterval(10*1000);
|
||||||
|
connect(m_timerChkActive, &QTimer::timeout, this, [&,this](){
|
||||||
|
if (this->isHidden()) {
|
||||||
|
this->show();
|
||||||
|
}
|
||||||
|
m_timerChkActive->stop();
|
||||||
|
});
|
||||||
|
} else {
|
||||||
|
if (m_timerChkActive->isActive()) {
|
||||||
|
m_timerChkActive->stop();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
m_timerChkActive->start();
|
||||||
|
}
|
||||||
|
QTimer::singleShot(10,this, [&,this, isSwitchSelf, strUserName](){
|
||||||
|
if(strUserName == "*Guest")
|
||||||
|
{
|
||||||
|
this->displayManager->switchToGuest();
|
||||||
|
}
|
||||||
|
else if(strUserName == "*SwitchUser")
|
||||||
|
{
|
||||||
|
this->displayManager->switchToGreeter();
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
if (!isSwitchSelf) {
|
||||||
|
this->displayManager->switchToUser(strUserName);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
void LockWidget::onSessionActiveChanged(bool isActive)
|
||||||
|
{
|
||||||
|
if (isActive) {
|
||||||
|
if (m_timerChkActive && m_timerChkActive->isActive()) {
|
||||||
|
m_timerChkActive->stop();
|
||||||
|
}
|
||||||
|
if (this->isHidden()) {
|
||||||
|
this->show();
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
if (m_timerChkActive && m_timerChkActive->isActive()) {
|
||||||
|
m_timerChkActive->stop();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
void LockWidget::initUserMenu()
|
void LockWidget::initUserMenu()
|
||||||
{
|
{
|
||||||
|
@ -1787,11 +1831,6 @@ void LockWidget::onUserMenuTrigged(QAction *action)
|
||||||
{
|
{
|
||||||
qDebug() << action->data().toString() << "selected";
|
qDebug() << action->data().toString() << "selected";
|
||||||
|
|
||||||
if(authDialog)
|
|
||||||
{
|
|
||||||
authDialog->stopAuth();
|
|
||||||
}
|
|
||||||
|
|
||||||
QString userName = action->data().toString();
|
QString userName = action->data().toString();
|
||||||
for (int i =0; i < list.count(); i++)
|
for (int i =0; i < list.count(); i++)
|
||||||
{
|
{
|
||||||
|
@ -1803,18 +1842,7 @@ void LockWidget::onUserMenuTrigged(QAction *action)
|
||||||
"HoverWidget:hover:!pressed{background-color:rgb(255,255,255,15%);border-radius: 6px;}");
|
"HoverWidget:hover:!pressed{background-color:rgb(255,255,255,15%);border-radius: 6px;}");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if(userName == "Guest")
|
SwitchToUser(userName);
|
||||||
{
|
|
||||||
displayManager->switchToGuest();
|
|
||||||
}
|
|
||||||
else if(userName == "SwitchUser")
|
|
||||||
{
|
|
||||||
displayManager->switchToGreeter();
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
displayManager->switchToUser(userName);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
bool LockWidget::exitSubWidget()
|
bool LockWidget::exitSubWidget()
|
||||||
|
|
|
@ -95,6 +95,7 @@ public:
|
||||||
void onActiveLineedit();
|
void onActiveLineedit();
|
||||||
QString getBatteryIconName();
|
QString getBatteryIconName();
|
||||||
void key_enter_release(int key);
|
void key_enter_release(int key);
|
||||||
|
void onSessionActiveChanged(bool isActive);
|
||||||
|
|
||||||
Q_SIGNALS:
|
Q_SIGNALS:
|
||||||
void closed();
|
void closed();
|
||||||
|
@ -128,6 +129,8 @@ private:
|
||||||
*/
|
*/
|
||||||
void setRootWindow();
|
void setRootWindow();
|
||||||
|
|
||||||
|
void SwitchToUser(QString strUserName);
|
||||||
|
|
||||||
private Q_SLOTS:
|
private Q_SLOTS:
|
||||||
void onUserAdded(const UserItem &user);
|
void onUserAdded(const UserItem &user);
|
||||||
void onUserDeleted(const UserItem &user);
|
void onUserDeleted(const UserItem &user);
|
||||||
|
@ -208,6 +211,8 @@ private:
|
||||||
|
|
||||||
double curFontSize = 0;
|
double curFontSize = 0;
|
||||||
QFuture<void> m_futureLoadDeskBg;
|
QFuture<void> m_futureLoadDeskBg;
|
||||||
|
|
||||||
|
QTimer *m_timerChkActive = nullptr;
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif // LOCKWIDGET_H
|
#endif // LOCKWIDGET_H
|
||||||
|
|
|
@ -24,6 +24,7 @@
|
||||||
|
|
||||||
const static QString login1Service = QStringLiteral("org.freedesktop.login1");
|
const static QString login1Service = QStringLiteral("org.freedesktop.login1");
|
||||||
const static QString login1Path = QStringLiteral("/org/freedesktop/login1");
|
const static QString login1Path = QStringLiteral("/org/freedesktop/login1");
|
||||||
|
const static QString propertiesInterface = QStringLiteral("org.freedesktop.DBus.Properties");
|
||||||
const static QString login1ManagerInterface = QStringLiteral("org.freedesktop.login1.Manager");
|
const static QString login1ManagerInterface = QStringLiteral("org.freedesktop.login1.Manager");
|
||||||
const static QString login1SessionInterface = QStringLiteral("org.freedesktop.login1.Session");
|
const static QString login1SessionInterface = QStringLiteral("org.freedesktop.login1.Session");
|
||||||
|
|
||||||
|
@ -34,12 +35,11 @@ LogindIntegration::LogindIntegration(QObject *parent)
|
||||||
login1Path,
|
login1Path,
|
||||||
login1ManagerInterface,
|
login1ManagerInterface,
|
||||||
QDBusConnection::systemBus());
|
QDBusConnection::systemBus());
|
||||||
QDBusReply<QDBusObjectPath> sessionPath = loginInterface.call("GetSessionByPID",(quint32) QCoreApplication::applicationPid());
|
QDBusReply<QDBusObjectPath> sessionPath = loginInterface.call("GetSession", "auto");
|
||||||
if(!sessionPath.isValid()){
|
if(!sessionPath.isValid()){
|
||||||
qWarning()<< "Get session error:" << sessionPath.error();
|
qWarning()<< "Get session error:" << sessionPath.error();
|
||||||
}
|
}
|
||||||
else{
|
else{
|
||||||
|
|
||||||
QString session = sessionPath.value().path();
|
QString session = sessionPath.value().path();
|
||||||
QDBusConnection::systemBus().connect(login1Service,
|
QDBusConnection::systemBus().connect(login1Service,
|
||||||
session,
|
session,
|
||||||
|
@ -53,9 +53,56 @@ LogindIntegration::LogindIntegration(QObject *parent)
|
||||||
QStringLiteral("Unlock"),
|
QStringLiteral("Unlock"),
|
||||||
this,
|
this,
|
||||||
SIGNAL(requestUnlock()));
|
SIGNAL(requestUnlock()));
|
||||||
|
|
||||||
|
// 获取会话激活状态
|
||||||
|
QDBusInterface iface(login1Service,
|
||||||
|
session,
|
||||||
|
propertiesInterface,
|
||||||
|
QDBusConnection::systemBus());
|
||||||
|
QDBusReply<QVariant> reply = iface.call("Get", login1SessionInterface, "Active");
|
||||||
|
if (reply.isValid()) {
|
||||||
|
m_isSessionActive = reply.value().toBool();
|
||||||
|
qDebug()<<"Session is active:"<<m_isSessionActive;
|
||||||
|
} else {
|
||||||
|
qDebug() << "Failed to get session active state!";
|
||||||
|
}
|
||||||
|
|
||||||
|
// 监听属性变化
|
||||||
|
QDBusConnection::systemBus().connect(login1Service,
|
||||||
|
session,
|
||||||
|
propertiesInterface,
|
||||||
|
"PropertiesChanged",
|
||||||
|
this,
|
||||||
|
SLOT(onSessionPropChanged(QString, QVariantMap, QStringList)));
|
||||||
}
|
}
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
LogindIntegration::~LogindIntegration() = default;
|
LogindIntegration::~LogindIntegration()
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
void LogindIntegration::onSessionPropChanged(QString strInterface, QVariantMap mapVar, QStringList listValue)
|
||||||
|
{
|
||||||
|
if (login1SessionInterface == strInterface) {
|
||||||
|
qDebug()<<"onSessionPropChanged:"<<strInterface<<mapVar<<listValue;
|
||||||
|
QVariantMap::iterator itVar = mapVar.begin();
|
||||||
|
for ( ; itVar != mapVar.end(); itVar++) {
|
||||||
|
if (itVar.key() == "Active") {
|
||||||
|
QVariant varValue = itVar.value();
|
||||||
|
m_isSessionActive = varValue.toBool();
|
||||||
|
if (!m_isSessionActive) {
|
||||||
|
Q_EMIT requestLock();
|
||||||
|
}
|
||||||
|
Q_EMIT sessionActiveChanged(m_isSessionActive);
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
bool LogindIntegration::isSessionActive()
|
||||||
|
{
|
||||||
|
return m_isSessionActive;
|
||||||
|
}
|
||||||
|
|
12
src/logind.h
12
src/logind.h
|
@ -19,6 +19,7 @@
|
||||||
#define LOGIND_H
|
#define LOGIND_H
|
||||||
|
|
||||||
#include <QDBusConnection>
|
#include <QDBusConnection>
|
||||||
|
#include <QVariantMap>
|
||||||
#include <QObject>
|
#include <QObject>
|
||||||
|
|
||||||
class QDBusServiceWatcher;
|
class QDBusServiceWatcher;
|
||||||
|
@ -28,15 +29,20 @@ class LogindIntegration : public QObject
|
||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
public:
|
public:
|
||||||
explicit LogindIntegration(QObject *parent = nullptr);
|
explicit LogindIntegration(QObject *parent = nullptr);
|
||||||
~LogindIntegration() override;
|
virtual ~LogindIntegration();
|
||||||
|
|
||||||
|
bool isSessionActive();
|
||||||
|
|
||||||
|
public Q_SLOTS:
|
||||||
|
void onSessionPropChanged(QString, QVariantMap, QStringList);
|
||||||
|
|
||||||
Q_SIGNALS:
|
Q_SIGNALS:
|
||||||
void requestLock();
|
void requestLock();
|
||||||
void requestUnlock();
|
void requestUnlock();
|
||||||
void connectedChanged();
|
void sessionActiveChanged(bool isActive);
|
||||||
|
|
||||||
private:
|
private:
|
||||||
|
bool m_isSessionActive = false;
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -29,6 +29,7 @@
|
||||||
#include <QX11Info>
|
#include <QX11Info>
|
||||||
#include <QDesktopWidget>
|
#include <QDesktopWidget>
|
||||||
#include <QDBusInterface>
|
#include <QDBusInterface>
|
||||||
|
#include <QEventLoop>
|
||||||
#include "plasma-shell-manager.h"
|
#include "plasma-shell-manager.h"
|
||||||
#include <signal.h>
|
#include <signal.h>
|
||||||
#include <unistd.h>
|
#include <unistd.h>
|
||||||
|
@ -158,6 +159,30 @@ int main(int argc, char *argv[])
|
||||||
QApplication a(argc, argv);
|
QApplication a(argc, argv);
|
||||||
QApplication::setSetuidAllowed(true);
|
QApplication::setSetuidAllowed(true);
|
||||||
|
|
||||||
|
LogindIntegration *m_logind = new LogindIntegration(&a);
|
||||||
|
QObject::connect(m_logind, &LogindIntegration::requestUnlock, [=]() {
|
||||||
|
if (window) {
|
||||||
|
window->closeScreensaver();
|
||||||
|
} else {
|
||||||
|
exit(0);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
if (!m_logind->isSessionActive()) {
|
||||||
|
QEventLoop *loopTemp = new QEventLoop(&a);
|
||||||
|
QObject::connect(m_logind, &LogindIntegration::sessionActiveChanged, [loopTemp](bool isActive) {
|
||||||
|
qDebug()<<"sessionActiveChanged:"<<isActive;
|
||||||
|
if (isActive && loopTemp->isRunning()) {
|
||||||
|
loopTemp->quit();
|
||||||
|
}
|
||||||
|
});
|
||||||
|
QObject::connect(m_logind, &LogindIntegration::requestLock, [loopTemp]() {
|
||||||
|
qDebug()<<"session requestLock!";
|
||||||
|
if (loopTemp->isRunning()) {
|
||||||
|
loopTemp->quit();
|
||||||
|
}
|
||||||
|
});
|
||||||
|
loopTemp->exec();
|
||||||
|
}
|
||||||
|
|
||||||
//命令行参数解析
|
//命令行参数解析
|
||||||
QCommandLineParser parser;
|
QCommandLineParser parser;
|
||||||
|
@ -214,6 +239,8 @@ int main(int argc, char *argv[])
|
||||||
// a.setStyleSheet(qssFile.readAll());
|
// a.setStyleSheet(qssFile.readAll());
|
||||||
// }
|
// }
|
||||||
// qssFile.close();
|
// qssFile.close();
|
||||||
|
// 监听会话active状态
|
||||||
|
QObject::connect(m_logind, &LogindIntegration::sessionActiveChanged, window, &FullBackgroundWidget::onSessionActiveChanged);
|
||||||
// 注册DBus
|
// 注册DBus
|
||||||
ScreenSaverWndAdaptor adaptorWnd(window);
|
ScreenSaverWndAdaptor adaptorWnd(window);
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue