mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-08-09 14:35:56 +02:00
customdrawnws: Updates the X11 backend to paint child wincontrols
git-svn-id: trunk@33748 -
This commit is contained in:
parent
42f8712413
commit
d3a2cf706c
@ -20,7 +20,7 @@ type
|
||||
public
|
||||
Window: X.TWindow;
|
||||
LCLControl: TWinControl;
|
||||
CDWinControl: TCDWinControl;
|
||||
Children: TFPList; // of TCDWinControl;
|
||||
// Used and valid only during event processing
|
||||
XEvent: PXEvent;
|
||||
// X11 extra objects
|
||||
|
@ -7,14 +7,17 @@ var
|
||||
lWindowInfo: TX11WindowInfo;
|
||||
begin
|
||||
lWindowInfo := TX11WindowInfo(AForm.Handle);
|
||||
lWindowInfo.CDWinControl := ACDWinControl;
|
||||
if lWindowInfo.Children = nil then lWindowInfo.Children := TFPList.Create;
|
||||
lWindowInfo.Children.Add(ACDWinControl);
|
||||
end;
|
||||
|
||||
class function TCDWSCustomForm.BackendGetCDWinControlList(const AForm: TCustomForm): TFPList;
|
||||
var
|
||||
lWindowInfo: TX11WindowInfo;
|
||||
begin
|
||||
{ lwin := TCocoaWindow(AForm.Handle);
|
||||
if lwin.Children = nil then lwin.Children := TFPList.Create;
|
||||
Result := lwin.Children;}
|
||||
lWindowInfo := TX11WindowInfo(AForm.Handle);
|
||||
if lWindowInfo.Children = nil then lWindowInfo.Children := TFPList.Create;
|
||||
Result := lWindowInfo.Children;
|
||||
end;
|
||||
|
||||
class procedure TCDWSCustomForm.UpdateMotifWMHints(const AWinControl: TWinControl; CanMaximize: Boolean);
|
||||
@ -641,6 +644,10 @@ begin
|
||||
DebugLn('[TCDWSCustomForm.EvPaint] OnPaint event ended');
|
||||
{$ENDIF}
|
||||
|
||||
// Now paint all child win controls
|
||||
RenderChildWinControls(AWindowInfo.Image, AWindowInfo.Canvas,
|
||||
BackendGetCDWinControlList(TCustomForm(AWinControl)));
|
||||
|
||||
// Now render it into the control
|
||||
AWindowInfo.Image.GetRawImage(lRawImage);
|
||||
DrawRawImageToGC(lRawImage, AWindowInfo, 0, 0, lWidth, lHeight);
|
||||
|
Loading…
Reference in New Issue
Block a user