mirror of
https://github.com/linuxdeepin/dde-dock.git
synced 2025-06-04 17:33:05 +00:00
fix(frame): 无特效时任务栏不能唤起
屏幕分辨率改变后dock大小未设置,另在屏幕边缘处会循环触发 Log: 修复2D模式下,设置任务栏状态为智能隐藏后,移开窗口和鼠标放置任务栏位置均不能唤醒任务栏 Bug: https://pms.uniontech.com/zentao/bug-view-33639.html
This commit is contained in:
parent
303785464c
commit
1e4669c549
@ -274,7 +274,6 @@ const QRect DockSettings::windowRect(const Position position, const bool hide, c
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
const QRect primaryRect = this->currentRect(beNarrow);
|
const QRect primaryRect = this->currentRect(beNarrow);
|
||||||
const int offsetX = (primaryRect.width() - size.width()) / 2;
|
const int offsetX = (primaryRect.width() - size.width()) / 2;
|
||||||
const int offsetY = (primaryRect.height() - size.height()) / 2;
|
const int offsetY = (primaryRect.height() - size.height()) / 2;
|
||||||
@ -532,6 +531,8 @@ bool DockSettings::setDockScreen(const QString &scrName)
|
|||||||
}
|
}
|
||||||
m_isMouseMoveCause = canBeDock;
|
m_isMouseMoveCause = canBeDock;
|
||||||
|
|
||||||
|
posChangedUpdateSettings();
|
||||||
|
|
||||||
return canBeDock;
|
return canBeDock;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -188,9 +188,9 @@ MainWindow::MainWindow(QWidget *parent)
|
|||||||
|
|
||||||
connect(m_panelShowAni, &QVariantAnimation::valueChanged, [ this ](const QVariant & value) {
|
connect(m_panelShowAni, &QVariantAnimation::valueChanged, [ this ](const QVariant & value) {
|
||||||
|
|
||||||
|
qDebug() << m_mainPanel->width();
|
||||||
if (m_panelShowAni->state() != QPropertyAnimation::Running)
|
if (m_panelShowAni->state() != QPropertyAnimation::Running)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
// dock的宽度或高度值
|
// dock的宽度或高度值
|
||||||
int val = value.toInt();
|
int val = value.toInt();
|
||||||
// 当前dock尺寸
|
// 当前dock尺寸
|
||||||
@ -607,8 +607,9 @@ void MainWindow::newPositionExpand()
|
|||||||
m_dragWidget->setCursor(Qt::SizeHorCursor);
|
m_dragWidget->setCursor(Qt::SizeHorCursor);
|
||||||
}
|
}
|
||||||
|
|
||||||
updatePanelVisible();
|
|
||||||
disconnect(m_panelHideAni, &QVariantAnimation::finished, this, &MainWindow::newPositionExpand);
|
disconnect(m_panelHideAni, &QVariantAnimation::finished, this, &MainWindow::newPositionExpand);
|
||||||
|
|
||||||
|
updatePanelVisible();
|
||||||
}
|
}
|
||||||
|
|
||||||
void MainWindow::clearStrutPartial()
|
void MainWindow::clearStrutPartial()
|
||||||
@ -729,7 +730,7 @@ void MainWindow::expand()
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (startValue > endValue)
|
if (startValue >= endValue)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
m_panelShowAni->setStartValue(startValue);
|
m_panelShowAni->setStartValue(startValue);
|
||||||
@ -770,6 +771,7 @@ void MainWindow::updatePanelVisible()
|
|||||||
if (m_settings->hideMode() == KeepShowing) {
|
if (m_settings->hideMode() == KeepShowing) {
|
||||||
if (!m_registerKey.isEmpty()) {
|
if (!m_registerKey.isEmpty()) {
|
||||||
m_eventInter->UnregisterArea(m_registerKey);
|
m_eventInter->UnregisterArea(m_registerKey);
|
||||||
|
qDebug() << "register area clear";
|
||||||
}
|
}
|
||||||
return expand();
|
return expand();
|
||||||
}
|
}
|
||||||
@ -984,11 +986,25 @@ void MainWindow::onRegionMonitorChanged(int x, int y, const QString &key)
|
|||||||
expand();
|
expand();
|
||||||
} else {
|
} else {
|
||||||
// 移动Dock至相应屏相应位置
|
// 移动Dock至相应屏相应位置
|
||||||
if (m_settings->setDockScreen(screen->name()))
|
if (m_settings->setDockScreen(screen->name())) {
|
||||||
if (m_settings->hideMode() == KeepShowing || m_settings->hideMode() == SmartHide)
|
if (m_settings->hideMode() == KeepShowing || m_settings->hideMode() == SmartHide)
|
||||||
positionChanged();
|
positionChanged();
|
||||||
else
|
else {
|
||||||
|
int screenWidth = screen->size().width();
|
||||||
|
int screenHeight = screen->size().height();
|
||||||
|
switch (m_dockPosition) {
|
||||||
|
case Dock::Top:
|
||||||
|
case Dock::Bottom:
|
||||||
|
setFixedWidth(screenWidth);
|
||||||
|
break;
|
||||||
|
case Dock::Left:
|
||||||
|
case Dock::Right:
|
||||||
|
setFixedHeight(screenHeight);
|
||||||
|
break;
|
||||||
|
}
|
||||||
expand();
|
expand();
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -996,6 +1012,7 @@ void MainWindow::updateRegionMonitorWatch()
|
|||||||
{
|
{
|
||||||
if (!m_registerKey.isEmpty()) {
|
if (!m_registerKey.isEmpty()) {
|
||||||
m_eventInter->UnregisterArea(m_registerKey);
|
m_eventInter->UnregisterArea(m_registerKey);
|
||||||
|
qDebug() << "register area clear";
|
||||||
m_registerKey.clear();
|
m_registerKey.clear();
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1061,8 +1078,10 @@ void MainWindow::updateRegionMonitorWatch()
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
m_registerKey = m_eventInter->RegisterAreas(monitorAreas , flags);
|
m_registerKey = m_eventInter->RegisterAreas(monitorAreas , flags);
|
||||||
|
qDebug() << "register key" << m_registerKey;
|
||||||
} else {
|
} else {
|
||||||
m_registerKey = m_eventInter->RegisterFullScreen();
|
m_registerKey = m_eventInter->RegisterFullScreen();
|
||||||
|
qDebug() << "register full screen" << m_registerKey;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -128,7 +128,6 @@ private:
|
|||||||
DWindowManagerHelper *m_wmHelper;
|
DWindowManagerHelper *m_wmHelper;
|
||||||
XEventMonitor *m_eventInter;
|
XEventMonitor *m_eventInter;
|
||||||
QString m_registerKey;
|
QString m_registerKey;
|
||||||
QStringList m_registerKeys;
|
|
||||||
|
|
||||||
QTimer *m_positionUpdateTimer;
|
QTimer *m_positionUpdateTimer;
|
||||||
QTimer *m_expandDelayTimer;
|
QTimer *m_expandDelayTimer;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user