Improve hide
This commit is contained in:
parent
bf7921a171
commit
f0c473507a
3 changed files with 8 additions and 7 deletions
|
@ -53,7 +53,7 @@ bool Activity::launchPad() const
|
|||
{
|
||||
return m_launchPad;
|
||||
}
|
||||
|
||||
#include <QDebug>
|
||||
void Activity::onActiveWindowChanged()
|
||||
{
|
||||
KWindowInfo info(KWindowSystem::activeWindow(),
|
||||
|
@ -66,9 +66,9 @@ void Activity::onActiveWindowChanged()
|
|||
bool existsWindowMaximized = false;
|
||||
|
||||
for (WId wid : KWindowSystem::windows()) {
|
||||
KWindowInfo i(wid, NET::WMState);
|
||||
KWindowInfo i(wid, NET::WMState, NET::WM2WindowClass);
|
||||
|
||||
if (i.isMinimized())
|
||||
if (i.isMinimized() || i.hasState(NET::SkipTaskbar))
|
||||
continue;
|
||||
|
||||
if (i.hasState(NET::MaxVert) || i.hasState(NET::MaxHoriz)) {
|
||||
|
|
|
@ -368,13 +368,14 @@ void MainWindow::onVisibilityChanged()
|
|||
|
||||
if (m_activity->launchPad())
|
||||
return;
|
||||
else
|
||||
m_hideBlocked = false;
|
||||
|
||||
if (m_settings->visibility() == DockSettings::IntellHide) {
|
||||
clearViewStruts();
|
||||
setGeometry(windowRect());
|
||||
|
||||
if (!m_fakeWindow && !m_activity->existsWindowMaximized())
|
||||
m_hideBlocked = false;
|
||||
|
||||
if (m_activity->existsWindowMaximized() && !m_hideBlocked) {
|
||||
setVisible(false);
|
||||
} else {
|
||||
|
@ -389,7 +390,7 @@ void MainWindow::onVisibilityChanged()
|
|||
if (m_settings->visibility() == DockSettings::AlwaysHide) {
|
||||
clearViewStruts();
|
||||
setGeometry(windowRect());
|
||||
setVisible(false);
|
||||
setVisible(m_hideBlocked);
|
||||
|
||||
// Create
|
||||
if (!m_fakeWindow)
|
||||
|
|
|
@ -149,7 +149,7 @@ void XWindowInterface::setViewStruts(QWindow *view, DockSettings::Direction dire
|
|||
|
||||
const auto screen = view->screen();
|
||||
|
||||
const QRect currentScreen {screen->geometry()};
|
||||
// const QRect currentScreen {screen->geometry()};
|
||||
const QRect wholeScreen { {0, 0}, screen->virtualSize() };
|
||||
const int edgeMargins = compositing ? DockSettings::self()->edgeMargins() : 0;
|
||||
|
||||
|
|
Loading…
Reference in a new issue