Changeset View
Changeset View
Standalone View
Standalone View
ksmserver/shutdowndlg.cpp
Show First 20 Lines • Show All 218 Lines • ▼ Show 20 Line(s) | 218 | // clearMask(); | |||
---|---|---|---|---|---|
219 | } else { | 219 | } else { | ||
220 | // setMask(m_view->mask()); | 220 | // setMask(m_view->mask()); | ||
221 | } | 221 | } | ||
222 | } | 222 | } | ||
223 | 223 | | |||
224 | bool KSMShutdownDlg::event(QEvent *e) | 224 | bool KSMShutdownDlg::event(QEvent *e) | ||
225 | { | 225 | { | ||
226 | if (e->type() == QEvent::PlatformSurface) { | 226 | if (e->type() == QEvent::PlatformSurface) { | ||
227 | if (auto pe = dynamic_cast<QPlatformSurfaceEvent*>(e)) { | 227 | switch (static_cast<QPlatformSurfaceEvent*>(e)->surfaceEventType()) { | ||
228 | switch (pe->surfaceEventType()) { | | |||
229 | case QPlatformSurfaceEvent::SurfaceCreated: | 228 | case QPlatformSurfaceEvent::SurfaceCreated: | ||
230 | setupWaylandIntegration(); | 229 | setupWaylandIntegration(); | ||
231 | KWindowEffects::enableBlurBehind(winId(), true); | 230 | KWindowEffects::enableBlurBehind(winId(), true); | ||
232 | break; | 231 | break; | ||
233 | case QPlatformSurfaceEvent::SurfaceAboutToBeDestroyed: | 232 | case QPlatformSurfaceEvent::SurfaceAboutToBeDestroyed: | ||
234 | delete m_shellSurface; | 233 | delete m_shellSurface; | ||
235 | m_shellSurface = nullptr; | 234 | m_shellSurface = nullptr; | ||
236 | break; | 235 | break; | ||
237 | } | 236 | } | ||
238 | } | 237 | } | ||
239 | } | | |||
240 | return QQuickView::event(e); | 238 | return QQuickView::event(e); | ||
241 | } | 239 | } | ||
242 | 240 | | |||
243 | void KSMShutdownDlg::setupWaylandIntegration() | 241 | void KSMShutdownDlg::setupWaylandIntegration() | ||
244 | { | 242 | { | ||
245 | if (m_shellSurface) { | 243 | if (m_shellSurface) { | ||
246 | // already setup | 244 | // already setup | ||
247 | return; | 245 | return; | ||
▲ Show 20 Lines • Show All 80 Lines • Show Last 20 Lines |