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. Advertisements

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. Andrew Bewley via DotNetMonster.com

    window to window communication (window.opener)

    Andrew Bewley via DotNetMonster.com, Feb 3, 2005, in forum: ASP .Net
    Replies:
    0
    Views:
    1,280
    Andrew Bewley via DotNetMonster.com
    Feb 3, 2005
  2. AllYou!
    Replies:
    2
    Views:
    727
    =?ISO-8859-1?Q?G=E9rard_Talbot?=
    Apr 10, 2007
  3. Martin
    Replies:
    1
    Views:
    1,207
    Cowboy \(Gregory A. Beamer\)
    Feb 19, 2009
  4. jtayamai

    Embed MFC C++ Window in JPanel?

    jtayamai, Sep 3, 2009, in forum: Java
    Replies:
    4
    Views:
    1,550
    jtayamai
    Sep 8, 2009
  5. ib
    Replies:
    2
    Views:
    234
  6. gsb
    Replies:
    3
    Views:
    300
  7. JiggaHertz

    perlgtk embed window

    JiggaHertz, Feb 3, 2005, in forum: Perl Misc
    Replies:
    1
    Views:
    264
    JiggaHertz
    Feb 3, 2005
  8. Kene Meniru

    Embed vtk window in a QTabWidget

    Kene Meniru, Mar 28, 2013, in forum: Python
    Replies:
    0
    Views:
    204
    Kene Meniru
    Mar 28, 2013
Loading...