redraw panel shadows after !visible workarounds

--use a single slot when View triggers its workarounds
for the kwin issue that kwin hides panels when an activity
stops. In such case the view shadows are also redrawn.
pull/15/head
Michail Vourlakos 5 years ago
parent 7f2dc14880
commit e83f7e551e

@ -1044,6 +1044,7 @@ void View::applyActivitiesToWindows()
m_windowsTracker->setWindowOnActivities(*this, runningActivities);
//! config windows
if (m_configView) {
m_windowsTracker->setWindowOnActivities(*m_configView, runningActivities);
@ -1054,12 +1055,30 @@ void View::applyActivitiesToWindows()
}
}
//! hidden windows
if (m_visibility->supportsKWinEdges()) {
m_visibility->applyActivitiesToHiddenWindows(runningActivities);
}
}
}
void View::showHiddenViewFromActivityStopping()
{
if (m_layout && m_visibility && !inDelete() && !isVisible() && !m_visibility->isHidden()) {
show();
if (m_effects) {
m_effects->updateEnabledBorders();
}
//qDebug() << "View:: Enforce reshow from timer 1...";
emit forcedShown();
} else if (m_layout && isVisible()) {
m_inDelete = false;
//qDebug() << "View:: No needed reshow from timer 1...";
}
}
Layout::GenericLayout *View::layout() const
{
return m_layout;
@ -1110,6 +1129,7 @@ void View::setLayout(Layout::GenericLayout *layout)
if (m_layout && m_visibility) {
setActivities(m_layout->appliedActivities());
applyActivitiesToWindows();
showHiddenViewFromActivityStopping();
qDebug() << "DOCK VIEW FROM LAYOUT (currentActivityChanged) ::: " << m_layout->name() << " - activities: " << m_activities;
}
});
@ -1153,30 +1173,14 @@ void View::setLayout(Layout::GenericLayout *layout)
connectionsLayout << connect(&m_visibleHackTimer1, &QTimer::timeout, this, [&]() {
applyActivitiesToWindows();
showHiddenViewFromActivityStopping();
emit activitiesChanged();
if (m_layout && !inDelete() & !isVisible()) {
show();
//qDebug() << "View:: Enforce reshow from timer 1...";
emit forcedShown();
} else if (m_layout && isVisible()){
m_inDelete = false;
//qDebug() << "View:: No needed reshow from timer 1...";
}
});
connectionsLayout << connect(&m_visibleHackTimer2, &QTimer::timeout, this, [&]() {
applyActivitiesToWindows();
showHiddenViewFromActivityStopping();
emit activitiesChanged();
if (m_layout && !inDelete() & !isVisible()) {
show();
//qDebug() << "View:: Enforce reshow from timer 1...";
emit forcedShown();
} else if (m_layout && isVisible()){
m_inDelete = false;
//qDebug() << "View:: No needed reshow from timer 1...";
}
});
//! END OF KWIN HACK

@ -347,6 +347,9 @@ private slots:
void topViewAlwaysOnTop();
void verticalUnityViewHasFocus();
//!workround for when kwin hides view when an activity is closing
void showHiddenViewFromActivityStopping();
void restoreConfig();
void saveConfig();

@ -41,6 +41,9 @@ Item {
width: isInternalViewSplitter && !root.inConfigureAppletsMode ? 0 : computeWidth
height: isInternalViewSplitter && !root.inConfigureAppletsMode ? 0 : computeHeight
//any applets that exceed their limits should not take events from their surrounding applets
clip: true
signal mousePressed(int x, int y, int button);
signal mouseReleased(int x, int y, int button);

@ -25,7 +25,7 @@ import org.kde.latte.core 0.2 as LatteCore
Flickable{
id: flickableContainer
clip: root.screenGeometry && contentsExceed
clip: false
flickableDirection: plasmoid.formFactor === PlasmaCore.Types.Horizontal ? Flickable.HorizontalFlick : Flickable.VerticalFlick
interactive: false

Loading…
Cancel
Save