Enlightenment CVS committal Author : raster Project : e17 Module : apps/e
Dir : e17/apps/e/src/bin Modified Files: e_hints.c Log Message: skip unknown types for netwmtypes (as primary type) =================================================================== RCS file: /cvs/e/e17/apps/e/src/bin/e_hints.c,v retrieving revision 1.101 retrieving revision 1.102 diff -u -3 -r1.101 -r1.102 --- e_hints.c 16 Jul 2008 17:06:23 -0000 1.101 +++ e_hints.c 23 Jul 2008 21:54:42 -0000 1.102 @@ -698,7 +698,7 @@ e_hints_window_type_get(E_Border *bd) { Ecore_X_Window_Type *types = NULL; - int num, i; + int num, i, j; num = ecore_x_netwm_window_types_get(bd->client.win, &types); if (bd->client.netwm.extra_types) @@ -708,21 +708,27 @@ bd->client.netwm.extra_types_num = 0; } if (num == 0) - { - bd->client.netwm.type = ECORE_X_WINDOW_TYPE_UNKNOWN; - } + bd->client.netwm.type = ECORE_X_WINDOW_TYPE_UNKNOWN; else { - bd->client.netwm.type = types[0]; - if (num > 1) + j = 0; + bd->client.netwm.type = types[j]; + j++; + while ((j < num) && + (bd->client.netwm.type == ECORE_X_WINDOW_TYPE_UNKNOWN)) + { + j++; + bd->client.netwm.type = types[j]; + } + if (num > j) { bd->client.netwm.extra_types = - malloc((num - 1) * sizeof(Ecore_X_Window_Type)); + malloc((num - j) * sizeof(Ecore_X_Window_Type)); if (bd->client.netwm.extra_types) { - for (i = 1; i < num; i++) - bd->client.netwm.extra_types[i - 1] = types[i]; - bd->client.netwm.extra_types_num = num - 1; + for (i = j + 1; i < num; i++) + bd->client.netwm.extra_types[i - (j + 1)] = types[i]; + bd->client.netwm.extra_types_num = num - j; } } free(types); ------------------------------------------------------------------------- This SF.Net email is sponsored by the Moblin Your Move Developer's challenge Build the coolest Linux based applications with Moblin SDK & win great prizes Grand prize is a trip for two to an Open Source event anywhere in the world http://moblin-contest.org/redirect.php?banner_id=100&url=/ _______________________________________________ enlightenment-cvs mailing list enlightenment-cvs@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/enlightenment-cvs