shell: Don't ping the grab surface
authorAnder Conselvan de Oliveira <ander.conselvan.de.oliveira@intel.com>
Mon, 16 Jul 2012 11:15:48 +0000 (14:15 +0300)
committerKristian Høgsberg <krh@bitplanet.net>
Mon, 16 Jul 2012 17:35:25 +0000 (13:35 -0400)
If the grab surface happens to be unresponsive, the busy cursor grab
will be started and that will cause the grab surface to receive focus,
which in turn leads to it being pingged again. Break the cycle by not
sending pings to it. If the shell is unresponsive it won't be able to
set the busy cursor anyway.

src/shell.c

index 5932020..40cef14 100644 (file)
@@ -918,6 +918,9 @@ ping_handler(struct weston_surface *surface, uint32_t serial)
        if (!shsurf->resource.client)
                return;
 
+       if (shsurf->surface == shsurf->shell->grab_surface)
+               return;
+
        if (!shsurf->ping_timer) {
                shsurf->ping_timer = malloc(sizeof *shsurf->ping_timer);
                if (!shsurf->ping_timer)