specify input mask when parabolic effect applied

--trying to handle this way all jumpiness from parabolic
effect when dock is at the bottom edge and the user moves its
mouse at the top edge of the parabolized item. When the mouse
slightly exits the item ParabolicMouseArea and gets a mouseEntered
signal even though, it should not and immediately gets also
a mouseExited signal to correct things. This happens exactly
after the Paraboli.sglClearZoom() signal has been triggered.
work/usta_fix_ecm_version_check
Michail Vourlakos 3 years ago
parent 8a2e2581ef
commit 11f42978fa

@ -317,18 +317,15 @@ Item{
//! Input Mask
if (updateIsEnabled) {
var animated = (animations.needBothAxis.count>0);
if (animated) {
//! clear input mask
latteView.effects.inputMask = Qt.rect(0, 0, -1, -1);
} else {
updateInputGeometry();
}
updateInputGeometry();
}
}
function updateInputGeometry() {
// VisibilityManager.qml tries to workaround faulty onEntered() signals from ParabolicMouseArea
// by specifying inputThickness when ParabolicEffect is applied. (inputThickness->animated scenario)
var animated = (animations.needBothAxis.count>0);
if (!LatteCore.WindowSystem.compositingActive || latteView.behaveAsPlasmaPanel) {
//! clear input mask
latteView.effects.inputMask = Qt.rect(0, 0, -1, -1);
@ -339,9 +336,9 @@ Item{
if (latteView.visibility.isHidden) {
inputThickness = metrics.mask.thickness.hidden;
} else if (root.hasFloatingGapInputEventsDisabled) {
inputThickness = metrics.totals.thickness;
inputThickness = animated ? metrics.mask.thickness.zoomedForItems - metrics.margins.screenEdge : metrics.totals.thickness;
} else {
inputThickness = metrics.mask.screenEdge + metrics.totals.thickness;
inputThickness = animated ? metrics.mask.thickness.zoomedForItems : metrics.mask.screenEdge + metrics.totals.thickness;
}
var subtractedScreenEdge = root.hasFloatingGapInputEventsDisabled && !latteView.visibility.isHidden ? metrics.mask.screenEdge : 0;
@ -350,29 +347,37 @@ Item{
//!use view.localGeometry for length properties
if (plasmoid.location === PlasmaCore.Types.TopEdge) {
inputGeometry.x = latteView.localGeometry.x;
inputGeometry.y = subtractedScreenEdge;
if (!animated) {
inputGeometry.x = latteView.localGeometry.x;
inputGeometry.width = latteView.localGeometry.width;
}
inputGeometry.width = latteView.localGeometry.width;
inputGeometry.height = inputThickness ;
inputGeometry.y = subtractedScreenEdge;
inputGeometry.height = inputThickness;
} else if (plasmoid.location === PlasmaCore.Types.BottomEdge) {
inputGeometry.x = latteView.localGeometry.x;
inputGeometry.y = root.height - inputThickness - subtractedScreenEdge;
if (!animated) {
inputGeometry.x = latteView.localGeometry.x;
inputGeometry.width = latteView.localGeometry.width;
}
inputGeometry.width = latteView.localGeometry.width;
inputGeometry.y = root.height - inputThickness - subtractedScreenEdge;
inputGeometry.height = inputThickness;
} else if (plasmoid.location === PlasmaCore.Types.LeftEdge) {
inputGeometry.x = subtractedScreenEdge;
inputGeometry.y = latteView.localGeometry.y;
if (!animated) {
inputGeometry.y = latteView.localGeometry.y;
inputGeometry.height = latteView.localGeometry.height;
}
inputGeometry.x = subtractedScreenEdge;
inputGeometry.width = inputThickness;
inputGeometry.height = latteView.localGeometry.height;
} else if (plasmoid.location === PlasmaCore.Types.RightEdge) {
inputGeometry.x = root.width - inputThickness - subtractedScreenEdge;
inputGeometry.y = latteView.localGeometry.y;
if (!animated) {
inputGeometry.y = latteView.localGeometry.y;
inputGeometry.height = latteView.localGeometry.height;
}
inputGeometry.x = root.width - inputThickness - subtractedScreenEdge;
inputGeometry.width = inputThickness;
inputGeometry.height = latteView.localGeometry.height;
}
//set the boundaries for latteView local geometry

@ -29,6 +29,16 @@ Item {
&& !communicator.indexerIsSupported
&& appletItem.parabolic.currentParabolicItem !== _parabolicArea
// VisibilityManager.qml tries to workaround faulty onEntered() signals from this MouseArea
// by specifying inputThickness when ParabolicEffect is applied. (inputThickness->animated scenario)
//
// Such is a case is when dock is at the bottom and user moves its
// mouse at top edge of parabolized item. When mouse exits
// slightly ParabolicMouseArea this mousearea here gets a mouseEntered
// signal even though it should not and immediately gets also
// a mouseExited signal to correct things. This happens exactly
// after Paraboli.sglClearZoom() signal has been triggered.
onEntered: {
appletItem.parabolic.setCurrentParabolicItem(_parabolicArea);

Loading…
Cancel
Save