Is there a way to programmatically reverse the action of window.minimize() in pyglet? I came across an answer in a forum from 15 years ago that suggests adding the following code to /pyglet/window/win32/init.py:
def restore(self):
_user32.ShowWindow(self._hwnd, SW_RESTORE)
I have not tested this solution yet as it would require me to modify the package source for each installation. I'm wondering if there is a more up-to-date method for restoring a window in pyglet. The forum post I referenced seems to be the only source discussing this issue, also the official documentation does not mention a similar method at all.
I was able to solve my problem using
win32gui. Here's the code snippet that worked for me:To restore the window specified by
window._hwnd, I used theShowWindowfunction. Thewin32con.SW_RESTOREconstant (which equals to 9) just indicates the action of restoring.