>From 52a1905a309336516c4038551492f9d8fd0d2beb Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?"Rodolfo=20Garc=C3=ADa=20Pe=C3=B1as=20(kix)"?= <[email protected]>
Date: Tue, 3 Jul 2012 11:47:15 +0200
Subject: [PATCH 03/13] WScreen argument not used in wDefaultFillAttributes()

The function wDefaultFillAttributes() don't use the argument WScreen,
so can be removed.
---
 src/application.c |    4 ++--
 src/defaults.h    |    2 +-
 src/dock.c        |    5 ++---
 src/wdefaults.c   |    6 +++---
 src/window.c      |    6 +++---
 5 files changed, 11 insertions(+), 12 deletions(-)

diff --git a/src/application.c b/src/application.c
index 4e34f35..7c52fa0 100644
--- a/src/application.c
+++ b/src/application.c
@@ -59,8 +59,8 @@ static WWindow *makeMainWindow(WScreen * scr, Window window)
 
        PropGetWMClass(window, &wwin->wm_class, &wwin->wm_instance);
 
-       wDefaultFillAttributes(scr, wwin->wm_instance, wwin->wm_class,
-                              &wwin->user_flags, &wwin->defined_user_flags, 
True);
+       wDefaultFillAttributes(wwin->wm_instance, wwin->wm_class, 
&wwin->user_flags,
+                              &wwin->defined_user_flags, True);
 
        XSelectInput(dpy, window, attr.your_event_mask | PropertyChangeMask | 
StructureNotifyMask);
        return wwin;
diff --git a/src/defaults.h b/src/defaults.h
index 199abb7..9b5ea95 100644
--- a/src/defaults.h
+++ b/src/defaults.h
@@ -37,7 +37,7 @@ void wDefaultUpdateIcons(WScreen *scr);
 void wReadStaticDefaults(WMPropList *dict);
 void wDefaultsCheckDomains(void *arg);
 void wSaveDefaults(WScreen *scr);
-void wDefaultFillAttributes(WScreen *scr, char *instance, char *class,
+void wDefaultFillAttributes(char *instance, char *class,
                             WWindowAttributes *attr, WWindowAttributes *mask,
                             Bool useGlobalDefault);
 
diff --git a/src/dock.c b/src/dock.c
index 05824d4..0db0fe5 100644
--- a/src/dock.c
+++ b/src/dock.c
@@ -804,7 +804,7 @@ static void launchDockedApplication(WAppIcon *btn, Bool 
withSelection)
                if (btn->wm_instance || btn->wm_class) {
                        WWindowAttributes attr;
                        memset(&attr, 0, sizeof(WWindowAttributes));
-                       wDefaultFillAttributes(scr, btn->wm_instance, 
btn->wm_class, &attr, NULL, True);
+                       wDefaultFillAttributes(btn->wm_instance, btn->wm_class, 
&attr, NULL, True);
 
                        if (!attr.no_appicon && !btn->buggy_app)
                                btn->launching = 1;
@@ -1840,8 +1840,7 @@ int wDockReceiveDNDDrop(WScreen *scr, XEvent *event)
                if (btn->wm_instance || btn->wm_class) {
                        WWindowAttributes attr;
                        memset(&attr, 0, sizeof(WWindowAttributes));
-                       wDefaultFillAttributes(btn->icon->core->screen_ptr,
-                                              btn->wm_instance, btn->wm_class, 
&attr, NULL, True);
+                       wDefaultFillAttributes(btn->wm_instance, btn->wm_class, 
&attr, NULL, True);
 
                        if (!attr.no_appicon)
                                btn->launching = 1;
diff --git a/src/wdefaults.c b/src/wdefaults.c
index 2169a2f..a34d86e 100644
--- a/src/wdefaults.c
+++ b/src/wdefaults.c
@@ -199,9 +199,9 @@ static WMPropList *get_value_from_instanceclass(char *value)
  *
  *----------------------------------------------------------------------
  */
-void
-wDefaultFillAttributes(WScreen * scr, char *instance, char *class,
-                      WWindowAttributes * attr, WWindowAttributes * mask, Bool 
useGlobalDefault)
+void wDefaultFillAttributes(char *instance, char *class,
+                           WWindowAttributes *attr, WWindowAttributes *mask,
+                           Bool useGlobalDefault)
 {
        WMPropList *value, *dw, *dc, *dn, *da;
        char *buffer;
diff --git a/src/window.c b/src/window.c
index d6c697e..624dace 100644
--- a/src/window.c
+++ b/src/window.c
@@ -302,7 +302,7 @@ void wWindowSetupInitialAttributes(WWindow *wwin, int 
*level, int *workspace)
        WScreen *scr = wwin->screen_ptr;
 
        /* sets global default stuff */
-       wDefaultFillAttributes(scr, wwin->wm_instance, wwin->wm_class, 
&wwin->client_flags, NULL, True);
+       wDefaultFillAttributes(wwin->wm_instance, wwin->wm_class, 
&wwin->client_flags, NULL, True);
        /*
         * Decoration setting is done in this precedence (lower to higher)
         * - use global default in the resource database
@@ -393,8 +393,8 @@ void wWindowSetupInitialAttributes(WWindow *wwin, int 
*level, int *workspace)
         * Set attributes specified only for that window/class.
         * This might do duplicate work with the 1st wDefaultFillAttributes().
         */
-       wDefaultFillAttributes(scr, wwin->wm_instance, wwin->wm_class,
-                              &wwin->user_flags, &wwin->defined_user_flags, 
False);
+       wDefaultFillAttributes(wwin->wm_instance, wwin->wm_class, 
&wwin->user_flags,
+                              &wwin->defined_user_flags, False);
        /*
         * Sanity checks for attributes that depend on other attributes
         */
-- 
1.7.10

-- 
||// //\\// Rodolfo "kix" Garcia
||\\// //\\ http://www.kix.es/
>From 52a1905a309336516c4038551492f9d8fd0d2beb Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?"Rodolfo=20Garc=C3=ADa=20Pe=C3=B1as=20(kix)"?= <[email protected]>
Date: Tue, 3 Jul 2012 11:47:15 +0200
Subject: [PATCH 03/13] WScreen argument not used in wDefaultFillAttributes()

The function wDefaultFillAttributes() don't use the argument WScreen,
so can be removed.
---
 src/application.c |    4 ++--
 src/defaults.h    |    2 +-
 src/dock.c        |    5 ++---
 src/wdefaults.c   |    6 +++---
 src/window.c      |    6 +++---
 5 files changed, 11 insertions(+), 12 deletions(-)

diff --git a/src/application.c b/src/application.c
index 4e34f35..7c52fa0 100644
--- a/src/application.c
+++ b/src/application.c
@@ -59,8 +59,8 @@ static WWindow *makeMainWindow(WScreen * scr, Window window)
 
 	PropGetWMClass(window, &wwin->wm_class, &wwin->wm_instance);
 
-	wDefaultFillAttributes(scr, wwin->wm_instance, wwin->wm_class,
-			       &wwin->user_flags, &wwin->defined_user_flags, True);
+	wDefaultFillAttributes(wwin->wm_instance, wwin->wm_class, &wwin->user_flags,
+			       &wwin->defined_user_flags, True);
 
 	XSelectInput(dpy, window, attr.your_event_mask | PropertyChangeMask | StructureNotifyMask);
 	return wwin;
diff --git a/src/defaults.h b/src/defaults.h
index 199abb7..9b5ea95 100644
--- a/src/defaults.h
+++ b/src/defaults.h
@@ -37,7 +37,7 @@ void wDefaultUpdateIcons(WScreen *scr);
 void wReadStaticDefaults(WMPropList *dict);
 void wDefaultsCheckDomains(void *arg);
 void wSaveDefaults(WScreen *scr);
-void wDefaultFillAttributes(WScreen *scr, char *instance, char *class,
+void wDefaultFillAttributes(char *instance, char *class,
                             WWindowAttributes *attr, WWindowAttributes *mask,
                             Bool useGlobalDefault);
 
diff --git a/src/dock.c b/src/dock.c
index 05824d4..0db0fe5 100644
--- a/src/dock.c
+++ b/src/dock.c
@@ -804,7 +804,7 @@ static void launchDockedApplication(WAppIcon *btn, Bool withSelection)
 		if (btn->wm_instance || btn->wm_class) {
 			WWindowAttributes attr;
 			memset(&attr, 0, sizeof(WWindowAttributes));
-			wDefaultFillAttributes(scr, btn->wm_instance, btn->wm_class, &attr, NULL, True);
+			wDefaultFillAttributes(btn->wm_instance, btn->wm_class, &attr, NULL, True);
 
 			if (!attr.no_appicon && !btn->buggy_app)
 				btn->launching = 1;
@@ -1840,8 +1840,7 @@ int wDockReceiveDNDDrop(WScreen *scr, XEvent *event)
 		if (btn->wm_instance || btn->wm_class) {
 			WWindowAttributes attr;
 			memset(&attr, 0, sizeof(WWindowAttributes));
-			wDefaultFillAttributes(btn->icon->core->screen_ptr,
-					       btn->wm_instance, btn->wm_class, &attr, NULL, True);
+			wDefaultFillAttributes(btn->wm_instance, btn->wm_class, &attr, NULL, True);
 
 			if (!attr.no_appicon)
 				btn->launching = 1;
diff --git a/src/wdefaults.c b/src/wdefaults.c
index 2169a2f..a34d86e 100644
--- a/src/wdefaults.c
+++ b/src/wdefaults.c
@@ -199,9 +199,9 @@ static WMPropList *get_value_from_instanceclass(char *value)
  *
  *----------------------------------------------------------------------
  */
-void
-wDefaultFillAttributes(WScreen * scr, char *instance, char *class,
-		       WWindowAttributes * attr, WWindowAttributes * mask, Bool useGlobalDefault)
+void wDefaultFillAttributes(char *instance, char *class,
+			    WWindowAttributes *attr, WWindowAttributes *mask,
+			    Bool useGlobalDefault)
 {
 	WMPropList *value, *dw, *dc, *dn, *da;
 	char *buffer;
diff --git a/src/window.c b/src/window.c
index d6c697e..624dace 100644
--- a/src/window.c
+++ b/src/window.c
@@ -302,7 +302,7 @@ void wWindowSetupInitialAttributes(WWindow *wwin, int *level, int *workspace)
 	WScreen *scr = wwin->screen_ptr;
 
 	/* sets global default stuff */
-	wDefaultFillAttributes(scr, wwin->wm_instance, wwin->wm_class, &wwin->client_flags, NULL, True);
+	wDefaultFillAttributes(wwin->wm_instance, wwin->wm_class, &wwin->client_flags, NULL, True);
 	/*
 	 * Decoration setting is done in this precedence (lower to higher)
 	 * - use global default in the resource database
@@ -393,8 +393,8 @@ void wWindowSetupInitialAttributes(WWindow *wwin, int *level, int *workspace)
 	 * Set attributes specified only for that window/class.
 	 * This might do duplicate work with the 1st wDefaultFillAttributes().
 	 */
-	wDefaultFillAttributes(scr, wwin->wm_instance, wwin->wm_class,
-			       &wwin->user_flags, &wwin->defined_user_flags, False);
+	wDefaultFillAttributes(wwin->wm_instance, wwin->wm_class, &wwin->user_flags,
+			       &wwin->defined_user_flags, False);
 	/*
 	 * Sanity checks for attributes that depend on other attributes
 	 */
-- 
1.7.10

Reply via email to