[Pkg-wmaker-commits] [wmaker] 03/21: create_appicon_from_dock checks if no_appicon flag is set

Doug Torrance dtorrance-guest at moszumanska.debian.org
Fri Jan 8 01:40:36 UTC 2016


This is an automated email from the git hooks/post-receive script.

dtorrance-guest pushed a commit to branch next
in repository wmaker.

commit b2815873977e364d3fd8f27b4dae82c37a23bad6
Author: Rodolfo García Peñas (kix) <kix at kix.es>
Date:   Sun Aug 23 20:56:53 2015 +0200

    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 at 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 at kix.es>
---
 src/appicon.c | 2 +-
 src/icon.c    | 7 ++++++-
 2 files changed, 7 insertions(+), 2 deletions(-)

diff --git a/src/appicon.c b/src/appicon.c
index 302066d..08331c7 100644
--- a/src/appicon.c
+++ b/src/appicon.c
@@ -1180,7 +1180,7 @@ static void create_appicon_from_dock(WWindow *wwin, WApplication *wapp, Window m
 	}
 
 	/* If created, then set some flags */
-	if (wapp->app_icon) {
+	if (wapp->app_icon && !WFLAGP(wapp->main_window_desc, no_appicon)) {
 		WWindow *mainw = wapp->main_window_desc;
 
 		wapp->app_icon->running = 1;
diff --git a/src/icon.c b/src/icon.c
index 721c428..a04e11b 100644
--- a/src/icon.c
+++ b/src/icon.c
@@ -748,7 +748,12 @@ RImage *get_rimage_icon_from_wm_hints(WIcon *icon)
 {
 	RImage *image = NULL;
 	unsigned int w, h, d;
-	WWindow *wwin = icon->owner;
+	WWindow *wwin;
+
+	if ((!icon) || (!icon->owner))
+		return NULL;
+
+	wwin = icon->owner;
 
 	if (!getSize(wwin->wm_hints->icon_pixmap, &w, &h, &d)) {
 		icon->owner->wm_hints->flags &= ~IconPixmapHint;

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-wmaker/wmaker.git



More information about the Pkg-wmaker-commits mailing list