From: Rodolfo García Peñas (kix) Date: Tue, 23 Oct 2012 22:00:01 +0000 (+0200) Subject: remove_wwindowstate name changed X-Git-Tag: wmaker-0.95.4~84 X-Git-Url: https://repo.or.cz/w/wmaker-crm.git/commitdiff_plain/0bd7bcd434ff6420d381c609f9eef94df5f61afd remove_wwindowstate name changed 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. - - - --- diff --git a/src/window.c b/src/window.c index f0f093d7..4691021f 100644 --- a/src/window.c +++ b/src/window.c @@ -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);