perlgtk embed window

J

JiggaHertz

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 );
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Staff online

Members online

Forum statistics

Threads
473,764
Messages
2,569,564
Members
45,040
Latest member
papereejit

Latest Threads

Top