You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Every time get_monitors() is called, the GDI Objects count for the python process on win32 increases.
Once the 10,000 GDI Object hard limit is reached, the desktop becomes lagged, and GUI things break (my script is managing an application's full-screen status, and the result is a corrupted / not-fully-repainted window).
A small test, if you add the GDI Objects column to taskmgr, you can see the count continually increase.
while True:
for m in get_monitors():
print(str(m))
The text was updated successfully, but these errors were encountered:
A shame this is still open. I had the same problem. Thousands of GDI Handles after some hours. Basically 1 Handle per get_monitors() ...
Well after replacing the "screeninfo\enumerators\windows.py" with the one from https://github.com/rr-/screeninfo/pull/32 I can comfirm this fixes the issue.
Every time get_monitors() is called, the GDI Objects count for the python process on win32 increases.
Once the 10,000 GDI Object hard limit is reached, the desktop becomes lagged, and GUI things break (my script is managing an application's full-screen status, and the result is a corrupted / not-fully-repainted window).
A small test, if you add the GDI Objects column to taskmgr, you can see the count continually increase.
The text was updated successfully, but these errors were encountered: