mirror of
https://github.com/linuxdeepin/dde-dock.git
synced 2025-06-03 00:15:21 +00:00
fix: wayland下,启动器不支持虚拟键盘输入
wayland下通过判断焦点变化来隐藏启动器。 点击任务栏时,焦点没有变化,不会隐藏启动器。 修改为通过判断鼠标点击事件隐藏启动器。 Log: 修复wayland下,启动器不支持虚拟键盘输入问题 Bug: https://pms.uniontech.com/bug-view-140679.html Influence: 任务栏-启动器 Change-Id: Iaedbdf9c0ed1a77a7120529eba61fd4bdcd1717f
This commit is contained in:
parent
623dc8c764
commit
8ce50708e6
@ -1507,6 +1507,18 @@ QRect MultiScreenWorker::getDockShowMinGeometry(const QString &screenName, bool
|
||||
return rect;
|
||||
}
|
||||
|
||||
bool MultiScreenWorker::launcherVisible()
|
||||
{
|
||||
return m_launcherInter->isValid() ? m_launcherInter->visible() : false;
|
||||
}
|
||||
|
||||
void MultiScreenWorker::setLauncherVisble(bool isVisible)
|
||||
{
|
||||
if (m_launcherInter->isValid()) {
|
||||
isVisible ? m_launcherInter->Show() : m_launcherInter->Hide();
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief 获取任务栏显示时的参数。目前多屏情况下缩放保持一致,如果后续缩放规则修改,这里需要重新调整
|
||||
*
|
||||
|
@ -149,6 +149,9 @@ public:
|
||||
QRect dockRect(const QString &screenName);
|
||||
QRect getDockShowMinGeometry(const QString &screenName, bool withoutScale = false);
|
||||
|
||||
bool launcherVisible();
|
||||
void setLauncherVisble(bool isVisible);
|
||||
|
||||
signals:
|
||||
void opacityChanged(const quint8 value) const;
|
||||
void displayModeChanegd();
|
||||
|
@ -220,6 +220,10 @@ void MainWindow::mousePressEvent(QMouseEvent *e)
|
||||
});
|
||||
return;
|
||||
}
|
||||
|
||||
if (Utils::IS_WAYLAND_DISPLAY && m_multiScreenWorker->launcherVisible()) {
|
||||
m_multiScreenWorker->setLauncherVisble(false);
|
||||
}
|
||||
}
|
||||
|
||||
void MainWindow::keyPressEvent(QKeyEvent *e)
|
||||
|
Loading…
x
Reference in New Issue
Block a user