[ShellApp] Ignore removal of windows we're not interested in

Previously shell_app_remove_window assumed that it was being
passed a window in its list; rather than having callers check
whether a window is interesting and only if so removing it
from the app, just ignore removal of windows we aren't interested
in, like how we ignore addition of windows we already have.

https://bugzilla.gnome.org/show_bug.cgi?id=598502
This commit is contained in:
Colin Walters 2009-10-23 13:15:13 -04:00
parent 10991d363d
commit d9ff1f2ec1

View File

@ -324,6 +324,9 @@ void
_shell_app_remove_window (ShellApp *app, _shell_app_remove_window (ShellApp *app,
MetaWindow *window) MetaWindow *window)
{ {
if (!g_slist_find (app->windows, window))
return;
g_signal_handlers_disconnect_by_func (window, G_CALLBACK(shell_app_on_unmanaged), app); g_signal_handlers_disconnect_by_func (window, G_CALLBACK(shell_app_on_unmanaged), app);
g_signal_handlers_disconnect_by_func (window, G_CALLBACK(shell_app_on_user_time_changed), app); g_signal_handlers_disconnect_by_func (window, G_CALLBACK(shell_app_on_user_time_changed), app);
g_object_unref (window); g_object_unref (window);