diff options
author | Laszlo Agocs <laszlo.p.agocs@nokia.com> | 2012-02-03 10:30:40 +0200 |
---|---|---|
committer | Jørgen Lind <jorgen.lind@nokia.com> | 2012-02-03 09:53:25 +0100 |
commit | a39e37100a86aa64a6463c36d5a6444df01ec169 (patch) | |
tree | 6ae2fb5057fd93b50123b7be6858828bc096a708 /src/compositor/wayland_wrapper | |
parent | 7c02d300ce5274f17b13d8da857217af3343fda7 (diff) |
Set pointer focus to null when surface is destroyed.
We must do something otherwise the next inputDevice->mouseFocus() call
will dereference an already deleted instance.
Change-Id: I3ac92a37715f63c6dc43191968a8da51befbccde
Sanity-Review: Qt Sanity Bot <qt_sanity_bot@ovi.com>
Reviewed-by: Jørgen Lind <jorgen.lind@nokia.com>
Diffstat (limited to 'src/compositor/wayland_wrapper')
-rw-r--r-- | src/compositor/wayland_wrapper/wlcompositor.cpp | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/compositor/wayland_wrapper/wlcompositor.cpp b/src/compositor/wayland_wrapper/wlcompositor.cpp index 830cb2965..b28f8f8bd 100644 --- a/src/compositor/wayland_wrapper/wlcompositor.cpp +++ b/src/compositor/wayland_wrapper/wlcompositor.cpp @@ -248,6 +248,8 @@ void Compositor::processWaylandEvents() void Compositor::surfaceDestroyed(Surface *surface) { + if (defaultInputDevice()->mouseFocus() == surface) + defaultInputDevice()->setMouseFocus(0, QPoint(), QPoint()); m_surfaces.removeOne(surface); m_dirty_surfaces.remove(surface); if (m_directRenderSurface == surface) |