LCL-GTK3: Prevent access violation when showing hint window.

git-svn-id: trunk@63559 -
This commit is contained in:
juha 2020-07-14 18:43:54 +00:00
parent 61c53d6f41
commit 9592ee63e9

View File

@ -1476,7 +1476,7 @@ begin
//TODO: APen.setDashPattern //TODO: APen.setDashPattern
end; end;
APen.Color := lplb.lbColor; APen.Color := TColor(lplb.lbColor); // ColorToRGB() ?
APen.LogPen.lopnColor := lplb.lbColor; APen.LogPen.lopnColor := lplb.lbColor;
APen.LogPen.lopnStyle := (dwPenStyle and PS_STYLE_MASK) or (dwPenStyle and PS_JOIN_MASK) or (dwPenStyle and PS_ENDCAP_MASK); APen.LogPen.lopnStyle := (dwPenStyle and PS_STYLE_MASK) or (dwPenStyle and PS_JOIN_MASK) or (dwPenStyle and PS_ENDCAP_MASK);
APen.LogPen.lopnWidth.X := dwWidth; APen.LogPen.lopnWidth.X := dwWidth;
@ -1485,8 +1485,7 @@ begin
Result := HPen(APen); Result := HPen(APen);
end; end;
function TGtk3WidgetSet.ExtSelectClipRGN(dc: hdc; rgn: hrgn; Mode: Longint function TGtk3WidgetSet.ExtSelectClipRGN(dc: hdc; rgn: hrgn; Mode: Longint): Integer;
): Integer;
var var
GtkDC: TGtk3DeviceContext absolute DC; GtkDC: TGtk3DeviceContext absolute DC;
ARect: TGdkRectangle; ARect: TGdkRectangle;
@ -3933,10 +3932,14 @@ end;
function TGtk3WidgetSet.SetWindowRgn(hWnd: HWND; hRgn: HRGN; bRedraw: Boolean function TGtk3WidgetSet.SetWindowRgn(hWnd: HWND; hRgn: HRGN; bRedraw: Boolean
): longint; ): longint;
var
PCR: Pcairo_region_t;
begin begin
gtk_widget_shape_combine_region ( if hRgn = 0 then
TGtk3Widget(hWnd).Widget, PCR := nil
TGtk3Region(hRgn).Handle); else
PCR := TGtk3Region(hRgn).Handle;
gtk_widget_shape_combine_region(TGtk3Widget(hWnd).Widget, PCR);
if bRedraw then if bRedraw then
TGtk3Widget(hWnd).Widget^.realize; TGtk3Widget(hWnd).Widget^.realize;
Result:=1; Result:=1;