3

Here is my test code (running on Ubuntu 14.04):

try:
    from gi.repository import Gtk,Gdk,GObject
except ImportError:
    import gtk as Gtk
    import gtk.gdk as Gdk
    import gobject as GObject

def deiconify( widget ):
    print 'deiconifying the window'
    widget.deiconify()
    return True

win = Gtk.Window()
win.show_all()
#win.iconify()
GObject.timeout_add( 2000, deiconify, win)
Gtk.main()

I just want to deiconify (redisplay) the window after I click the minimize button, but it doesn't work using the codes here. But if I uncomment this line #win.iconify() instead of clicking the minimize button, it will redisplay the window (after that, it still can not deiconify the window if I click the minimize button). Did I miss calling some other functions here? Any help will be appreciated.

zhujs
  • 543
  • 2
  • 12

1 Answers1

1

I have the same issue with deiconify. Then I found another function which work as expected.

def deiconify( widget ):
    print 'deiconifying the window'
    widget.present()
    return True
Jose Ricardo Bustos M.
  • 8,016
  • 6
  • 40
  • 62
D Nguyen
  • 129
  • 2
  • 4