From: Juan Zhao <[email protected]>

When we're launching applications, we meet weston random unresponsive issue.
Regarding the backtrace, it is caused by set_busy_cursor->shell_grab_start->
 wl_pointer_set_focus->wl_signal_emit->handle_pointer_focus->set_busy_cursor.
The busy cursor will be set by ping_timeout_handler, no need to set it again
 in handler_pointer_focus when the client is unresponsive. Or, the compositor
 will be lead to endless loop isse.

backtrace:
' #101672 wl_pointer_set_focus (pointer=0x8215a0c, surface=0x824c518,
 sx=0, sy=0) at wayland-server.c:822
' #101673 0xb694e038 in shell_grab_start (grab=0x824b370,
 interface=<value optimized out>, shsurf=0x824c738,
 pointer=0x8215a0c,
 cursor=DESKTOP_SHELL_CURSOR_BUSY) at shell.c:272
' #101674 0xb694e098 in set_busy_cursor (shsurf=0x824c738,
 pointer=0x8215a0c) at shell.c:865
' #101675 0xb7fb3b31 in wl_signal_emit (pointer=0x8215a0c,
 surface=0x824c518, sx=0, sy=0) at wayland-server.h:166
' #101676 wl_pointer_set_focus (pointer=0x8215a0c, surface=0x824c518,
 sx=0, sy=0) at wayland-server.c:822
' #101677 0xb694e038 in shell_grab_start (grab=0x824b370,
 interface=<value optimized out>, shsurf=0x824c738,
 pointer=0x8215a0c,
 cursor=DESKTOP_SHELL_CURSOR_BUSY) at shell.c:272
' #101678 0xb694e098 in set_busy_cursor (shsurf=0x824c738,
 pointer=0x8215a0c) at shell.c:865
' #101679 0xb7fb3b31 in wl_signal_emit (pointer=0x8215a0c,
 surface=0x824c518, sx=0, sy=0) at wayland-server.h:166
' #101680 wl_pointer_set_focus (pointer=0x8215a0c, surface=0x824c518,
 sx=0, sy=0) at wayland-server.c:822
' #101681 0xb694e038 in shell_grab_start (grab=0x824b370,
 interface=<value optimized out>, shsurf=0x824c738,
 pointer=0x8215a0c,
 cursor=DESKTOP_SHELL_CURSOR_BUSY) at shell.c:272
' #101682 0xb694e098 in set_busy_cursor (shsurf=0x824c738,
 pointer=0x8215a0c) at shell.c:865
' #101683 0xb7fb3b31 in wl_signal_emit (pointer=0x8215a0c,
 surface=0x824c518, sx=0, sy=0) at wayland-server.h:166
' #101684 wl_pointer_set_focus (pointer=0x8215a0c, surface=0x824c518,
 sx=0, sy=0) at wayland-server.c:822
' #101685 0xb694e038 in shell_grab_start (grab=0x824b370,
 interface=<value optimized out>, shsurf=0x824c738,
 pointer=0x8215a0c,
 cursor=DESKTOP_SHELL_CURSOR_BUSY) at shell.c:272
' #101686 0xb694e098 in set_busy_cursor (shsurf=0x824c738,
 pointer=0x8215a0c) at shell.c:865
' #101687 0xb7fb3b31 in wl_signal_emit (pointer=0x8215a0c,
 surface=0x824c518, sx=0, sy=0) at wayland-server.h:166
' #101688 wl_pointer_set_focus (pointer=0x8215a0c, surface=0x824c518,
 sx=0, sy=0) at wayland-server.c:822
' #101689 0xb694e038 in shell_grab_start (grab=0x824b370,
 interface=<value optimized out>, shsurf=0x824c738,
 pointer=0x8215a0c,
 cursor=DESKTOP_SHELL_CURSOR_BUSY) at shell.c:272
' #101690 0xb694e098 in set_busy_cursor (shsurf=0x824c738,
 pointer=0x8215a0c) at shell.c:865

Signed-off-by: Juan Zhao <[email protected]>
---
 src/shell.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/src/shell.c b/src/shell.c
index d0492d9..83452fe 100644
--- a/src/shell.c
+++ b/src/shell.c
@@ -954,9 +954,7 @@ handle_pointer_focus(struct wl_listener *listener, void 
*data)
        compositor = surface->compositor;
        shsurf = get_shell_surface(surface);
 
-       if (shsurf && shsurf->unresponsive) {
-               set_busy_cursor(shsurf, pointer);
-       } else {
+       if (!(shsurf && shsurf->unresponsive)) {
                serial = wl_display_next_serial(compositor->wl_display);
                ping_handler(surface, serial);
        }
-- 
1.7.11

_______________________________________________
wayland-devel mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/wayland-devel

Reply via email to