fixbug#182587 鼠标移动事件屏蔽讯飞输入法相关的应用

This commit is contained in:
tanjing 2023-09-11 14:50:06 +08:00 committed by xibowen
parent 5ecc0d558a
commit 6843aba392
2 changed files with 17 additions and 0 deletions

View File

@ -108,4 +108,16 @@ static const QStringList focusStateActiveList() {
return l;
}
static const QStringList windowManageBlackList() {
QStringList l;
l << "iflyime-spe-sym";
l << "iflyime-qimpanel";
l << "iflyime-setw";
l << "iflyime-sett";
l << "iflyime-qim";
l << "iflyime-hw";
l << "SpecificSymbol";
return l;
}
#endif // BLACKLIST_H

View File

@ -34,6 +34,7 @@
#include <QWindow>
#include <QDebug>
#include "black-list.h"
WindowManager::WindowManager(QObject *parent) : QObject(parent)
{
@ -122,6 +123,10 @@ bool WindowManager::eventFilter(QObject *obj, QEvent *e)
}
case QEvent::MouseMove: {
//if (QWidget::mouseGrabber()) return false;
//fixbug#182587
if(windowManageBlackList().contains(qApp->applicationName()) || windowManageBlackList().contains(qAppName())){
return false;
}
QMouseEvent *event = static_cast<QMouseEvent*>(e);
/*! \note In x11, accuracy of the MouseEvent translated from TouchEvent is not