ultralight-ux / AppCore

Cross-platform app runtime module for Ultralight
https://ultralig.ht
GNU Lesser General Public License v2.1
82 stars 24 forks source link

Lock clipboard before emptying it #12

Open Northn opened 2 years ago

Northn commented 2 years ago

According to remark about EmptyDialog(), an application must open the clipboard before emptying it by using the OpenClipboard function. If the application specifies a NULL window handle when opening the clipboard, EmptyClipboard succeeds but sets the clipboard owner to NULL. This can cause SetClipboardData to fail. https://docs.microsoft.com/en-us/windows/win32/api/winuser/nf-winuser-emptyclipboard