]> Pileus Git - ~andy/gtk/commitdiff
quartz: fix crash in the recent clipboard "fix", and really fix it
authorMichael Natterer <mitch@lanedo.com>
Fri, 7 Dec 2012 11:19:52 +0000 (12:19 +0100)
committerMichael Natterer <mitch@gimp.org>
Fri, 7 Dec 2012 11:30:15 +0000 (12:30 +0100)
We must not release the GtkClipboardOwner in pasteboardChangedOwner
becaue we don't own a reference to ourselves (NSPasteboard does).
Instead, release the owner right after setting it, transferring
ownership to NSPasteboard

Also, fix repeated setting of the same owner by keeping the
owner around in GtkCLipboard, and re-use it if "user_data"
doesn't change. To avoid clipboard_unset()ting our own contents
in the process, add an ugly "setting_same_owner" boolean to
GtkClipboardOwner, set it during re-setting the same owner,
and avoid calling clipboard_unset() from pasteboardChangedOwner
if it's TRUE.
(cherry picked from commit 4a8df7a33c298d22bf78b947d0e861fc03ec70e1)


No differences found