On 2012-11-19 09:05, Carlos R. Mafra wrote:
On Mon, 19 Nov 2012 at  0:33:37 +0100, Rodolfo García Peñas wrote:

I will try to explain it.

Before these patches:

When minimize a window, an appicon is created, and the icon is added to the stacking list. When you un-minimize the icon, the icon is destroyed and is removed from the stacking list.

After these patches:

1. When the application is created, the appicon (wwin->icon) is created. 2. When the icon is minimized, the icon is added to the stacking list. We don't need create it. 3. When the icon is un-miminized is removed from the stacking list, but not destroyed.
You can repeat 2,3.
4. When the window is destroyed, the appicon is destroyed.

Now has more sense.

Problem?

If the application is minimized, the icon is in the stacking list, so we MUST remove it from the stacking list before destroy it, else, wmaker will crash. Then, the patches removes always the icon from the stacking list, even is not in it. We can check if the icon is in the stacking list testing if the icon is minimized. If minimized, then remove from the stacking list. Or simply remove the warning, because now the stacking is balanced.

Before this patch series, the icon was always removed from the screen when was maximized (see previous mails in the list about this problem). With these patches, this problem go away.

Please, don't apply patch 3 without 4 or 4 without 3. They should be rebased in only one, but is more easy to patch review. About patch 6, probably we should change the icon_destroy to test if the icon is minimized.

Thanks a lot for explaining the patches!

But again, the changelog is almost as important as the patches themselves.
All this information must be there in order to educate future people
wondering about the code, especially when there are subtle aspects like removing or not the icon from the stacking list -- which btw seems a bit
fragile since there are assumptions being made and you must be aware
of them. People in the future will not be as fluent as you are now
regarding this, and bugs will be introduced if changes need to be made.

So now I will have to edit your changelogs to include this info and
probably merge patches 3 and 4 together.

Thanks though!

Thanks Carlos.
--
||// //\\// Rodolfo "kix" Garcia
||\\// //\\ http://www.kix.es/


--
To unsubscribe, send mail to [email protected].

Reply via email to