I have a Python script that creates a Tkinter window running in Ubuntu. In the script I have an if/else statement that changes the background color based on a variable. That all works. What I cannot figure out how to do is when it changes the background color, I also want it to unminimize the window if it is minimized to the tray at the time.
Thanks
Frank

I have a Python script that creates a Tkinter window running in Ubuntu. In the script I have an if/else statement that changes the background color based on a variable. That all works. What I cannot figure out how to do is when it changes the background color, I also want it to unminimize the window if it is minimized to the tray at the time.
Thanks
Frank

I believe that this would be a function of the operating system. If this is true, how do I get the script to send the command to os? Can someone direct me to the proper place to find this information. Is this even possible in Ubuntu?
Thanks

I would approach this by looking documentation for way to generate restore window event in Tkinter. The program would behave the same as user had clicked the program unminimized (restored). Should be portable also.

I would approach this by looking documentation for way to generate restore window event in Tkinter. The program would behave the same as user had clicked the program unminimized (restored). Should be portable also.

Thanks. After looking briefly I think this will get me going in the right direction.
Frank

Actually this is more a function of the desktop, each of which has wrappers to perform this function. KDocker for KDE is only one that comes to mind right now but there are sure to be more, perhaps one or two that are not desktop specific.

Edited 6 Years Ago by woooee: n/a

I would approach this by looking documentation for way to generate restore window event in Tkinter. The program would behave the same as user had clicked the program unminimized (restored). Should be portable also.

Thanks. I finally found the answer. Turned out to be a real simple one line of code

root.wm_state('normal')

.
But learned a whole lot more searching for the answer. :)

Comments
Nice to share your find
This question has already been answered. Start a new discussion instead.