mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-08-13 09:29:10 +02:00
VTV: Backport fix for ExcludeClipRect bug under cocoa.
git-svn-id: trunk@60136 -
This commit is contained in:
parent
35ae732201
commit
2ba67fb8ef
@ -96,7 +96,7 @@ const
|
|||||||
{$define Gtk}
|
{$define Gtk}
|
||||||
{$endif}
|
{$endif}
|
||||||
|
|
||||||
{$if defined(Gtk)}
|
{$if defined(Gtk) or defined(LCLCocoa)}
|
||||||
{$define ManualClipNeeded}
|
{$define ManualClipNeeded}
|
||||||
{$endif}
|
{$endif}
|
||||||
|
|
||||||
@ -4745,6 +4745,29 @@ begin
|
|||||||
InternalClipboardFormats.Add(Description, TreeClass, Priority, FormatEtc);
|
InternalClipboardFormats.Add(Description, TreeClass, Priority, FormatEtc);
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
//----------------- compatibility functions ----------------------------------------------------------------------------
|
||||||
|
|
||||||
|
// ExcludeClipRect is buggy in Cocoa
|
||||||
|
// https://github.com/blikblum/VirtualTreeView-Lazarus/issues/8
|
||||||
|
// https://bugs.freepascal.org/view.php?id=34196
|
||||||
|
|
||||||
|
{$ifdef LCLCocoa}
|
||||||
|
function ExcludeClipRect(dc: hdc; Left, Top, Right, Bottom : Integer) : Integer;
|
||||||
|
begin
|
||||||
|
Result := 0;
|
||||||
|
end;
|
||||||
|
{$endif}
|
||||||
|
|
||||||
|
// LCLIntf.BitBlt is not compatible with windows.BitBlt
|
||||||
|
// The former takes into account the alpha channel while the later not
|
||||||
|
|
||||||
|
{$if not defined(USE_DELPHICOMPAT) and defined(LCLWin)}
|
||||||
|
function BitBlt(DestDC: HDC; X, Y, Width, Height: Integer; SrcDC: HDC; XSrc, YSrc: Integer; Rop: DWORD): Boolean;
|
||||||
|
begin
|
||||||
|
Result := windows.BitBlt(DestDC, X, Y, Width, Height, SrcDC, XSrc, YSrc, Rop);
|
||||||
|
end;
|
||||||
|
{$endif}
|
||||||
|
|
||||||
//----------------- utility functions ----------------------------------------------------------------------------------
|
//----------------- utility functions ----------------------------------------------------------------------------------
|
||||||
|
|
||||||
procedure ShowError(const Msg: String; HelpContext: Integer);
|
procedure ShowError(const Msg: String; HelpContext: Integer);
|
||||||
|
Loading…
Reference in New Issue
Block a user