We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent e3e3fdd commit d04a401Copy full SHA for d04a401
src/core/utils/win32/app_icons.py
@@ -7,6 +7,7 @@
7
import win32api
8
import ctypes
9
import ctypes.wintypes
10
+from core.utils.systray.utils import hicon_to_image
11
from core.utils.win32.app_uwp import get_package
12
import xml.etree.ElementTree as ET
13
from pathlib import Path
@@ -35,6 +36,10 @@ def get_window_icon(hwnd, smooth_level = 0):
35
36
hicon = win32gui.GetClassLong(hwnd, win32con.GCL_HICON)
37
38
if hicon:
39
+ img = hicon_to_image(hicon)
40
+ if img is not None:
41
+ return img
42
+
43
hdc_handle = win32gui.GetDC(0)
44
if not hdc_handle:
45
raise Exception("Failed to get DC handle")
0 commit comments