1
0
mirror of https://github.com/gryf/wmaker.git synced 2025-12-20 21:08:08 +01:00

fixed crash bug with WM_CLASS==NULL

etc
This commit is contained in:
kojima
2001-08-20 18:11:40 +00:00
parent 0e2ac9dd16
commit fa994f627e
17 changed files with 188 additions and 12 deletions

View File

@@ -413,7 +413,6 @@ wApplicationCreate(WScreen *scr, Window main_window)
if (!tmp)
extractClientIcon(wapp->app_icon);
}
/* set the application instance index */
{
WApplication *list = scr->wapp_list;
@@ -424,14 +423,16 @@ wApplicationCreate(WScreen *scr, Window main_window)
if (!WFLAGP(wwin, collapse_appicons))
return 0;
*/
#define Xstreql(a, b) ((a) == (b) || (a && b && strcmp(a, b)==0))
/* look for a free index # */
while (list) {
if (strcmp(wwin->wm_instance,
list->main_window_desc->wm_instance) == 0
if (Xstreql(wwin->wm_instance,
list->main_window_desc->wm_instance)
&&
strcmp(wwin->wm_class,
list->main_window_desc->wm_class) == 0) {
Xstreql(wwin->wm_class,
list->main_window_desc->wm_class)) {
if (list->index == index) {
index++;