mirror of
https://github.com/brl/mutter.git
synced 2024-11-09 23:46:33 -05:00
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
This commit is contained in:
parent
83ce71c3bf
commit
b39c00f344
@ -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);
|
||||
|
@ -434,7 +434,6 @@ struct _MetaWindow
|
||||
|
||||
/* Managed by delete.c */
|
||||
int dialog_pid;
|
||||
guint is_alive : 1;
|
||||
|
||||
/* maintained by group.c */
|
||||
MetaGroup *group;
|
||||
|
Loading…
Reference in New Issue
Block a user