https://bugs.winehq.org/show_bug.cgi?id=41949
Ken Thomases ken@codeweavers.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Assignee|wine-bugs@winehq.org |ken@codeweavers.com Status|UNCONFIRMED |NEW Ever confirmed|0 |1
--- Comment #5 from Ken Thomases ken@codeweavers.com --- Created attachment 56345 --> https://bugs.winehq.org/attachment.cgi?id=56345 Patch to update clipboard when process activates
Please give this patch a try.
The issue is that, when IDA Pro gets focus back (after having switched to another app), it checks which window owns the clipboard. If it's still its own window, it then opens the clipboard, empties it, and re-sets its own data to it.
In the current code, user32 only asks the Mac driver to update the clipboard when the clipboard is opened. It doesn't ask when the app checks the ownership. So, at the time of the ownership test, the Mac driver hasn't noticed that another app has grabbed the clipboard, and IDA Pro is told that it still owns the clipboard. That changes once it opens the clipboard — at that point the Mac driver does notice that another app has grabbed the clipboard — but by that point it's too late. IDA Pro has already set out to overwrite the clipboard.
This patch makes the Mac driver check if another app has grabbed the clipboard when it's made the active app. That happens before IDA Pro is told. So, IDA Pro sees that it's no longer the owner of the clipboard and doesn't overwrite it.