Gtk2: revert TGtk2WidgetSet.FinishCreateHandle() since it's used by opengl implementation. issue #21569

git-svn-id: trunk@36347 -
This commit is contained in:
zeljko 2012-03-26 17:48:39 +00:00
parent dbf6d2c8f6
commit 861c143774
2 changed files with 26 additions and 0 deletions

View File

@ -258,6 +258,9 @@ type
function DCGetPixel(CanvasHandle: HDC; X, Y: integer): TGraphicsColor; override;
procedure DCSetPixel(CanvasHandle: HDC; X, Y: integer; AColor: TGraphicsColor); override;
procedure DCRedraw(CanvasHandle: HDC); override;
{used by 3rd party components eg. opengl implementation}
procedure FinishCreateHandle(const AWinControl: TWinControl;
Widget: PGtkWidget; const AParams: TCreateParams);
private
{$IFDEF HASX}

View File

@ -4509,6 +4509,29 @@ begin
LastRight:=EmptyLastMouseClick;
end;
procedure TGtk2WidgetSet.FinishCreateHandle(const AWinControl: TWinControl;
Widget: PGtkWidget; const AParams: TCreateParams);
var
WidgetInfo: PWidgetInfo;
Allocation: TGTKAllocation;
begin
WidgetInfo := GetWidgetInfo(Widget,true); // Widget info already created in CreateAPIWidget
WidgetInfo^.LCLObject := AWinControl;
WidgetInfo^.Style := AParams.Style;
WidgetInfo^.ExStyle := AParams.ExStyle;
WidgetInfo^.WndProc := PtrUInt(AParams.WindowClass.lpfnWndProc);
// set allocation
Allocation.X := AParams.X;
Allocation.Y := AParams.Y;
Allocation.Width := AParams.Width;
Allocation.Height := AParams.Height;
gtk_widget_size_allocate(Widget, @Allocation);
Set_RC_Name(AWinControl, Widget);
TGtk2WSWinControl.SetCallbacks(PGtkObject(Widget), AWinControl);
end;
procedure TGtk2WidgetSet.DestroyConnectedWidget(Widget: PGtkWidget;
CheckIfDestroying: boolean);
var