mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-09-02 20:21:12 +02:00
Gtk3: fixed GetDC()
This commit is contained in:
parent
31fd0ce4f3
commit
f7215ec61b
@ -2029,8 +2029,11 @@ begin
|
||||
begin
|
||||
Widget := TGtk3Widget(hWnd);
|
||||
Result := Widget.Context;
|
||||
if Result = 0 then
|
||||
Result := HDC(Gtk3DefaultContext);
|
||||
if (Result = 0) then
|
||||
begin
|
||||
Result := HDC(TGtk3DeviceContext.Create(Widget.GetContainerWidget, False));
|
||||
TGtk3DeviceContext(Result).CanRelease := True;
|
||||
end;
|
||||
end else
|
||||
Result := HDC(Gtk3ScreenContext);
|
||||
end;
|
||||
@ -2045,14 +2048,6 @@ begin
|
||||
OriginDiff);
|
||||
end;
|
||||
|
||||
function TGtk3WidgetSet.GetDesignerDC(WindowHandle: HWND): HDC;
|
||||
begin
|
||||
{$IFDEF GTK3DEBUGNOTIMPLEMENTED}
|
||||
DebugLn('WARNING: TGtk3WidgetSet.GetDesignerDC not implemented ...');
|
||||
{$ENDIF}
|
||||
Result:=inherited GetDesignerDC(WindowHandle);
|
||||
end;
|
||||
|
||||
function TGtk3WidgetSet.GetDeviceCaps(DC: HDC; Index: Integer): Integer;
|
||||
var
|
||||
pscr: PGdkScreen;
|
||||
|
Loading…
Reference in New Issue
Block a user