Compare commits
1 Commits
main
...
bc5169b1f6
Author | SHA1 | Date | |
---|---|---|---|
bc5169b1f6 |
@@ -596,11 +596,16 @@ notify_window_visible_cb (GtkWidget *window,
|
||||
CallsManager *manager = calls_manager_get_default ();
|
||||
|
||||
g_return_if_fail (CALLS_IS_APPLICATION (application));
|
||||
g_return_if_fail (CALLS_IS_CALL_WINDOW (window));
|
||||
|
||||
gboolean calls_visible = gtk_widget_is_visible (application->call_window);
|
||||
gboolean main_visible = gtk_widget_is_visible (application->main_window);
|
||||
/* The UI is being closed, hang up active calls */
|
||||
if (!gtk_widget_is_visible (window))
|
||||
if (!calls_visible)
|
||||
calls_manager_hang_up_all_calls (manager);
|
||||
|
||||
/* No windows (of interest) are open -> exit */
|
||||
if (!main_visible && !calls_visible)
|
||||
app_shutdown (application);
|
||||
}
|
||||
|
||||
|
||||
@@ -666,6 +671,12 @@ start_proper (CallsApplication *self)
|
||||
G_CALLBACK (notify_window_visible_cb),
|
||||
self,
|
||||
G_CONNECT_AFTER);
|
||||
|
||||
g_signal_connect_object (self->main_window,
|
||||
"notify::visible",
|
||||
G_CALLBACK (notify_window_visible_cb),
|
||||
self,
|
||||
G_CONNECT_AFTER);
|
||||
}
|
||||
|
||||
|
||||
|
Reference in New Issue
Block a user