create_appicon_from_dock checks if no_appicon flag is set
commitb2815873977e364d3fd8f27b4dae82c37a23bad6
authorRodolfo García Peñas (kix) <kix@kix.es>
Sun, 23 Aug 2015 18:56:53 +0000 (23 20:56 +0200)
committerCarlos R. Mafra <crmafra@gmail.com>
Sun, 23 Aug 2015 21:08:30 +0000 (23 22:08 +0100)
tree97462240ee2f0c6841797d3e26174ef0142bb064
parent7e42fedcbb25cdee72e937c99f6595f610e16c36
create_appicon_from_dock checks if no_appicon flag is set

As Josip Deanovic reported:

-------8<-------
In previous versions e.g. 0.80.2 up until 0.95.3 when an application
attributes are set with "NoAppIcon = Yes;" ("No application icon" option
in attributes window), it was possible to launch multiple instances of
the application from wmdock using double-click.

After doing a git bisect per your suggestion I have found and reported
this:

bc0700e016c67791d3e3eab855543d849f4ce786 is the first bad commit
commit bc0700e016c67791d3e3eab855543d849f4ce786
Author: Rodolfo García Peñas (kix) <kix@kix.es>
Date:   Mon Jun 18 11:15:19 2012 +0200

    Create WAppIcon always

    When the application is created, the WAppIcon now is created always,
    but it is only painted if the flag is not set.

    The icon initialization to NULL can be done now at
app_icon_create_from_docks
    because it is always called.

:040000 040000 7c58877ad5af211acaddac5288848c2ade7b04cb
33d52affb385d22fbf04ebad3c628b714008785d M      src
-------8<-------

This patch reverts this change (not the patch). Now the function
create_appicon_from_dock checks if the flag no_appicon is set,
and then, do not execute the code related to the appicon.

Because the connection between the icon and the window is broken
(icon->owner is null) we need check if the icon->owner exists
when we try to re-create the icon in the Window Attributes window.

Signed-off-by: Rodolfo García Peñas (kix) <kix@kix.es>
src/appicon.c
src/icon.c