I'm trying to reparent an external window into a perlgtk script. I
create an xterm and the result I get from xwininfo is.
xwininfo: Window id: 0x1c0000e
Running the following script does nothing to the external window, the
same if I create a gtk window. I've tried this using fluxbox and kde,
same results. Any help as to what I'm doing wrong would be greatly
appreciated.
Thanks,
JH
#!/usr/bin/perl -w
$rxid = 0x1c0000e;
use Gtk;
use X11::Protocol;
init Gtk;
$window = new Gtk::Window("toplevel");
$button = new Gtk::Button("button");
$window->signal_connect( "delete_event", \&CloseAppWindow );
$button->signal_connect( "clicked", \&CloseAppWindow );
$button->show();
$window->border_width( 15 );
$window->add( $button );
$window->show();
$xid = $window->window->XWINDOW;
print "xid = $xid\n";
$x = new X11::Protocol;
@t = $x->ReparentWindow($xid, $rxid, 0, 0);
foreach $j (@t) {
print "t = $t[$l++]\n";
}
print "rxid = $rxid\n";
$window->add_embedded_xid($rxid);
main Gtk;
exit( 0 );