cocoa: invalidating designer overlay view together with content view. Due to forceful use of layers in macOS10.14. Adding a memo (or any scrolling control) would introduce extra layers causing visual issues. In this case overlay (as always staying on top - and receiving its own layer) must be explicitly refreshed, if window content if affected. #35165

git-svn-id: trunk@61319 -
This commit is contained in:
dmitry 2019-06-04 14:17:18 +00:00
parent c2480c6563
commit fa41c05360

View File

@ -222,6 +222,8 @@ type
// NSDraggingDestinationCategory
function draggingEntered(sender: NSDraggingInfoProtocol): NSDragOperation; override;
function performDragOperation(sender: NSDraggingInfoProtocol): LCLObjCBoolean; override;
procedure setNeedsDisplay_(aflag: boolean); override;
procedure setNeedsDisplayInRect(arect: NSRect); override;
end;
function NSEventRawKeyChar(ev: NSEvent): System.WideChar;
@ -1090,6 +1092,18 @@ begin
Result := True;
end;
procedure TCocoaWindowContent.setNeedsDisplay_(aflag: boolean);
begin
inherited setNeedsDisplay;
if Assigned(overlay) then overlay.setNeedsDisplay_(aflag);
end;
procedure TCocoaWindowContent.setNeedsDisplayInRect(arect: NSRect);
begin
inherited setNeedsDisplayInRect(arect);
if Assigned(overlay) then overlay.setNeedsDisplayInRect(arect);
end;
function TCocoaWindow.makeFirstResponder(r: NSResponder): LCLObjCBoolean;
var
cbnew: ICommonCallback;