SwitchPanel: make sure WMRetainColor and WMReleaseColor calls are even
commit2a14004fc37c855a762eac3967956acd642407a2
authorDavid Maciejak <david.maciejak@gmail.com>
Fri, 10 Feb 2023 11:00:00 +0000 (10 19:00 +0800)
committerCarlos R. Mafra <crmafra@gmail.com>
Fri, 10 Feb 2023 11:24:55 +0000 (10 11:24 +0000)
treee31923581934b8301465875dfb82d9f5e2cb44b5
parent04e9f33437d33468f05010b87f851d4f88a5ac64
SwitchPanel: make sure WMRetainColor and WMReleaseColor calls are even

The number of calls to WMRetainColor for a color in use should the same as the number of calls to WMReleaseColor
to free that color. In case of discrepancy, random crashes can happen and memory is not freed properly.
To debug that issue I checked the retained colors when the switchpanel is opened and then checked if those colors are properly released once the panel is closed.

This patch fixes the issue mentioned at https://github.com/window-maker/wmaker/issues/22
WINGs/wcolor.c
WINGs/wframe.c
src/switchpanel.c