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.