--- rxvt-unicode/doc/rxvt.1.pod 2005/02/17 15:07:48 1.59 +++ rxvt-unicode/doc/rxvt.1.pod 2005/02/19 01:07:57 1.61 @@ -395,12 +395,11 @@ Here is a short Gtk2-perl snippet that illustrates how this option can be used (a longer example is in F): - my $rxvt = new Gtk2::DrawingArea; - $...->add ($rxvt); # important to add it somewhere first - $rxvt->realize; # now it can be realized - my $xid = $rxvt->window->get_xid; - - system "@@RXVT_NAME@@ -embed $xid &"; + my $rxvt = new Gtk2::Socket; + $rxvt->signal_connect_after (realize => sub { + my $xid = $_[0]->window->get_xid; + system "@@RXVT_NAME@@ -embed $xid &"; + }); =item B<-pty-fd> I @@ -421,8 +420,8 @@ my $pty = new IO::Pty; fcntl $pty, F_SETFD, 0; # clear close-on-exec - system "@@RXVT_NAME@@ -pty-fd " . (fileno $pty) . "&"; + close $pty; # now communicate with rxvt my $slave = $pty->slave;