remove_wwindowstate name changed
authorRodolfo García Peñas (kix) <kix@kix.es>
Tue, 23 Oct 2012 22:00:01 +0000 (24 00:00 +0200)
committerCarlos R. Mafra <crmafra@gmail.com>
Sun, 28 Oct 2012 10:58:43 +0000 (28 10:58 +0000)
The function remove_wwindowstate is now remove_wwindowstate. This was
proposed by Christophe and Carlos:

- - -
On 2012-10-09 01:09, Carlos R. Mafra wrote:
> On Tue,  9 Oct 2012 at  0:58:19 +0200, Christophe wrote:
> you name the function "remove_*", which makes think that it would
> remove the entry from the list, but the function does not do that, it
> just frees the memory, so it may have been better called "free_" (or
> maybe "release_")?
>

Good point, release_ makes more sense to me.
- - -

src/window.c

index f0f093d..4691021 100644 (file)
@@ -109,7 +109,7 @@ static void titlebarMouseDown(WCoreWindow *sender, void *data, XEvent *event);
 static void titlebarDblClick(WCoreWindow *sender, void *data, XEvent *event);
 static void resizebarMouseDown(WCoreWindow *sender, void *data, XEvent *event);
 
-static void remove_wwindowstate(WWindowState *wstate);
+static void release_wwindowstate(WWindowState *wstate);
 
 /****** Notification Observers ******/
 
@@ -2598,12 +2598,12 @@ void wWindowDeleteSavedState(WMagicNumber id)
        tmp = windowState;
        if (tmp == wstate) {
                windowState = wstate->next;
-               remove_wwindowstate(wstate);
+               release_wwindowstate(wstate);
        } else {
                while (tmp->next) {
                        if (tmp->next == wstate) {
                                tmp->next = wstate->next;
-                               remove_wwindowstate(wstate);
+                               release_wwindowstate(wstate);
                                break;
                        }
                        tmp = tmp->next;
@@ -2623,13 +2623,13 @@ void wWindowDeleteSavedStatesForPID(pid_t pid)
                wstate = windowState;
                windowState = tmp->next;
 
-               remove_wwindowstate(wstate);
+               release_wwindowstate(wstate);
        } else {
                while (tmp->next) {
                        if (tmp->next->pid == pid) {
                                wstate = tmp->next;
                                tmp->next = wstate->next;
-                               remove_wwindowstate(wstate);
+                               release_wwindowstate(wstate);
                                break;
                        }
                        tmp = tmp->next;
@@ -2637,7 +2637,7 @@ void wWindowDeleteSavedStatesForPID(pid_t pid)
        }
 }
 
-static void remove_wwindowstate(WWindowState *wstate)
+static void release_wwindowstate(WWindowState *wstate)
 {
        if (wstate->instance)
                wfree(wstate->instance);