Changeset View
Changeset View
Standalone View
Standalone View
shell/desktopview.cpp
Show First 20 Lines • Show All 192 Lines • ▼ Show 20 Line(s) | 190 | { | |||
---|---|---|---|---|---|
193 | } else { | 193 | } else { | ||
194 | return ApplicationSession; | 194 | return ApplicationSession; | ||
195 | } | 195 | } | ||
196 | } | 196 | } | ||
197 | 197 | | |||
198 | bool DesktopView::event(QEvent *e) | 198 | bool DesktopView::event(QEvent *e) | ||
199 | { | 199 | { | ||
200 | if (e->type() == QEvent::PlatformSurface) { | 200 | if (e->type() == QEvent::PlatformSurface) { | ||
201 | if (auto pe = dynamic_cast<QPlatformSurfaceEvent*>(e)) { | 201 | switch (static_cast<QPlatformSurfaceEvent*>(e)->surfaceEventType()) { | ||
202 | switch (pe->surfaceEventType()) { | | |||
203 | case QPlatformSurfaceEvent::SurfaceCreated: | 202 | case QPlatformSurfaceEvent::SurfaceCreated: | ||
204 | setupWaylandIntegration(); | 203 | setupWaylandIntegration(); | ||
205 | ensureWindowType(); | 204 | ensureWindowType(); | ||
206 | break; | 205 | break; | ||
207 | case QPlatformSurfaceEvent::SurfaceAboutToBeDestroyed: | 206 | case QPlatformSurfaceEvent::SurfaceAboutToBeDestroyed: | ||
208 | delete m_shellSurface; | 207 | delete m_shellSurface; | ||
209 | m_shellSurface = nullptr; | 208 | m_shellSurface = nullptr; | ||
210 | break; | 209 | break; | ||
211 | } | 210 | } | ||
212 | } | 211 | } | ||
213 | } | | |||
214 | 212 | | |||
215 | return PlasmaQuick::ContainmentView::event(e); | 213 | return PlasmaQuick::ContainmentView::event(e); | ||
216 | } | 214 | } | ||
217 | 215 | | |||
218 | void DesktopView::keyPressEvent(QKeyEvent *e) | 216 | void DesktopView::keyPressEvent(QKeyEvent *e) | ||
219 | { | 217 | { | ||
220 | ContainmentView::keyPressEvent(e); | 218 | ContainmentView::keyPressEvent(e); | ||
221 | 219 | | |||
▲ Show 20 Lines • Show All 99 Lines • Show Last 20 Lines |