View Issue Details
ID | Project | Category | View Status | Date Submitted | Last Update |
---|---|---|---|---|---|
0018484 | Lazarus | Widgetset | public | 2011-01-13 05:48 | 2020-12-01 12:11 |
Reporter | cobines | Assigned To | |||
Priority | normal | Severity | minor | Reproducibility | always |
Status | acknowledged | Resolution | open | ||
Platform | Win32 | OS | Windows XP | ||
Product Version | 0.9.31 (SVN) | ||||
Summary | 0018484: Taskbar button icon sometimes disappears | ||||
Description | When a form uses a specific icon set via Icon property it sets the icon for the window with WM_SETICON as well as for the window class with SetClassLong(.., GCL_HICON..) in TWin32WSCustomForm.SetIcon. When the form is destroyed it destroys the handles to the icons but they are still assigned for the window class. This causes the icon not to be displayed for every other form unless again a correct handle is assigned via SetClassLong. Windows probably first wants to display class icon and only then looks at window icon (not confirmed, only found this empirically). I don't think setting icon for window class is needed or at least set it to Application.Icon and don't change when a form gets an icon assigned. | ||||
Steps To Reproduce | 1. Run attached project. 2. Click "Show icons handles info", which displays info for Form1. Note that window icon is the same as class icon. 3. Click "Show Form2". 4. Click "Show icons handles info". Class icon handle has changed but is valid. 5. Close Form2. 6. Click "Show icons handles info". Class icon is now an invalid handle. 7. Click "Hide/Show itself". Form1 now has no icon on the taskbar button. 8. Click "Set class icon to 0". 9. Click "Hide/Show itself". The icon for Form1 is back. | ||||
Tags | No tags attached. | ||||
Fixed in Revision | |||||
LazTarget | - | ||||
Widgetset | Win32/Win64 | ||||
Attached Files |
|
related to | 0018480 | resolved | Ondrej Pokorny | Main form icon dissappears from Alt-Tab task list when form with ShowInTaskBar=stAlways active |
2011-01-13 05:48
|
|
|
Is this still a valid issue? |
|
I tested on Windows 10. I can reproduce steps 1 - 6. Class icon handle is reported to be invalid. However the taskbar icon is always there. I guess Windows 10 caches it somehow. Anyway this still looks like a valid issue. |
Date Modified | Username | Field | Change |
---|---|---|---|
2011-01-13 05:48 | cobines | New Issue | |
2011-01-13 05:48 | cobines | File Added: taskbar_noicon.zip | |
2011-01-13 05:48 | cobines | Widgetset | => Win32/Win64 |
2011-02-07 20:39 | Vincent Snijders | LazTarget | => - |
2011-02-07 20:39 | Vincent Snijders | Status | new => acknowledged |
2012-10-02 00:33 | Juha Manninen | Relationship added | related to 0018480 |
2017-10-22 14:05 | Juha Manninen | Note Added: 0103677 | |
2020-12-01 12:11 | Juha Manninen | Note Added: 0127294 |