core: Change behavior of "application is alive" checks
Change some things in these "app is alive" checks: - The dialog timeout is separated from the ping timeout, in order to show it again at a constant rate after dismissing, despite in flight pings. It still shows immediately after the first failed ping. - As we want to tap further into is-alive logic, MetaWindow now made it a property, that other places in code can fetch and subscribe. - Motion events trigger ping (as long as there was none other in flight for the same window), and are counted between ping and pong, in order to preemptively declare the window as not alive before there is trouble with event queues being overflown. This results in a separate logic between "the application does not respond" and "we are showing the close dialog" so that the former may get triggered independently. Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/2122>
This commit is contained in:

committed by
Marge Bot

parent
29141afd0f
commit
26676a829e
@ -202,7 +202,7 @@ meta_display_handle_event (MetaDisplay *display,
|
||||
const ClutterEvent *event)
|
||||
{
|
||||
MetaBackend *backend = meta_get_backend ();
|
||||
MetaWindow *window;
|
||||
MetaWindow *window = NULL;
|
||||
gboolean bypass_clutter = FALSE;
|
||||
G_GNUC_UNUSED gboolean bypass_wayland = FALSE;
|
||||
MetaGestureTracker *gesture_tracker;
|
||||
@ -475,6 +475,10 @@ meta_display_handle_event (MetaDisplay *display,
|
||||
#ifdef HAVE_WAYLAND
|
||||
if (compositor && !bypass_wayland)
|
||||
{
|
||||
if (window && event->type == CLUTTER_MOTION &&
|
||||
event->any.time != CLUTTER_CURRENT_TIME)
|
||||
meta_window_check_alive_on_event (window, event->any.time);
|
||||
|
||||
if (meta_wayland_compositor_handle_event (compositor, event))
|
||||
bypass_clutter = TRUE;
|
||||
}
|
||||
|
Reference in New Issue
Block a user