diff options
author | Cosimo Cecchi <cosimoc@gnome.org> | 2011-06-14 19:19:06 -0400 |
---|---|---|
committer | Cosimo Cecchi <cosimoc@gnome.org> | 2011-06-20 09:25:42 -0400 |
commit | f6c9e9d098184ef6f1859a3221d6d0d51ed988e1 (patch) | |
tree | d07682fcd92aa4ebf6d5422acb859387485763a5 /plugins/clipboard | |
parent | 9647e7bcf1f0134de804c1ac807a2ee5fc89bd62 (diff) | |
download | gnome-settings-daemon-f6c9e9d098184ef6f1859a3221d6d0d51ed988e1.tar.gz |
clipboard: fix incremental sending from the clipboard manager
When the data to send from the clipboard is bigger than the maximum
allowed X selection size, we set the property value to XA_INCR, to
signal that the data should be sent in incremental chunks.
Unfortunately this never worked, because the manager didn't listen to
the property changes on the requestor window, so it didn't know when to
start sending data.
https://bugzilla.gnome.org/show_bug.cgi?id=652609
Diffstat (limited to 'plugins/clipboard')
-rw-r--r-- | plugins/clipboard/gsd-clipboard-manager.c | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/plugins/clipboard/gsd-clipboard-manager.c b/plugins/clipboard/gsd-clipboard-manager.c index 73d49e45..0ae94822 100644 --- a/plugins/clipboard/gsd-clipboard-manager.c +++ b/plugins/clipboard/gsd-clipboard-manager.c @@ -390,6 +390,12 @@ send_incrementally (GsdClipboardManager *manager, data, items); if (length == 0) { + clipboard_manager_watch_cb (manager, + rdata->requestor, + False, + PropertyChangeMask, + NULL); + manager->priv->conversions = list_remove (manager->priv->conversions, rdata); conversion_free (rdata); } @@ -545,6 +551,13 @@ convert_clipboard_target (IncrConversion *rdata, gdk_error_trap_push (); XGetWindowAttributes (manager->priv->display, rdata->requestor, &atts); + + clipboard_manager_watch_cb (manager, + rdata->requestor, + True, + PropertyChangeMask, + NULL); + XSelectInput (manager->priv->display, rdata->requestor, atts.your_event_mask | PropertyChangeMask); |