mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-04-08 14:18:17 +02:00
cocoa: update InitClipboard to initialize the internal structure for monitoring pasteboards
git-svn-id: trunk@58689 -
This commit is contained in:
parent
8727f02d27
commit
c9171d1916
@ -150,10 +150,20 @@ begin
|
||||
end;
|
||||
|
||||
procedure TCocoaWidgetSet.InitClipboard;
|
||||
var
|
||||
t : TClipboardType;
|
||||
begin
|
||||
PrimarySelection := NSPasteboard.pasteboardWithUniqueName();
|
||||
SecondarySelection := NSPasteboard.pasteboardWithUniqueName();
|
||||
ClipboardFormats := TFPObjectList.Create(True);
|
||||
|
||||
Pasteboards[ctPrimarySelection].pasteboard := PrimarySelection;
|
||||
Pasteboards[ctSecondarySelection].pasteboard := SecondarySelection;
|
||||
Pasteboards[ctClipboard].pasteboard := NSPasteboard.generalPasteboard;
|
||||
|
||||
for t := Low(TClipboardType) to High(TClipboardType) do
|
||||
if Assigned(Pasteboards[t].pasteboard) then
|
||||
Pasteboards[t].changeCount := Pasteboards[t].pasteboard.changeCount;
|
||||
end;
|
||||
|
||||
procedure TCocoaWidgetSet.FreeClipboard;
|
||||
|
Loading…
Reference in New Issue
Block a user