View Issue Details

IDProjectCategoryView StatusLast Update
0035467LazarusLCLpublic2019-04-30 18:04
ReporterSerge AnvarovAssigned ToJuha Manninen 
PrioritynormalSeverityminorReproducibilityalways
Status resolvedResolutionfixed 
PlatformWindowsOSWindowsOS Version
Product VersionProduct Build 
Target VersionFixed in Version 
Summary0035467: TWindowProcHelper.CalcClipRgn micropatch
DescriptionReplace the uninitialized variable with the required variable. Delete the unused variable. Solve "ToDo".
TagsNo tags attached.
Fixed in Revisionr61086
LazTarget-
Widgetset
Attached Files
  • TWindowProcHelper.CalcClipRgn.diff (846 bytes)
    Index: lcl/interfaces/win32/win32callback.inc
    ===================================================================
    --- lcl/interfaces/win32/win32callback.inc	(revision 61078)
    +++ lcl/interfaces/win32/win32callback.inc	(working copy)
    @@ -493,7 +493,7 @@
     
     procedure TWindowProcHelper.CalcClipRgn(PaintRegion: HRGN);
     var
    -  nSize, BytesCount: DWORD;
    +  nSize: DWORD;
       RgnData: PRgnData;
       WindowOrg: Windows.POINT;
       XFRM: TXFORM;
    @@ -527,8 +527,7 @@
         XFRM.eM11:=-1; XFRM.eM12:=0;
         XFRM.eM21:=0;  XFRM.eM22:=1;
     
    -    // ToDo: BytesCount is not initialized.
    -    MirroredPaintRgn := ExtCreateRegion(@XFRM, BytesCount, RgnData^);
    +    MirroredPaintRgn := ExtCreateRegion(@XFRM, nSize, RgnData^);
         Windows.SelectClipRgn(CurDoubleBuffer.DC, MirroredPaintRgn);
         Windows.DeleteObject(MirroredPaintRgn);
         Freemem(RgnData);
    

Activities

Serge Anvarov

2019-04-29 09:13

reporter  

TWindowProcHelper.CalcClipRgn.diff (846 bytes)
Index: lcl/interfaces/win32/win32callback.inc
===================================================================
--- lcl/interfaces/win32/win32callback.inc	(revision 61078)
+++ lcl/interfaces/win32/win32callback.inc	(working copy)
@@ -493,7 +493,7 @@
 
 procedure TWindowProcHelper.CalcClipRgn(PaintRegion: HRGN);
 var
-  nSize, BytesCount: DWORD;
+  nSize: DWORD;
   RgnData: PRgnData;
   WindowOrg: Windows.POINT;
   XFRM: TXFORM;
@@ -527,8 +527,7 @@
     XFRM.eM11:=-1; XFRM.eM12:=0;
     XFRM.eM21:=0;  XFRM.eM22:=1;
 
-    // ToDo: BytesCount is not initialized.
-    MirroredPaintRgn := ExtCreateRegion(@XFRM, BytesCount, RgnData^);
+    MirroredPaintRgn := ExtCreateRegion(@XFRM, nSize, RgnData^);
     Windows.SelectClipRgn(CurDoubleBuffer.DC, MirroredPaintRgn);
     Windows.DeleteObject(MirroredPaintRgn);
     Freemem(RgnData);

Juha Manninen

2019-04-30 18:04

developer   ~0115927

Applied, thanks.

Issue History

Date Modified Username Field Change
2019-04-29 09:13 Serge Anvarov New Issue
2019-04-29 09:13 Serge Anvarov File Added: TWindowProcHelper.CalcClipRgn.diff
2019-04-30 14:44 Juha Manninen Assigned To => Juha Manninen
2019-04-30 14:44 Juha Manninen Status new => assigned
2019-04-30 18:04 Juha Manninen Status assigned => resolved
2019-04-30 18:04 Juha Manninen Resolution open => fixed
2019-04-30 18:04 Juha Manninen Fixed in Revision => r61086
2019-04-30 18:04 Juha Manninen LazTarget => -
2019-04-30 18:04 Juha Manninen Note Added: 0115927