On 28/12/2010 00:42, s.la...@free.fr wrote:
> hi
> 
> i m trying to use my software in windows...
> 
> normally i embed a video in a Drawingarea with his xid on linux or handle on
> windows But on windows this id is the same than the root window..
> 
> the drawingarea is not listed as a toplevel window neither... so the video is
> printed in all the gui...
> 
> on linux with xid i have 2 differents id for the main window and the 
> drawingArea
> normally
> 
> any idears ?

I don't know what version of GTK+ you're using on both platforms so
it's a shot in the dark, but are you using GTK+ 2.18 or newer on
Windows? If so, you'll probably want to read
http://library.gnome.org/devel/gtk/2.18/gtk-migrating-ClientSideWindows.html.

Also, I've attached a very minimal "does nothing useful" example that
shows how to get a native window for a drawingarea. Be careful though,
you can only call ensure_native() when the widget has been realized...

hth,
Dieter
import gtk

def test(button, drawingarea):
    window = drawingarea.get_window()
    print 'has_native:', window.has_native()
    window.ensure_native()
    print 'has_native:', window.has_native()
    
if __name__ == '__main__':
    window = gtk.Window()
    window.connect('delete-event', gtk.main_quit)
    vbox = gtk.VBox()
    window.add(vbox)
    drawingarea = gtk.DrawingArea()
    vbox.pack_start(drawingarea)
    button = gtk.Button('Test')
    button.connect('clicked', test, drawingarea)
    vbox.pack_start(button)
    window.show_all()
    gtk.main()
_______________________________________________
pygtk mailing list   pygtk@daa.com.au
http://www.daa.com.au/mailman/listinfo/pygtk
Read the PyGTK FAQ: http://faq.pygtk.org/

Reply via email to