diff options
author | Kevin Walzer <kw@codebykevin.com> | 2021-08-18 21:31:11 (GMT) |
---|---|---|
committer | Kevin Walzer <kw@codebykevin.com> | 2021-08-18 21:31:11 (GMT) |
commit | e3f8844a9440b1653ddbe6fb7b3580cc2e7723ed (patch) | |
tree | 8caa3ae8dc629021393f38610dacf7286f0839ca /win | |
parent | d41ddfc4f00415971a4d1b7c6e61df2a2a2ab4ce (diff) | |
download | tk-e3f8844a9440b1653ddbe6fb7b3580cc2e7723ed.zip tk-e3f8844a9440b1653ddbe6fb7b3580cc2e7723ed.tar.gz tk-e3f8844a9440b1653ddbe6fb7b3580cc2e7723ed.tar.bz2 |
Windows builds and appears correct, but icon overlay does not display; more review needed
Diffstat (limited to 'win')
-rw-r--r-- | win/tkWinWm.c | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/win/tkWinWm.c b/win/tkWinWm.c index a33659a..dd01ceb 100644 --- a/win/tkWinWm.c +++ b/win/tkWinWm.c @@ -3851,15 +3851,17 @@ WmIconbadgeCmd( Tk_PhotoImageBlock block; int width, height; HICON overlayicon; - (void) tkwin; + (void) winPtr; int badgenumber; char * badgestring = NULL; char photoname[4096]; LPCWSTR string; - /* Establish a COM interface to the ITaskBarList3 API. */ + /* Establish a COM interface to the ITaskbarList3 API. */ ITaskbarList3 *ptbl; HRESULT hr; + Tk_Window badgewindow; + Window win; hr = CoCreateInstance(&CLSID_TaskbarList, NULL, CLSCTX_INPROC_SERVER, &IID_ITaskbarList3, &ptbl); if (hr == S_OK) { @@ -3875,7 +3877,9 @@ WmIconbadgeCmd( return TCL_ERROR; } - hwnd = Tk_GetHWND(winPtr -> window); + badgewindow = Tk_NameToWindow(interp, Tcl_GetString(objv[2]), tkwin); + win = Tk_WindowId(badgewindow); + hwnd = Tk_GetHWND(win); badgestring = Tcl_GetString(objv[3]); string = L"Alert"; @@ -3901,7 +3905,7 @@ WmIconbadgeCmd( overlayicon = CreateIcoFromPhoto(width, height, block); if (overlayicon == NULL) { - Tcl_SetResult(interp, "Failed to create icon photo", TCL_VOLATILE); + Tcl_SetResult(interp, "Failed to create overlay icon", TCL_VOLATILE); return TCL_ERROR; } |