@ -34,6 +34,8 @@
namespace Latte {
namespace WindowSystem {
# define MAXPLASMAPANELTHICKNESS 96
AbstractWindowInterface : : AbstractWindowInterface ( QObject * parent )
: QObject ( parent )
{
@ -127,15 +129,28 @@ bool AbstractWindowInterface::isPlasmaPanel(const QRect &wGeometry) const
return false ;
}
bool isTouchingHorizontalEdge { false } ;
bool isTouchingVerticalEdge { false } ;
for ( const auto scr : qGuiApp - > screens ( ) ) {
if ( scr - > geometry ( ) . contains ( wGeometry . center ( ) ) ) {
if ( wGeometry . y ( ) = = scr - > geometry ( ) . y ( )
| | wGeometry . bottom ( ) = = scr - > geometry ( ) . bottom ( )
| | wGeometry . left ( ) = = scr - > geometry ( ) . left ( )
| | wGeometry . right ( ) = = scr - > geometry ( ) . right ( ) ) {
return true ;
if ( wGeometry . y ( ) = = scr - > geometry ( ) . y ( ) | | wGeometry . bottom ( ) = = scr - > geometry ( ) . bottom ( ) ) {
isTouchingHorizontalEdge = true ;
}
if ( wGeometry . left ( ) = = scr - > geometry ( ) . left ( ) | | wGeometry . right ( ) = = scr - > geometry ( ) . right ( ) ) {
isTouchingVerticalEdge = true ;
}
if ( isTouchingVerticalEdge & & isTouchingHorizontalEdge ) {
break ;
}
}
}
if ( ( isTouchingHorizontalEdge & & wGeometry . height ( ) < MAXPLASMAPANELTHICKNESS )
| | ( isTouchingVerticalEdge & & wGeometry . width ( ) < MAXPLASMAPANELTHICKNESS ) ) {
return true ;
}
return false ;