compositor: Drop core ping_handler callout
This was always a little iffy. At least it could have been a signal,
but we now have focus signal, so lets just use that. We lose
the ability to detect unresponsive clients at key event time, but we
could add that back by adding a key_signal.
diff --git a/desktop-shell/shell.c b/desktop-shell/shell.c
index 8c8e4eb..a47bbe7 100644
--- a/desktop-shell/shell.c
+++ b/desktop-shell/shell.c
@@ -1876,6 +1876,10 @@
if (shsurf->ping_timer)
return;
+ if (shsurf->unresponsive) {
+ ping_timeout_handler(shsurf);
+ return;
+ }
shsurf->ping_timer = malloc(sizeof *shsurf->ping_timer);
if (!shsurf->ping_timer)
@@ -1975,21 +1979,14 @@
struct weston_pointer *pointer = data;
struct weston_view *view = pointer->focus;
struct weston_compositor *compositor;
- struct shell_surface *shsurf;
uint32_t serial;
if (!view)
return;
compositor = view->surface->compositor;
- shsurf = get_shell_surface(view->surface);
-
- if (shsurf && shsurf->unresponsive) {
- set_busy_cursor(shsurf, pointer);
- } else {
- serial = wl_display_next_serial(compositor->wl_display);
- ping_handler(view->surface, serial);
- }
+ serial = wl_display_next_serial(compositor->wl_display);
+ ping_handler(view->surface, serial);
}
static void
@@ -5909,7 +5906,6 @@
shell->wake_listener.notify = wake_handler;
wl_signal_add(&ec->wake_signal, &shell->wake_listener);
- ec->ping_handler = ping_handler;
ec->shell_interface.shell = shell;
ec->shell_interface.create_shell_surface = create_shell_surface;
ec->shell_interface.get_primary_view = get_primary_view;