From 74f5ea02c859544054ea290b28856ec94d438be3 Mon Sep 17 00:00:00 2001 From: salvadordf Date: Fri, 16 Dec 2022 12:41:12 +0100 Subject: [PATCH] Fixed TCefDisplayRef.ScreenRectToPixels result Fixed TCefDisplayRef.ScreenRectFromPixels result --- source/uCEFDisplay.pas | 8 ++++---- update_CEF4Delphi.json | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/source/uCEFDisplay.pas b/source/uCEFDisplay.pas index 37d9c231..2349c8e9 100644 --- a/source/uCEFDisplay.pas +++ b/source/uCEFDisplay.pas @@ -240,8 +240,8 @@ begin TempPixelsRc := cef_display_convert_screen_rect_to_pixels(@TempScreenRc); Result.Left := TempPixelsRc.x; Result.Top := TempPixelsRc.y; - Result.Right := TempPixelsRc.Width - 1; - Result.Bottom := TempPixelsRc.Height - 1; + Result.Right := TempPixelsRc.x + TempPixelsRc.Width - 1; + Result.Bottom := TempPixelsRc.y + TempPixelsRc.Height - 1; end else Result := aScreenRect; @@ -258,8 +258,8 @@ begin TempScreenRc := cef_display_convert_screen_rect_from_pixels(@TempPixelsRc); Result.Left := TempScreenRc.x; Result.Top := TempScreenRc.y; - Result.Right := TempScreenRc.Width - 1; - Result.Bottom := TempScreenRc.Height - 1; + Result.Right := TempScreenRc.x + TempScreenRc.Width - 1; + Result.Bottom := TempScreenRc.y + TempScreenRc.Height - 1; end else Result := aPixelsRect; diff --git a/update_CEF4Delphi.json b/update_CEF4Delphi.json index 44cc309a..9b95f1a1 100644 --- a/update_CEF4Delphi.json +++ b/update_CEF4Delphi.json @@ -2,7 +2,7 @@ "UpdateLazPackages" : [ { "ForceNotify" : true, - "InternalVersion" : 450, + "InternalVersion" : 451, "Name" : "cef4delphi_lazarus.lpk", "Version" : "108.4.13" }