• Michael Natterer's avatar
    quartz: fix crash in the recent clipboard "fix", and really fix it · 9d31a04d
    Michael Natterer authored
    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 4a8df7a3)
gtkclipboard-quartz.c 26.2 KB