Changeset View
Changeset View
Standalone View
Standalone View
effects/magiclamp/magiclamp.cpp
Show First 20 Lines • Show All 128 Lines • ▼ Show 20 Line(s) | 124 | } else { | |||
---|---|---|---|---|---|
129 | else if (pt.y() > geo.bottom()) | 129 | else if (pt.y() > geo.bottom()) | ||
130 | position = Bottom; | 130 | position = Bottom; | ||
131 | else if (pt.x() > geo.right()) | 131 | else if (pt.x() > geo.right()) | ||
132 | position = Right; | 132 | position = Right; | ||
133 | } | 133 | } | ||
134 | icon = QRect(pt, QSize(0, 0)); | 134 | icon = QRect(pt, QSize(0, 0)); | ||
135 | } else { | 135 | } else { | ||
136 | // Assumption: there is a panel containing the icon position | 136 | // Assumption: there is a panel containing the icon position | ||
137 | EffectWindow* panel = NULL; | 137 | EffectWindow* panel = nullptr; | ||
138 | foreach (EffectWindow * window, effects->stackingOrder()) { | 138 | foreach (EffectWindow * window, effects->stackingOrder()) { | ||
139 | if (!window->isDock()) | 139 | if (!window->isDock()) | ||
140 | continue; | 140 | continue; | ||
141 | // we have to use intersects as there seems to be a Plasma bug | 141 | // we have to use intersects as there seems to be a Plasma bug | ||
142 | // the published icon geometry might be bigger than the panel | 142 | // the published icon geometry might be bigger than the panel | ||
143 | if (window->geometry().intersects(icon)) { | 143 | if (window->geometry().intersects(icon)) { | ||
144 | panel = window; | 144 | panel = window; | ||
145 | break; | 145 | break; | ||
▲ Show 20 Lines • Show All 229 Lines • Show Last 20 Lines |