diff --git a/app/view/view.cpp b/app/view/view.cpp index d5e69b9b5..12611c072 100644 --- a/app/view/view.cpp +++ b/app/view/view.cpp @@ -1439,6 +1439,8 @@ bool View::event(QEvent *e) positionAdjustedForContainment(me->windowPos()) + position(), me->button(), me->buttons(), me->modifiers()); + qDebug() << me->windowPos() << " => " << me2->windowPos() << " | " << m_padding->margins(); + adjustedevent = me2; } } diff --git a/containment/package/contents/ui/VisibilityManager.qml b/containment/package/contents/ui/VisibilityManager.qml index 59d4b1816..78af9fde0 100644 --- a/containment/package/contents/ui/VisibilityManager.qml +++ b/containment/package/contents/ui/VisibilityManager.qml @@ -51,12 +51,17 @@ Item{ property int animationSpeed: LatteCore.WindowSystem.compositingActive ? (root.editMode ? 400 : animations.speedFactor.normal * 1.62 * animations.duration.large) : 0 + + property bool inLocationAnimation: latteView && latteView.positioner && latteView.positioner.inLocationAnimation property bool inSlidingIn: false //necessary because of its init structure property alias inSlidingOut: slidingAnimationAutoHiddenOut.running property bool inRelocationHiding: false property bool inScreenEdgeInternalWindowSliding: root.behaveAsDockWithMask && hideThickScreenGap + readonly property bool inSliding: inSlidingIn || inSlidingOut || inRelocationHiding || inScreenEdgeInternalWindowSliding || inLocationAnimation + readonly property bool isSinkedEventEnabled: !(parabolic.isEnabled && animations.needBothAxis.count>0) && !inSlidingIn + property int length: root.isVertical ? Screen.height : Screen.width //screenGeometry.height : screenGeometry.width property int slidingOutToPos: { @@ -220,32 +225,68 @@ Item{ target: latteView.padding property: "top" when: latteView - value: plasmoid.formFactor === PlasmaCore.Types.Vertical && !parabolic.isEnabled ? - background.paddings.top + Math.abs(metrics.padding.length) : 0 + value: { + if (!isSinkedEventEnabled) { + return 0; + } + + if (plasmoid.formFactor === PlasmaCore.Types.Vertical) { + return background.paddings.top + Math.abs(metrics.padding.length); + } + + return metrics.margin.thickness; + } } Binding{ target: latteView.padding property: "bottom" when: latteView - value: plasmoid.formFactor === PlasmaCore.Types.Vertical && !parabolic.isEnabled ? - background.paddings.bottom + Math.abs(metrics.padding.length) : 0 + value:{ + if (!isSinkedEventEnabled) { + return 0; + } + + if (plasmoid.formFactor === PlasmaCore.Types.Vertical) { + return background.paddings.bottom + Math.abs(metrics.padding.length); + } + + return metrics.margin.thickness; + } } Binding{ target: latteView.padding property: "left" when: latteView - value: plasmoid.formFactor === PlasmaCore.Types.Horizontal && !parabolic.isEnabled ? - background.paddings.left + Math.abs(metrics.padding.length) : 0 + value: { + if (!isSinkedEventEnabled) { + return 0; + } + + if (plasmoid.formFactor === PlasmaCore.Types.Horizontal) { + return background.paddings.left + Math.abs(metrics.padding.length); + } + + return metrics.margin.thickness; + } } Binding{ target: latteView.padding property: "right" when: latteView - value: plasmoid.formFactor === PlasmaCore.Types.Horizontal && !parabolic.isEnabled ? - background.paddings.right + Math.abs(metrics.padding.length) : 0 + value: { + if (!isSinkedEventEnabled) { + return 0; + } + + if (plasmoid.formFactor === PlasmaCore.Types.Horizontal) { + return background.paddings.right + Math.abs(metrics.padding.length); + } + + return metrics.margin.thickness; + } } //! View::Effects bindings diff --git a/containment/package/contents/ui/applet/AppletItem.qml b/containment/package/contents/ui/applet/AppletItem.qml index 6dd1d5a9f..e105606f3 100644 --- a/containment/package/contents/ui/applet/AppletItem.qml +++ b/containment/package/contents/ui/applet/AppletItem.qml @@ -658,7 +658,7 @@ Item { appletItem.mousePressed(local.x, local.y, button); - if (button === Qt.LeftButton && parabolic.isEnabled) { + if (button === Qt.LeftButton && parabolic.isEnabled && animations.needBothAxis.count>0) { /*Hack, until the sinked events plasma approach works propertly with parabolic effect*/ appletItem.activateAppletForNeutralAreas(local); } diff --git a/containment/package/contents/ui/applet/ItemWrapper.qml b/containment/package/contents/ui/applet/ItemWrapper.qml index 6928a0cf7..7e8e559d2 100644 --- a/containment/package/contents/ui/applet/ItemWrapper.qml +++ b/containment/package/contents/ui/applet/ItemWrapper.qml @@ -221,7 +221,8 @@ Item{ return !root.inConfigureAppletsMode ? 0 : appletItem.metrics.iconSize; } - if (communicator.parabolicEffectIsSupported && !communicator.inStartup/*avoid binding loops on startup*/) { + // avoid binding loops on startup + if (communicator.parabolicEffectIsSupported && !communicator.inStartup) { return appletPreferredThickness; } @@ -325,6 +326,8 @@ Item{ return appletItem.screenEdgeMarginSupported ? 0 : appletItem.metrics.margin.screenEdge; } + readonly property int tailThicknessMargin: appliedEdgeMargin + (wrapper.zoomScaleThickness * metrics.margin.thickness) + Binding { target: _wrapperContainer property: "_thickness" @@ -334,7 +337,7 @@ Item{ return wrapper.layoutThickness; } - var wrapperContainerThickness = wrapper.zoomScaleThickness * (appletItem.metrics.totals.thickness); + var wrapperContainerThickness = wrapper.zoomScaleThickness * (metrics.iconSize/* appletItem.metrics.totals.thickness*/); return appletItem.screenEdgeMarginSupported ? wrapperContainerThickness + appletItem.metrics.margin.screenEdge : wrapperContainerThickness; } } @@ -348,9 +351,10 @@ Item{ return wrapper.length; } + /* if (appletItem.isInternalViewSplitter) { return wrapper.layoutLength; - } + }*/ return wrapper.zoomScaleLength * wrapper.layoutLength; } @@ -436,7 +440,7 @@ Item{ } PropertyChanges{ target: _wrapperContainer; - anchors.leftMargin: 0; anchors.rightMargin: 0; anchors.topMargin:0; anchors.bottomMargin: _wrapperContainer.appliedEdgeMargin; + anchors.leftMargin: 0; anchors.rightMargin: 0; anchors.topMargin:0; anchors.bottomMargin: _wrapperContainer.tailThicknessMargin anchors.horizontalCenterOffset: 0; anchors.verticalCenterOffset: 0; } }, @@ -451,7 +455,7 @@ Item{ } PropertyChanges{ target: _wrapperContainer; - anchors.leftMargin: 0; anchors.rightMargin: 0; anchors.topMargin: _wrapperContainer.appliedEdgeMargin; anchors.bottomMargin: 0; + anchors.leftMargin: 0; anchors.rightMargin: 0; anchors.topMargin: _wrapperContainer.tailThicknessMargin; anchors.bottomMargin: 0; anchors.horizontalCenterOffset: 0; anchors.verticalCenterOffset: 0; } }, @@ -466,7 +470,7 @@ Item{ } PropertyChanges{ target: _wrapperContainer; - anchors.leftMargin: _wrapperContainer.appliedEdgeMargin; anchors.rightMargin: 0; anchors.topMargin:0; anchors.bottomMargin: 0; + anchors.leftMargin: _wrapperContainer.tailThicknessMargin; anchors.rightMargin: 0; anchors.topMargin:0; anchors.bottomMargin: 0; anchors.horizontalCenterOffset: 0; anchors.verticalCenterOffset: 0; } }, @@ -481,7 +485,7 @@ Item{ } PropertyChanges{ target: _wrapperContainer; - anchors.leftMargin: 0; anchors.rightMargin: _wrapperContainer.appliedEdgeMargin; anchors.topMargin:0; anchors.bottomMargin: 0; + anchors.leftMargin: 0; anchors.rightMargin: _wrapperContainer.tailThicknessMargin; anchors.topMargin:0; anchors.bottomMargin: 0; anchors.horizontalCenterOffset: 0; anchors.verticalCenterOffset: 0; } }