[PATCH] macdrv: Don't update clipboard if its content didn't change

Piotr Caban piotr at codeweavers.com
Thu May 25 17:26:28 CDT 2017


> Unfortunately, -[NSPasteboard changeCount] isn't incremented for all changes to the pasteboard.  For example, if the owner replaces the data for an existing type, it doesn't change.  I'd have to check again, but I think it doesn't even change if the owner adds a new data type.  I think it only changes when the pasteboard is cleared and rebuilt by -clearContents or -declareTypes:owner:.

I wonder if applications that are doing it are using pasteboard API correctly. The documentation says that “application can determine whether the current data in the pasteboard is the same as the data it last received” by checking changeCount value. I’ve also checked the code of open source clipboard manager that works on Mac (Flycut) - as far as I can see it's looking for clipboard changes this way.


More information about the wine-devel mailing list