@ -310,67 +310,76 @@ Item{
if ( updateIsEnabled ) {
var animated = ( animations . needBothAxis . count > 0 ) ;
if ( ! LatteCore . WindowSystem . compositingActive || animated || latteView . behaveAsPlasmaPanel ) {
if ( animated ) {
/ / ! c l e a r i n p u t m a s k
latteView . effects . inputMask = Qt . rect ( 0 , 0 , - 1 , - 1 ) ;
} else {
var floatingInternalGapAcceptsInput = behaveAsDockWithMask && floatingInternalGapIsForced ;
var inputThickness ;
updateInputGeometry ( ) ;
}
}
}
if ( latteView . visibility . isHidden ) {
inputThickness = metrics . mask . thickness . hidden ;
} else if ( root . hasFloatingGapInputEventsDisabled ) {
inputThickness = metrics . totals . thickness ;
} else {
inputThickness = metrics . mask . screenEdge + metrics . totals . thickness ;
}
function updateInputGeometry ( ) {
if ( ! LatteCore . WindowSystem . compositingActive || latteView . behaveAsPlasmaPanel ) {
/ / ! c l e a r i n p u t m a s k
latteView . effects . inputMask = Qt . rect ( 0 , 0 , - 1 , - 1 ) ;
} else {
var floatingInternalGapAcceptsInput = behaveAsDockWithMask && floatingInternalGapIsForced ;
var inputThickness ;
var subtractedScreenEdge = root . hasFloatingGapInputEventsDisabled && ! latteView . visibility . isHidden ? metrics.mask.screenEdge : 0 ;
if ( latteView . visibility . isHidden ) {
inputThickness = metrics . mask . thickness . hidden ;
} else if ( root . hasFloatingGapInputEventsDisabled ) {
inputThickness = metrics . totals . thickness ;
} else {
inputThickness = metrics . mask . screenEdge + metrics . totals . thickness ;
}
var inputGeometry = Qt . rect ( 0 , 0 , root . width , root . height ) ;
var subtractedScreenEdge = root . hasFloatingGapInputEventsDisabled && ! latteView . visibility . isHidden ? metrics.mask.screenEdge : 0 ;
/ / ! u s e v i e w . l o c a l G e o m e t r y f o r l e n g t h p r o p e r t i e s
if ( plasmoid . location === PlasmaCore . Types . TopEdge ) {
inputGeometry . x = latteView . localGeometry . x ;
inputGeometry . y = subtractedScreenEdge ;
var inputGeometry = Qt . rect ( 0 , 0 , root . width , root . height ) ;
inputGeometry . width = latteView . localGeometry . width ;
inputGeometry . height = inputThickness ;
} else if ( plasmoid . location === PlasmaCore . Types . BottomEdge ) {
inputGeometry . x = latteView . localGeometry . x ;
inputGeometry . y = root . height - inputThickness - subtractedScreenEdge ;
/ / ! u s e v i e w . l o c a l G e o m e t r y f o r l e n g t h p r o p e r t i e s
if ( plasmoid . location === PlasmaCore . Types . TopEdge ) {
inputGeometry . x = latteView . localGeometry . x ;
inputGeometry . y = subtractedScreenEdge ;
inputGeometry . width = latteView . localGeometry . width ;
inputGeometry . height = inputThickness ;
} else if ( plasmoid . location === PlasmaCore . Types . Left Edge) {
inputGeometry . x = subtractedScreenEdge ;
inputGeometry . y = latteView. localGeometry . y ;
inputGeometry . width = latteView . localGeometry . width ;
inputGeometry . height = inputThickness ;
} else if ( plasmoid . location === PlasmaCore . Types . Bottom Edge) {
inputGeometry . x = latteView. localGeometry . x ;
inputGeometry . y = root. height - inputThickness - subtractedScreenEdge ;
inputGeometry . width = inputThickness ;
inputGeometry . height = latteView. localGeometry . height ;
} else if ( plasmoid . location === PlasmaCore . Types . Righ tEdge) {
inputGeometry . x = root . width - inputThickness - subtractedScreenEdge ;
inputGeometry . y = latteView . localGeometry . y ;
inputGeometry . width = latteView. localGeometry . width ;
inputGeometry . height = inputThickness ;
} else if ( plasmoid . location === PlasmaCore . Types . Lef tEdge) {
inputGeometry . x = subtractedScreenEdge ;
inputGeometry . y = latteView . localGeometry . y ;
inputGeometry . width = inputThickness ;
inputGeometry . height = latteView . localGeometry . height ;
}
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 ;
/ / s e t t h e b o u n d a r i e s f o r l a t t e V i e w l o c a l g e o m e t r y
/ / q B o u n d = q M a x ( m i n , q M i n ( v a l u e , m a x ) ) .
inputGeometry . width = inputThickness ;
inputGeometry . height = latteView . localGeometry . height ;
}
inputGeometry . x = Math . max ( 0 , Math . min ( inputGeometry . x , latteView . width ) ) ;
inputGeometry . y = Math . max ( 0 , Math . min ( inputGeometry . y , latteView . height ) ) ;
inputGeometry . width = Math . min ( inputGeometry . width , latteView . width ) ;
inputGeometry . height = Math . min ( inputGeometry . height , latteView . height ) ;
/ / s e t t h e b o u n d a r i e s f o r l a t t e V i e w l o c a l g e o m e t r y
/ / q B o u n d = q M a x ( m i n , q M i n ( v a l u e , m a x ) ) .
if ( latteView . visibility . isSidebar && latteView . visibility . isHidden ) {
/ / ! t h i s w a y w e m a k e s u r e t h a n n o i n p u t i s a c c e p t e d a n y w h e r e
inputGeometry = Qt . rect ( - 1 , - 1 , 1 , 1 ) ;
}
inputGeometry . x = Math . max ( 0 , Math . min ( inputGeometry . x , latteView . width ) ) ;
inputGeometry . y = Math . max ( 0 , Math . min ( inputGeometry . y , latteView . height ) ) ;
inputGeometry . width = Math . min ( inputGeometry . width , latteView . width ) ;
inputGeometry . height = Math . min ( inputGeometry . height , latteView . height ) ;
latteView . effects . inputMask = inputGeometry ;
if ( latteView . visibility . isSidebar && latteView . visibility . isHidden ) {
/ / ! t h i s w a y w e m a k e s u r e t h a n n o i n p u t i s a c c e p t e d a n y w h e r e
inputGeometry = Qt . rect ( - 1 , - 1 , 1 , 1 ) ;
}
latteView . effects . inputMask = inputGeometry ;
}
}
@ -458,6 +467,7 @@ Item{
}
latteView . visibility . slideOutFinished ( ) ;
manager . updateInputGeometry ( ) ;
}
function init ( ) {
@ -491,6 +501,7 @@ Item{
onStarted: {
latteView . visibility . show ( ) ;
manager . updateInputGeometry ( ) ;
if ( debug . maskEnabled ) {
console . log ( "showing animation started..." ) ;