GNOME Bugzilla – Bug 652609
clipboard: fix incremental sending from the clipboard manager
Last modified: 2011-09-17 03:37:54 UTC
Right now, if the data in the clipboard is bigger than the allowed X selection size, it's never sent back to the requesting window. Attached patch fixes it.
Created attachment 189950 [details] [review] 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.
Review of attachment 189950 [details] [review]: ::: plugins/clipboard/gsd-clipboard-manager.c @@ +395,3 @@ + False, + PropertyChangeMask, + NULL); A little worrisome that you stuff rdata->requestor into this cb, when rdata gets freed 3 lines down. But maybe thats alright ?
(In reply to comment #2) > A little worrisome that you stuff rdata->requestor into this cb, when rdata > gets freed 3 lines down. > But maybe thats alright ? All the cb does, when passed False, is display = gdk_display_get_default (); gdkwin = gdk_x11_window_lookup_for_display (display, window); if (gdkwin == NULL) return; gdk_window_remove_filter (gdkwin, (GdkFilterFunc)clipboard_manager_event_filter, manager); g_object_unref (gdkwin); So I believe it's fine (the refcount on gdkwin has been increased before, when adding the filter); there's no direct access to rdata or rdata->window after the cb has run.
yeah, seems fine then.
I don't have the foggiest about this. If Matthias is happy with it, I'm happy with it. Owen is the last person to have reviewed the clipboard code, so he might be able to help you out there.
Review of attachment 189950 [details] [review]: I'm fine with it.
Ok, thanks. Pushed to master. Attachment 189950 [details] pushed as f6c9e9d - clipboard: fix incremental sending from the clipboard manager
*** Bug 577291 has been marked as a duplicate of this bug. ***