1
0
mirror of https://github.com/gryf/wmaker.git synced 2025-12-19 12:28:22 +01:00

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.
- - -
This commit is contained in:
Rodolfo García Peñas (kix)
2012-10-24 00:00:01 +02:00
committed by Carlos R. Mafra
parent 206fe5e821
commit 0bd7bcd434

View 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);