diff options
author | Роман Донченко <dpb@corrigendum.ru> | 2017-11-12 00:29:28 +0300 |
---|---|---|
committer | Rui Matos <tiagomatos@gmail.com> | 2017-11-21 19:05:22 +0100 |
commit | 776bb25f46fc2b85089ba10be275971bd41bba5a (patch) | |
tree | 72d47fec2f559219e6f919682a4e42b150b599a2 | |
parent | e9a89d6f8ba165ef841d899d739770a76c59e669 (diff) | |
download | gnome-settings-daemon-776bb25f46fc2b85089ba10be275971bd41bba5a.tar.gz |
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
-rw-r--r-- | 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 88be6c99..abe26830 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, |