Commit 2a4fb12f authored by xinbo wang's avatar xinbo wang Committed by David Edmundson

fix: magiclamp effect wrong direction.

if the dock is on the top,and the dock is not close together with screen edge.
for example,the dock is 10 pixels taller then sceen edge,the "position" will be "Bottom".
Autually,the dock is on the top of screen.

(cherry picked from commit 44b2a3f8)
parent 922dc005
......@@ -140,13 +140,13 @@ void MagicLampEffect::paintWindow(EffectWindow* w, int mask, QRegion region, Win
QRect panelScreen = effects->clientArea(ScreenArea, panel);
if (panel->width() >= panel->height()) {
// horizontal panel
if (panel->y() == panelScreen.y())
if (panel->y() <= panelScreen.height()/2)
position = Top;
position = Bottom;
} else {
// vertical panel
if (panel->x() == panelScreen.x())
if (panel->x() <= panelScreen.width()/2)
position = Left;
position = Right;
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment