mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-08-14 12:59:12 +02:00
Gtk3: create DC from window if possible.
This commit is contained in:
parent
4f51192d03
commit
f59489a32a
@ -2031,7 +2031,10 @@ begin
|
||||
Result := Widget.Context;
|
||||
if (Result = 0) then
|
||||
begin
|
||||
Result := HDC(TGtk3DeviceContext.Create(Widget.GetContainerWidget, False));
|
||||
if Gtk3IsGdkWindow(Widget.GetWindow) then
|
||||
Result := HDC(TGtk3DeviceContext.Create(Widget.GetWindow, True))
|
||||
else
|
||||
Result := HDC(TGtk3DeviceContext.Create(Widget.GetContainerWidget, False));
|
||||
TGtk3DeviceContext(Result).CanRelease := True;
|
||||
end;
|
||||
end else
|
||||
|
Loading…
Reference in New Issue
Block a user