summaryrefslogtreecommitdiffstats
path: root/examples/qwidget-compositor
diff options
context:
space:
mode:
authorSamuel Rødal <samuel.rodal@nokia.com>2011-03-21 08:53:27 +0100
committerSamuel Rødal <samuel.rodal@nokia.com>2011-03-21 08:53:27 +0100
commit4e7edc664af998b3e90c792070d314cf614066a0 (patch)
tree8cff5e3a8818242781b76465d06a25085de0ecd1 /examples/qwidget-compositor
parent0c2c805747d9ea3764c0b3e1d63c9198e89f289e (diff)
Made compositor keep track of key / pointer focus surfaces.
Puts less burden on the implementation to make sure the input focus is cleared when a surface is destroyed.
Diffstat (limited to 'examples/qwidget-compositor')
-rw-r--r--examples/qwidget-compositor/main.cpp4
1 files changed, 1 insertions, 3 deletions
diff --git a/examples/qwidget-compositor/main.cpp b/examples/qwidget-compositor/main.cpp
index 004d4f885..b9d5d8fe4 100644
--- a/examples/qwidget-compositor/main.cpp
+++ b/examples/qwidget-compositor/main.cpp
@@ -76,10 +76,8 @@ public:
private slots:
void surfaceDestroyed(QObject *object) {
- WaylandSurface *surface = qobject_cast<WaylandSurface *>(object);
+ WaylandSurface *surface = static_cast<WaylandSurface *>(object);
m_surfaces.removeAll(surface);
- if (m_surfaces.isEmpty())
- setInputFocus(0);
update();
}