Commit 44b2a3f8 authored by wang xinbo's avatar wang xinbo Committed by David Edmundson
Browse files

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.
parent fe6c2960
......@@ -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;
Supports Markdown
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