Skip to content

Commit d04a401

Browse files
committed
Using the same method of systray icon for taskbar and active_window icons drawing
1 parent e3e3fdd commit d04a401

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

src/core/utils/win32/app_icons.py

+5
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
import win32api
88
import ctypes
99
import ctypes.wintypes
10+
from core.utils.systray.utils import hicon_to_image
1011
from core.utils.win32.app_uwp import get_package
1112
import xml.etree.ElementTree as ET
1213
from pathlib import Path
@@ -35,6 +36,10 @@ def get_window_icon(hwnd, smooth_level = 0):
3536
hicon = win32gui.GetClassLong(hwnd, win32con.GCL_HICON)
3637

3738
if hicon:
39+
img = hicon_to_image(hicon)
40+
if img is not None:
41+
return img
42+
3843
hdc_handle = win32gui.GetDC(0)
3944
if not hdc_handle:
4045
raise Exception("Failed to get DC handle")

0 commit comments

Comments
 (0)