@ -60,7 +60,10 @@ Item{
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 || animations . needLength . count > 0 ) ) && ! inSlidingIn
readonly property bool isSinkedEventEnabled: ! ( parabolic . isEnabled && ( animations . needBothAxis . count > 0 || animations . needLength . count > 0 ) )
&& ! inSlidingIn
&& ! inSlidingOut
&& ! latteView . visibility . isHidden
property int length: root . isVertical ? Screen.height : Screen . width / / s c r e e n G e o m e t r y . h e i g h t : s c r e e n G e o m e t r y . w i d t h
@ -561,223 +564,14 @@ Item{
}
}
var tempLength = root . isHorizontal ? width : height ;
var tempThickness = root . isHorizontal ? height : width ;
if ( LatteCore . WindowSystem . compositingActive ) {
if ( normalState ) {
/ / c o n s o l e . l o g ( " e n t e r e d n o r m a l s t a t e . . . " ) ;
/ / c o u n t p a n e l l e n g t h
tempLength = background . totals . visualLength ;
tempThickness = metrics . mask . thickness . normal ;
if ( animations . needThickness . count > 0 ) {
tempThickness = LatteCore . WindowSystem . compositingActive ? metrics.mask.thickness.zoomed : metrics . mask . thickness . normal ;
}
if ( maskIsFloating ) {
tempThickness = tempThickness - maskFloatedGap ;
}
if ( latteView . visibility . isHidden && ! slidingAnimationAutoHiddenOut . running ) {
tempThickness = metrics . mask . thickness . hidden ;
}
/ / c o n f i g u r e x , y b a s e d o n p l a s m o i d p o s i t i o n a n d r o o t . p a n e l A l i g n m e n t ( A l i g n m e n t )
if ( ( plasmoid . location === PlasmaCore . Types . BottomEdge ) || ( plasmoid . location === PlasmaCore . Types . TopEdge ) ) {
if ( plasmoid . location === PlasmaCore . Types . BottomEdge ) {
if ( latteView . visibility . isHidden && latteView . visibility . supportsKWinEdges ) {
localY = latteView . height + tempThickness ;
} else if ( maskIsFloating && ! latteView . visibility . isHidden ) {
localY = latteView . height - tempThickness - maskFloatedGap ;
} else {
localY = latteView . height - tempThickness ;
}
} else if ( plasmoid . location === PlasmaCore . Types . TopEdge ) {
if ( latteView . visibility . isHidden && latteView . visibility . supportsKWinEdges ) {
localY = - tempThickness ;
} else if ( maskIsFloating && ! latteView . visibility . isHidden ) {
localY = maskFloatedGap ;
} else {
localY = 0 ;
}
}
if ( plasmoid . configuration . alignment === LatteCore . Types . Justify ) {
localX = ( latteView . width / 2 ) - tempLength / 2 + background . offset ;
} else if ( root . panelAlignment === LatteCore . Types . Left ) {
localX = background . offset ;
} else if ( root . panelAlignment === LatteCore . Types . Center ) {
localX = ( latteView . width / 2 ) - tempLength / 2 + background . offset ;
} else if ( root . panelAlignment === LatteCore . Types . Right ) {
localX = latteView . width - tempLength - background . offset ;
}
} else if ( ( plasmoid . location === PlasmaCore . Types . LeftEdge ) || ( plasmoid . location === PlasmaCore . Types . RightEdge ) ) {
if ( plasmoid . location === PlasmaCore . Types . LeftEdge ) {
if ( latteView . visibility . isHidden && latteView . visibility . supportsKWinEdges ) {
localX = - tempThickness ;
} else if ( maskIsFloating && ! latteView . visibility . isHidden ) {
localX = maskFloatedGap ;
} else {
localX = 0 ;
}
} else if ( plasmoid . location === PlasmaCore . Types . RightEdge ) {
if ( latteView . visibility . isHidden && latteView . visibility . supportsKWinEdges ) {
localX = latteView . width + tempThickness ;
} else if ( maskIsFloating && ! latteView . visibility . isHidden ) {
localX = latteView . width - tempThickness - maskFloatedGap ;
} else {
localX = latteView . width - tempThickness ;
}
}
if ( plasmoid . configuration . alignment === LatteCore . Types . Justify ) {
localY = ( latteView . height / 2 ) - tempLength / 2 + background . offset ;
} else if ( root . panelAlignment === LatteCore . Types . Top ) {
localY = background . offset ;
} else if ( root . panelAlignment === LatteCore . Types . Center ) {
localY = ( latteView . height / 2 ) - tempLength / 2 + background . offset ;
} else if ( root . panelAlignment === LatteCore . Types . Bottom ) {
localY = latteView . height - tempLength - background . offset ;
}
}
if ( latteView . visibility . isHidden && latteView && latteView . visibility . mode === LatteCore . Types . SidebarOnDemand ) {
/ / ! h i d e c o m p l e t e l y
localX = - 1 ;
localY = - 1 ;
tempThickness = 1 ;
tempLength = 1 ;
}
} else {
/ / ! i n N o r m a l S t a t e
if ( root . isHorizontal )
tempLength = Screen . width ; / / s c r e e n G e o m e t r y . w i d t h ;
else
tempLength = Screen . height ; / / s c r e e n G e o m e t r y . h e i g h t ;
/ / g r o w o n l y o n l e n g t h a n d n o t t h i c k n e s s
var onlyLengthAnimation = ( animations . needLength . count > 0 && animations . needBothAxis . count === 0 ) ;
if ( onlyLengthAnimation ) {
/ / t h i s i s u s e d t o f i x a b u g w i t h s h a d o w s h o w i n g w h e n t h e a n i m a t i o n o f e d i t m o d e
/ / i s t r i g g e r e d
tempThickness = metrics . mask . thickness . normal ;
if ( latteView . visibility . isHidden && ! slidingAnimationAutoHiddenOut . running ) {
tempThickness = metrics . mask . thickness . hidden ;
} else if ( animations . needThickness . count > 0 ) {
tempThickness = metrics . mask . thickness . maxZoomed ;
}
} else {
/ / u s e a l l t h i c k n e s s s p a c e
if ( latteView . visibility . isHidden && ! slidingAnimationAutoHiddenOut . running ) {
tempThickness = LatteCore . WindowSystem . compositingActive ? metrics.mask.thickness.hidden : metrics . mask . thickness . maxNormalForItems ;
} else {
tempThickness = ! maskIsFloating ? metrics.mask.thickness.maxZoomed : metrics . mask . thickness . maxZoomed - maskFloatedGap ;
}
}
/ / c o n f i g u r e t h e x , y p o s i t i o n b a s e d o n t h i c k n e s s
if ( plasmoid . location === PlasmaCore . Types . RightEdge ) {
localX = ! maskIsFloating ? latteView . width - tempThickness : latteView . width - tempThickness - maskFloatedGap ;
if ( localX < 0 ) {
tempThickness = tempThickness + localX ;
localX = 0 ;
}
} else if ( plasmoid . location === PlasmaCore . Types . BottomEdge ) {
localY = ! maskIsFloating ? latteView . height - tempThickness : latteView . height - tempThickness - maskFloatedGap ;
if ( localY < 0 ) {
tempThickness = tempThickness + localY ;
localY = 0 ;
}
} else if ( plasmoid . location === PlasmaCore . Types . TopEdge ) {
localY = ! maskIsFloating ? 0 : maskFloatedGap ;
} else if ( plasmoid . location === PlasmaCore . Types . LeftEdge ) {
localX = ! maskIsFloating ? 0 : maskFloatedGap ;
}
}
} / / e n d o f c o m p o s i t i n g c a l c u l a t i o n s
var maskArea = latteView . effects . mask ;
if ( LatteCore . WindowSystem . compositingActive ) {
var maskLength = maskArea . width ; / / i n H o r i z o n t a l
if ( root . isVertical ) {
maskLength = maskArea . height ;
}
var maskThickness = maskArea . height ; / / i n H o r i z o n t a l
if ( root . isVertical ) {
maskThickness = maskArea . width ;
if ( ! LatteCore . WindowSystem . compositingActive ) {
if ( ! latteView . visibility . isHidden ) {
latteView . effects . mask = latteView . effects . rect ;
}
} else {
/ / ! n o c o m p o s i t i n g c a s e
var overridesHidden = latteView . visibility . isHidden && ! latteView . visibility . supportsKWinEdges ;
if ( ! overridesHidden ) {
localX = latteView . effects . rect . x ;
localY = latteView . effects . rect . y ;
} else {
if ( plasmoid . location === PlasmaCore . Types . BottomEdge ) {
localX = latteView . effects . rect . x ;
localY = root . height - metrics . mask . thickness . hidden ;
} else if ( plasmoid . location === PlasmaCore . Types . TopEdge ) {
localX = latteView . effects . rect . x ;
localY = 0 ;
} else if ( plasmoid . location === PlasmaCore . Types . LeftEdge ) {
localX = 0 ;
localY = latteView . effects . rect . y ;
} else if ( plasmoid . location === PlasmaCore . Types . RightEdge ) {
localX = root . width - metrics . mask . thickness . hidden ;
localY = latteView . effects . rect . y ;
}
}
if ( root . isHorizontal ) {
tempThickness = overridesHidden ? metrics.mask.thickness.hidden : latteView . effects . rect . height ;
tempLength = latteView . effects . rect . width ;
} else {
tempThickness = overridesHidden ? metrics.mask.thickness.hidden : latteView . effects . rect . width ;
tempLength = latteView . effects . rect . height ;
}
latteView . effects . mask = Qt . rect ( 0 , 0 , root . width , root . height ) ;
}
/ / c o n s o l e . l o g ( " N o t u p d a t i n g m a s k . . . " ) ;
if ( maskArea . x !== localX || maskArea . y !== localY
|| maskLength !== tempLength || maskThickness !== tempThickness ) {
/ / c o n s o l e . l o g ( " U p d a t i n g m a s k . . . " ) ;
var newMaskArea = Qt . rect ( - 1 , - 1 , 0 , 0 ) ;
newMaskArea . x = localX ;
newMaskArea . y = localY ;
if ( isHorizontal ) {
newMaskArea . width = tempLength ;
newMaskArea . height = tempThickness ;
} else {
newMaskArea . width = tempThickness ;
newMaskArea . height = tempLength ;
}
if ( ! LatteCore . WindowSystem . compositingActive ) {
latteView . effects . mask = newMaskArea ;
} else {
if ( latteView . behaveAsPlasmaPanel ) {
latteView . effects . mask = Qt . rect ( 0 , 0 , root . width , root . height ) ;
} else {
latteView . effects . mask = newMaskArea ;
}
}
}
var validIconSize = ( metrics . iconSize === metrics . maxIconSize || metrics . iconSize === autosize . iconSize ) ;
/ / c o n s o l e . l o g ( " r e a c h e d u p d a t i n g g e o m e t r y : : : " + d o c k . m a s k A r e a ) ;
if ( inPublishingState && ! latteView . visibility . isHidden && normalState ) {
@ -831,20 +625,16 @@ Item{
latteView . localGeometry = localGeometry ;
}
/ / ! I n p u t M a s k
if ( LatteCore . WindowSystem . isPlatformX11 ) {
/ / ! T h i s i s n o t n e e d e d u n d e r w a y l a n d e n v i r o n m e n t , m a s k ( ) c a n b e u s e d i n s t e a d
var animated = ( animations . needBothAxis . count > 0
|| animations . needLength . count > 0
|| animations . needThickness . count > 0
|| latteView . visibility . isHidden ) ;
var animated = ( animations . needBothAxis . count > 0 ) ;
if ( ! LatteCore . WindowSystem . compositingActive || animated || latteView . behaveAsPlasmaPanel ) {
latteView . effects . inputMask = Qt . rect ( 0 , 0 , - 1 , - 1 ) ;
} else {
var inputThickness = metrics. mask . screenEdge + metrics . totals . thickness ;
var inputThickness = latteView. visibility . isHidden ? metrics.mask.thickness.hidden : metrics. mask . screenEdge + metrics . totals . thickness ;
var inputGeometry = Qt . rect ( 0 , 0 , root . width , root . height ) ;
if ( plasmoid . location === PlasmaCore . Types . TopEdge ) {