Fix always hidden and unable to popup
This commit is contained in:
parent
d4a67e6817
commit
83c1e42e85
2 changed files with 12 additions and 6 deletions
|
@ -85,6 +85,8 @@ bool FakeWindow::event(QEvent *e)
|
|||
if (!m_delayedMouseTimer.isActive()) {
|
||||
m_delayedMouseTimer.start();
|
||||
}
|
||||
} else if (e->type() == QEvent::Show) {
|
||||
KWindowSystem::setState(winId(), NET::SkipTaskbar | NET::SkipPager | NET::SkipSwitcher);
|
||||
}
|
||||
|
||||
return QQuickView::event(e);
|
||||
|
|
|
@ -146,9 +146,7 @@ QRect MainWindow::windowRect() const
|
|||
void MainWindow::resizeWindow()
|
||||
{
|
||||
setGeometry(windowRect());
|
||||
|
||||
if (m_settings->visibility() == DockSettings::AlwaysShow)
|
||||
updateViewStruts();
|
||||
updateViewStruts();
|
||||
|
||||
emit resizingFished();
|
||||
}
|
||||
|
@ -169,7 +167,11 @@ void MainWindow::initSlideWindow()
|
|||
|
||||
void MainWindow::updateViewStruts()
|
||||
{
|
||||
XWindowInterface::instance()->setViewStruts(this, m_settings->direction(), geometry());
|
||||
if (m_settings->visibility() == DockSettings::AlwaysShow) {
|
||||
XWindowInterface::instance()->setViewStruts(this, m_settings->direction(), geometry());
|
||||
} else {
|
||||
clearViewStruts();
|
||||
}
|
||||
}
|
||||
|
||||
void MainWindow::clearViewStruts()
|
||||
|
@ -246,11 +248,13 @@ void MainWindow::onIconSizeChanged()
|
|||
|
||||
void MainWindow::onVisibilityChanged()
|
||||
{
|
||||
updateViewStruts();
|
||||
|
||||
// Always show
|
||||
if (m_settings->visibility() == DockSettings::AlwaysShow) {
|
||||
setGeometry(windowRect());
|
||||
setVisible(true);
|
||||
updateViewStruts();
|
||||
// updateViewStruts();
|
||||
|
||||
// Delete fakewindow
|
||||
if (m_fakeWindow) {
|
||||
|
@ -260,7 +264,7 @@ void MainWindow::onVisibilityChanged()
|
|||
|
||||
// Always hide
|
||||
if (m_settings->visibility() == DockSettings::AlwaysHide) {
|
||||
clearViewStruts();
|
||||
// clearViewStruts();
|
||||
setGeometry(windowRect());
|
||||
setVisible(false);
|
||||
|
||||
|
|
Loading…
Reference in a new issue