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

Removed unused variable wapp_list

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) <kix@kix.es>
This commit is contained in:
Rodolfo García Peñas (kix)
2013-10-08 00:56:45 +02:00
committed by Carlos R. Mafra
parent 0de3e590ce
commit 2e64831fb6
2 changed files with 5 additions and 16 deletions

View File

@@ -143,10 +143,9 @@ WApplication *wApplicationCreate(WWindow * wwin)
return wapp; return wapp;
} }
void wApplicationDestroy(WApplication * wapp) void wApplicationDestroy(WApplication *wapp)
{ {
WWindow *wwin; WWindow *wwin;
WScreen *scr;
if (!wapp) if (!wapp)
return; return;
@@ -166,18 +165,10 @@ void wApplicationDestroy(WApplication * wapp)
return; return;
} }
scr = wapp->main_window_desc->screen_ptr; if (wapp->next)
wapp->next->prev = wapp->prev;
if (wapp == scr->wapp_list) { if (wapp->prev)
if (wapp->next) wapp->prev->next = 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;
}
XDeleteContext(dpy, wapp->main_window, w_global.context.app_win); XDeleteContext(dpy, wapp->main_window, w_global.context.app_win);
wAppMenuDestroy(wapp->menu); wAppMenuDestroy(wapp->menu);

View File

@@ -107,8 +107,6 @@ typedef struct _WScreen {
WMArray *fakeGroupLeaders; /* list of fake window group ids */ WMArray *fakeGroupLeaders; /* list of fake window group ids */
struct WApplication *wapp_list; /* list of all aplications */
WMBag *stacking_list; /* bag of lists of windows WMBag *stacking_list; /* bag of lists of windows
* in stacking order. * in stacking order.
* Indexed by window level * Indexed by window level