The variable wapp_list is never set, then the comparison with wapp is only true if wapp is NULL. wapp can not be NULL in the function wApplicationDestroy() because is tested previously.
Signed-off-by: Rodolfo García Peñas (kix) <[email protected]> --- src/application.c | 19 +++++-------------- src/screen.h | 2 -- 2 files changed, 5 insertions(+), 16 deletions(-) diff --git a/src/application.c b/src/application.c index a5063ba..fe8fe6e 100644 --- a/src/application.c +++ b/src/application.c @@ -143,10 +143,9 @@ WApplication *wApplicationCreate(WWindow * wwin) return wapp; } -void wApplicationDestroy(WApplication * wapp) +void wApplicationDestroy(WApplication *wapp) { WWindow *wwin; - WScreen *scr; if (!wapp) return; @@ -166,18 +165,10 @@ void wApplicationDestroy(WApplication * wapp) return; } - scr = wapp->main_window_desc->screen_ptr; - - if (wapp == scr->wapp_list) { - if (wapp->next) - wapp->next->prev = NULL; - scr->wapp_list = wapp->next; - } else { - if (wapp->next) - wapp->next->prev = wapp->prev; - if (wapp->prev) - wapp->prev->next = wapp->next; - } + if (wapp->next) + wapp->next->prev = wapp->prev; + if (wapp->prev) + wapp->prev->next = wapp->next; XDeleteContext(dpy, wapp->main_window, w_global.context.app_win); wAppMenuDestroy(wapp->menu); diff --git a/src/screen.h b/src/screen.h index ea1edcc..fc933f1 100644 --- a/src/screen.h +++ b/src/screen.h @@ -107,8 +107,6 @@ typedef struct _WScreen { WMArray *fakeGroupLeaders; /* list of fake window group ids */ - struct WApplication *wapp_list; /* list of all aplications */ - WMBag *stacking_list; /* bag of lists of windows * in stacking order. * Indexed by window level -- 1.8.4.rc3 -- To unsubscribe, send mail to [email protected].
