perlgtk embed window

Discussion in 'Perl' started by JiggaHertz, Feb 1, 2005.

  1. JiggaHertz

    JiggaHertz Guest

    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 );
     
    JiggaHertz, Feb 1, 2005
    #1
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. AllYou!
    Replies:
    2
    Views:
    656
    =?ISO-8859-1?Q?G=E9rard_Talbot?=
    Apr 10, 2007
  2. Martin
    Replies:
    1
    Views:
    1,112
    Cowboy \(Gregory A. Beamer\)
    Feb 19, 2009
  3. jtayamai

    Embed MFC C++ Window in JPanel?

    jtayamai, Sep 3, 2009, in forum: Java
    Replies:
    4
    Views:
    1,245
    jtayamai
    Sep 8, 2009
  4. ib
    Replies:
    2
    Views:
    167
  5. JiggaHertz

    perlgtk embed window

    JiggaHertz, Feb 3, 2005, in forum: Perl Misc
    Replies:
    1
    Views:
    168
    JiggaHertz
    Feb 3, 2005
Loading...

Share This Page