[gnome-settings-daemon] clipboard: add a missing free_contents
- From: Rui Matos <rtcm src gnome org>
 
- To: commits-list gnome org
 
- Cc: 
 
- Subject: [gnome-settings-daemon] clipboard: add a missing free_contents
 
- Date: Tue, 21 Nov 2017 18:14:49 +0000 (UTC)
 
commit 776bb25f46fc2b85089ba10be275971bd41bba5a
Author: Роман Донченко <dpb corrigendum ru>
Date:   Sun Nov 12 00:29:28 2017 +0300
    clipboard: add a missing free_contents
    
    Currently, when gsd-clipboard receives a response to a conversion
    request for the MULTIPLE target that indicates failure (i.e. property
    == None), it doesn't free the contents list. This leads it to believe
    it owns the CLIPBOARD selection, when it actually doesn't. Because of
    this, it returns an error for all subsequent SAVE_TARGETS requests,
    effectively becoming inoperative as a clipboard manager.
    
    So fix that. Because of the way the code is structured, free_contents
    will also be called when a request for the TARGETS target fails, but
    at that point the contents list should be empty, so it'll be harmless.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=790344
 plugins/clipboard/gsd-clipboard-manager.c |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)
---
diff --git a/plugins/clipboard/gsd-clipboard-manager.c b/plugins/clipboard/gsd-clipboard-manager.c
index 88be6c9..abe2683 100644
--- a/plugins/clipboard/gsd-clipboard-manager.c
+++ b/plugins/clipboard/gsd-clipboard-manager.c
@@ -796,6 +796,8 @@ clipboard_manager_process_event (GsdClipboardManager *manager,
                         }
                         else if (xev->xselection.property == None) {
                                 send_selection_notify (manager, False);
+
+                                free_contents (manager);
                                 clipboard_manager_watch_cb (manager,
                                                             manager->priv->requestor,
                                                             False,
[
Date Prev][
Date Next]   [
Thread Prev][
Thread Next]   
[
Thread Index]
[
Date Index]
[
Author Index]