Commit 44b2a3f8 authored by xinbo wang's avatar xinbo wang 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 ...@@ -140,13 +140,13 @@ void MagicLampEffect::paintWindow(EffectWindow* w, int mask, QRegion region, Win
QRect panelScreen = effects->clientArea(ScreenArea, panel); QRect panelScreen = effects->clientArea(ScreenArea, panel);
if (panel->width() >= panel->height()) { if (panel->width() >= panel->height()) {
// horizontal panel // horizontal panel
if (panel->y() == panelScreen.y()) if (panel->y() <= panelScreen.height()/2)
position = Top; position = Top;
else else
position = Bottom; position = Bottom;
} else { } else {
// vertical panel // vertical panel
if (panel->x() == panelScreen.x()) if (panel->x() <= panelScreen.width()/2)
position = Left; position = Left;
else else
position = Right; 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