Changeset View
Changeset View
Standalone View
Standalone View
krunner/view.cpp
Show First 20 Lines • Show All 216 Lines • ▼ Show 20 Line(s) | |||||
217 | bool View::event(QEvent *event) | 217 | bool View::event(QEvent *event) | ||
218 | { | 218 | { | ||
219 | // QXcbWindow overwrites the state in its show event. There are plans | 219 | // QXcbWindow overwrites the state in its show event. There are plans | ||
220 | // to fix this in 5.4, but till then we must explicitly overwrite it | 220 | // to fix this in 5.4, but till then we must explicitly overwrite it | ||
221 | // each time. | 221 | // each time. | ||
222 | const bool retval = Dialog::event(event); | 222 | const bool retval = Dialog::event(event); | ||
223 | bool setState = event->type() == QEvent::Show; | 223 | bool setState = event->type() == QEvent::Show; | ||
224 | if (event->type() == QEvent::PlatformSurface) { | 224 | if (event->type() == QEvent::PlatformSurface) { | ||
225 | if (auto e = dynamic_cast<QPlatformSurfaceEvent*>(event)) { | 225 | setState = (static_cast<QPlatformSurfaceEvent*>(event)->surfaceEventType() == QPlatformSurfaceEvent::SurfaceCreated); | ||
apol: Then the if should be removed. | |||||
226 | setState = e->surfaceEventType() == QPlatformSurfaceEvent::SurfaceCreated; | | |||
227 | } | | |||
228 | } | 226 | } | ||
229 | if (setState) { | 227 | if (setState) { | ||
230 | KWindowSystem::setState(winId(), NET::SkipTaskbar | NET::SkipPager); | 228 | KWindowSystem::setState(winId(), NET::SkipTaskbar | NET::SkipPager); | ||
231 | } | 229 | } | ||
232 | 230 | | |||
233 | if (m_plasmaShell && event->type() == QEvent::Expose) { | 231 | if (m_plasmaShell && event->type() == QEvent::Expose) { | ||
234 | using namespace KWayland::Client; | 232 | using namespace KWayland::Client; | ||
235 | auto ee = static_cast<QExposeEvent*>(event); | 233 | auto ee = static_cast<QExposeEvent*>(event); | ||
▲ Show 20 Lines • Show All 213 Lines • Show Last 20 Lines |
Then the if should be removed.