窗口去激活时,重新激活窗口

This commit is contained in:
liuyuanpeng 2022-07-18 15:15:11 +08:00
parent e51bcbd333
commit 030f7d0983
2 changed files with 15 additions and 4 deletions

View File

@ -49,15 +49,15 @@
#include <QDBusInterface>
#include <QDBusReply>
#include <QApplication>
#include "../src/weathermanager.h"
#include "commonfunc.h"
#include "screensaver.h"
#include <X11/extensions/XTest.h>
#include <X11/keysym.h>
#include <X11/Xlib.h>
#include <X11/Xutil.h>
#include "commonfunc.h"
#include "config.h"
#include "../src/weathermanager.h"
#define TIME_TYPE_SCHEMA "org.ukui.control-center.panel.plugins"
#define THEME_TYPE_SCHENA "org.ukui.style"

View File

@ -141,8 +141,19 @@ PlasmaShellManager::PlasmaShellManager(QObject *parent) : QObject(parent)
if(isFirstCreate) {
isFirstCreate = false;
m_appWindow = window;
}
}
connect(m_appWindow, &KWayland::Client::PlasmaWindow::activeChanged,
[this]() {
this->setAppWindowKeepAbove(true);
this->setAppWindowActive();
});
connect(m_appWindow, &KWayland::Client::PlasmaWindow::keepAboveChanged,
[this]() {
this->setAppWindowKeepAbove(true);
this->setAppWindowActive();
});
}
}
});
}
});