[vino/gnome-3-14] Handle closed signal properly on notification prompt



commit 5f8383f41cbcd7e9563ef67cf4a68e57f3f45b9c
Author: Ondrej Holy <oholy redhat com>
Date:   Wed Feb 18 09:03:51 2015 +0100

    Handle closed signal properly on notification prompt
    
    When the notification is closed (e.g. by close button), closed signal
    is emitted. This signal isn't handled currently and therefore
    vino-server is still waiting for response and block new notification
    from client (also doesn't close the connection). Handle close signal
    properly to fix this bug.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=744692

 server/vino-prompt.c |   10 ++++++++++
 1 files changed, 10 insertions(+), 0 deletions(-)
---
diff --git a/server/vino-prompt.c b/server/vino-prompt.c
index 85358e1..f99b8e9 100644
--- a/server/vino-prompt.c
+++ b/server/vino-prompt.c
@@ -255,6 +255,13 @@ vino_prompt_handle_response (NotifyNotification *notification,
   vino_prompt_process_pending_clients (prompt);
 }
 
+static void
+vino_prompt_handle_close (NotifyNotification *notification,
+                         gpointer            user_data)
+{
+  vino_prompt_handle_response (notification, "close", user_data);
+}
+
 static gboolean
 vino_prompt_setup_dialog (VinoPrompt *prompt)
 {
@@ -298,6 +305,9 @@ vino_prompt_display (VinoPrompt   *prompt,
                                  vino_prompt_handle_response,
                                  prompt,
                                  NULL);
+  g_signal_connect (prompt->priv->notification, "closed",
+                   G_CALLBACK (vino_prompt_handle_close), prompt);
+
 
   g_free (host_label);
 


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]