dont crash when panels change location

pull/19/head
Michail Vourlakos 5 years ago
parent ea7940dffe
commit 0b8fa321bc

@ -871,6 +871,7 @@ void Positioner::initSignalingForLocationChangeSliding()
connect(m_view, &View::locationChanged, this, [&]() {
if (m_goToLocation != Plasma::Types::Floating) {
m_goToLocation = Plasma::Types::Floating;
QTimer::singleShot(100, [this]() {
m_view->effects()->setAnimationsBlocked(false);
emit showDockAfterLocationChangeFinished();

@ -455,7 +455,6 @@ void PrimaryConfigView::showEvent(QShowEvent *ev)
void PrimaryConfigView::hideEvent(QHideEvent *ev)
{
if (!m_latteView) {
deleteLater();
return;
}

@ -81,9 +81,11 @@ VisibilityManager::VisibilityManager(PlasmaQuick::ContainmentView *view)
//! Frame Extents
connect(m_latteView, &Latte::View::headThicknessGapChanged, this, &VisibilityManager::on_publishFrameExtents);
connect(m_latteView, &Latte::View::locationChanged, this, [&]() {
//! Resend frame extents because their geometry has changed
const bool forceUpdate{true};
publishFrameExtents(forceUpdate);
if (!m_latteView->behaveAsPlasmaPanel()) {
//! Resend frame extents because their geometry has changed
const bool forceUpdate{true};
publishFrameExtents(forceUpdate);
}
});
connect(m_latteView, &Latte::View::typeChanged, this, [&]() {

@ -53,7 +53,7 @@ Item{
Binding {
target: layoutsContainer
property: "x"
when: !visibilityManager.inLocationAnimation
when: root.behaveAsDockWithMask && !visibilityManager.inLocationAnimation
value: {
if (root.behaveAsPlasmaPanel) {
return 0;
@ -86,7 +86,7 @@ Item{
Binding{
target: layoutsContainer
property: "y"
when: !visibilityManager.inLocationAnimation
when: root.behaveAsDockWithMask && !visibilityManager.inLocationAnimation
value: {
if (root.behaveAsPlasmaPanel) {
return 0;

@ -98,8 +98,7 @@ Item {
return (visibilityManager.panelIsBiggerFromIconSize
&& (parabolic.factor.maxZoom === 1.0)
&& (plasmoid.configuration.alignment === LatteCore.Types.Justify || staticLayout)
&& !visibilityManager.inLocationAnimation);
&& (plasmoid.configuration.alignment === LatteCore.Types.Justify || staticLayout));
}
readonly property bool behaveAsDockWithMask: !behaveAsPlasmaPanel

Loading…
Cancel
Save