Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #!/usr/bin/python3
- from gi.repository import Gtk, Gdk, GdkX11
- WIDTH = 800
- HEIGHT = 600
- drawing_area = Gtk.DrawingArea()
- drawing_area.set_size_request(WIDTH, HEIGHT)
- drawing_area.add_events(Gdk.EventMask.ALL_EVENTS_MASK)
- drawing_area.set_double_buffered(False)
- drawing_area.realize()
- window = Gtk.Window()
- window.add(drawing_area)
- window.connect('delete-event', Gtk.main_quit)
- window.show_all()
- # Just for sure
- drawing_area.get_window().resize(WIDTH, HEIGHT)
- xid = drawing_area.get_window().get_xid()
- print('export LIBSOY_X11_WID=%s' % xid)
- Gtk.main()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement