From b39c00f3441c8adc7f826a3191c655d371e7b946 Mon Sep 17 00:00:00 2001 From: Rui Matos Date: Fri, 22 May 2015 15:37:31 +0200 Subject: [PATCH] window: Fix meta_window_set_alive() not working if first ping fails window->is_alive isn't initialized explicitly so it defaults to FALSE meaning that if the first ping fails we'd short circuit and not show the delete dialog as we should. We could initialize the variable to TRUE but in fact we don't even need the variable at all since our dialog management is enough to manage all the state we need, i.e. we're only interested in knowing whether we're already displaying a delete dialog. This does change our behavior here since previously we wouldn't display the dialog again if the next ping failed after the dialog is dismissed but this was arguably a bug too since in that case there wouldn't be a way to kill the window after waiting for a while and the window kept being unresponsive. https://bugzilla.gnome.org/show_bug.cgi?id=749711 --- src/core/delete.c | 7 +------ src/core/window-private.h | 1 - 2 files changed, 1 insertion(+), 7 deletions(-) diff --git a/src/core/delete.c b/src/core/delete.c index 040305638..d72f8f052 100644 --- a/src/core/delete.c +++ b/src/core/delete.c @@ -160,12 +160,7 @@ void meta_window_set_alive (MetaWindow *window, gboolean is_alive) { - if (window->is_alive == is_alive) - return; - - window->is_alive = is_alive; - - if (window->is_alive) + if (is_alive) kill_delete_dialog (window); else show_delete_dialog (window, CurrentTime); diff --git a/src/core/window-private.h b/src/core/window-private.h index 136635c0d..9487dbf64 100644 --- a/src/core/window-private.h +++ b/src/core/window-private.h @@ -434,7 +434,6 @@ struct _MetaWindow /* Managed by delete.c */ int dialog_pid; - guint is_alive : 1; /* maintained by group.c */ MetaGroup *group;