How do I get the size of a pygtk window?

后端 未结 2 1507
独厮守ぢ
独厮守ぢ 2021-01-06 17:27

I\'m trying to use gtk.window.get_size(), but it always just returns the default width and height. The documentation says

The get_size() method return

2条回答
  •  孤街浪徒
    2021-01-06 18:30

    Try running:

    while gtk.events_pending():
        gtk.main_iteration_do(False)
    

    right before calling window.get_size()

提交回复
热议问题