unit Unit1;
{$mode objfpc}{$H+}
interface
uses
Classes, SysUtils, FileUtil, Forms, Controls, Graphics, Dialogs,
gdk2, gtk2, gdk2x;
type
TForm1 = class(TForm)
procedure FormClick(Sender: TObject);
end;
var
Form1: TForm1;
implementation
{$R *.lfm}
procedure TForm1.FormClick(Sender: TObject);
var
hst1: PGtkWidget;
hst2: PGdkWindow;
winx: PGdkWindow;
begin
hst1 := PGtkWidget(WindowHandle);
hst2 := hst1^.window;
// l- launch a console
// - use xwininfo to find the right "Window id" for the console...
// - then replace the hex nbr and run this app and click.
winx := gdk_window_foreign_new($4c00005);
if GDK_IS_WINDOW((hst2)) and GDK_IS_WINDOW((winx)) then
begin
gdk_window_reparent(winx, hst2, 0, 0);
end;
end;
end.