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;
|
return m_launchPad;
|
||||||
}
|
}
|
||||||
|
#include <QDebug>
|
||||||
void Activity::onActiveWindowChanged()
|
void Activity::onActiveWindowChanged()
|
||||||
{
|
{
|
||||||
KWindowInfo info(KWindowSystem::activeWindow(),
|
KWindowInfo info(KWindowSystem::activeWindow(),
|
||||||
|
@ -66,9 +66,9 @@ void Activity::onActiveWindowChanged()
|
||||||
bool existsWindowMaximized = false;
|
bool existsWindowMaximized = false;
|
||||||
|
|
||||||
for (WId wid : KWindowSystem::windows()) {
|
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;
|
continue;
|
||||||
|
|
||||||
if (i.hasState(NET::MaxVert) || i.hasState(NET::MaxHoriz)) {
|
if (i.hasState(NET::MaxVert) || i.hasState(NET::MaxHoriz)) {
|
||||||
|
|
|
@ -368,13 +368,14 @@ void MainWindow::onVisibilityChanged()
|
||||||
|
|
||||||
if (m_activity->launchPad())
|
if (m_activity->launchPad())
|
||||||
return;
|
return;
|
||||||
else
|
|
||||||
m_hideBlocked = false;
|
|
||||||
|
|
||||||
if (m_settings->visibility() == DockSettings::IntellHide) {
|
if (m_settings->visibility() == DockSettings::IntellHide) {
|
||||||
clearViewStruts();
|
clearViewStruts();
|
||||||
setGeometry(windowRect());
|
setGeometry(windowRect());
|
||||||
|
|
||||||
|
if (!m_fakeWindow && !m_activity->existsWindowMaximized())
|
||||||
|
m_hideBlocked = false;
|
||||||
|
|
||||||
if (m_activity->existsWindowMaximized() && !m_hideBlocked) {
|
if (m_activity->existsWindowMaximized() && !m_hideBlocked) {
|
||||||
setVisible(false);
|
setVisible(false);
|
||||||
} else {
|
} else {
|
||||||
|
@ -389,7 +390,7 @@ void MainWindow::onVisibilityChanged()
|
||||||
if (m_settings->visibility() == DockSettings::AlwaysHide) {
|
if (m_settings->visibility() == DockSettings::AlwaysHide) {
|
||||||
clearViewStruts();
|
clearViewStruts();
|
||||||
setGeometry(windowRect());
|
setGeometry(windowRect());
|
||||||
setVisible(false);
|
setVisible(m_hideBlocked);
|
||||||
|
|
||||||
// Create
|
// Create
|
||||||
if (!m_fakeWindow)
|
if (!m_fakeWindow)
|
||||||
|
|
|
@ -149,7 +149,7 @@ void XWindowInterface::setViewStruts(QWindow *view, DockSettings::Direction dire
|
||||||
|
|
||||||
const auto screen = view->screen();
|
const auto screen = view->screen();
|
||||||
|
|
||||||
const QRect currentScreen {screen->geometry()};
|
// const QRect currentScreen {screen->geometry()};
|
||||||
const QRect wholeScreen { {0, 0}, screen->virtualSize() };
|
const QRect wholeScreen { {0, 0}, screen->virtualSize() };
|
||||||
const int edgeMargins = compositing ? DockSettings::self()->edgeMargins() : 0;
|
const int edgeMargins = compositing ? DockSettings::self()->edgeMargins() : 0;
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue