Enlightenment CVS committal Author : kwo Project : e16 Module : e
Dir : e16/e/src Modified Files: ewins.c ewins.h groups.c icccm.c ipc.c snaps.c windowmatch.c Log Message: Rewrap more stuff related to WM_NAME/CLASS. =================================================================== RCS file: /cvs/e/e16/e/src/ewins.c,v retrieving revision 1.181 retrieving revision 1.182 diff -u -3 -r1.181 -r1.182 --- ewins.c 26 Nov 2006 11:30:58 -0000 1.181 +++ ewins.c 26 Nov 2006 12:42:05 -0000 1.182 @@ -224,7 +224,7 @@ ECreateWindow(frame, 0, 0, ewin->client.w, ewin->client.h, 0); EoInit(ewin, EOBJ_TYPE_EWIN, frame, ewin->client.x, ewin->client.y, - ewin->client.w, ewin->client.h, 1, ewin->icccm.wm_name); + ewin->client.w, ewin->client.h, 1, EwinGetIcccmName(ewin)); EobjListFocusAdd(&ewin->o, 1); EobjListOrderAdd(&ewin->o); @@ -387,14 +387,14 @@ HintsSetClientList(); - if (ewin->icccm.wm_name) - Efree(ewin->icccm.wm_name); + if (EwinGetIcccmName(ewin)) + Efree(EwinGetIcccmName(ewin)); + if (EwinGetIcccmCName(ewin)) + Efree(EwinGetIcccmCName(ewin)); + if (EwinGetIcccmClass(ewin)) + Efree(EwinGetIcccmClass(ewin)); if (ewin->icccm.wm_icon_name) Efree(ewin->icccm.wm_icon_name); - if (ewin->icccm.wm_res_class) - Efree(ewin->icccm.wm_res_class); - if (ewin->icccm.wm_res_name) - Efree(ewin->icccm.wm_res_name); if (ewin->icccm.wm_role) Efree(ewin->icccm.wm_role); if (ewin->icccm.wm_command) @@ -1509,7 +1509,7 @@ name = ewin->ewmh.wm_name; if (name) goto done; - name = ewin->icccm.wm_name; + name = EwinGetIcccmName(ewin); if (name) goto done; =================================================================== RCS file: /cvs/e/e16/e/src/ewins.h,v retrieving revision 1.60 retrieving revision 1.61 diff -u -3 -r1.60 -r1.61 --- ewins.h 26 Nov 2006 11:30:58 -0000 1.60 +++ ewins.h 26 Nov 2006 12:42:05 -0000 1.61 @@ -147,9 +147,9 @@ struct { char *wm_name; - char *wm_icon_name; char *wm_res_name; char *wm_res_class; + char *wm_icon_name; char *wm_role; char *wm_command; char *wm_machine; @@ -292,6 +292,10 @@ #define EwinGetClientWin(ewin) ((ewin)->client.win) #define EwinGetContainerWin(ewin) ((ewin)->win_container) + +#define EwinGetIcccmName(ewin) ((ewin)->icccm.wm_name) +#define EwinGetIcccmCName(ewin) ((ewin)->icccm.wm_res_name) +#define EwinGetIcccmClass(ewin) ((ewin)->icccm.wm_res_class) /* arrange.c */ #define ARRANGE_VERBATIM 0 =================================================================== RCS file: /cvs/e/e16/e/src/groups.c,v retrieving revision 1.86 retrieving revision 1.87 diff -u -3 -r1.86 -r1.87 --- groups.c 26 Nov 2006 11:30:58 -0000 1.86 +++ groups.c 26 Nov 2006 12:42:05 -0000 1.87 @@ -1131,7 +1131,7 @@ int j; for (j = 0; j < g->num_members; j++) - IpcPrintf("%d: %s\n", g->index, g->members[j]->icccm.wm_name); + IpcPrintf("%d: %s\n", g->index, EwinGetIcccmName(g->members[j])); IpcPrintf(" index: %d\n" " num_members: %d\n" " iconify: %d\n" " kill: %d\n" =================================================================== RCS file: /cvs/e/e16/e/src/icccm.c,v retrieving revision 1.134 retrieving revision 1.135 diff -u -3 -r1.134 -r1.135 --- icccm.c 26 Nov 2006 11:30:59 -0000 1.134 +++ icccm.c 26 Nov 2006 12:42:05 -0000 1.135 @@ -84,9 +84,9 @@ if (atom_change && atom_change != ECORE_X_ATOM_WM_NAME) return; - _EFREE(ewin->icccm.wm_name); + _EFREE(EwinGetIcccmName(ewin)); - ewin->icccm.wm_name = ecore_x_icccm_title_get(EwinGetClientXwin(ewin)); + EwinGetIcccmName(ewin) = ecore_x_icccm_title_get(EwinGetClientXwin(ewin)); EwinChange(ewin, EWIN_CHANGE_NAME); } @@ -537,16 +537,16 @@ { if (atom_change == 0 || atom_change == ECORE_X_ATOM_WM_CLASS) { - _EFREE(ewin->icccm.wm_res_name); - _EFREE(ewin->icccm.wm_res_class); + _EFREE(EwinGetIcccmCName(ewin)); + _EFREE(EwinGetIcccmClass(ewin)); ecore_x_icccm_name_class_get(EwinGetClientXwin(ewin), - &ewin->icccm.wm_res_name, - &ewin->icccm.wm_res_class); - if (!ewin->icccm.wm_res_name && TryGroup(ewin)) + &EwinGetIcccmCName(ewin), + &EwinGetIcccmClass(ewin)); + if (!EwinGetIcccmCName(ewin) && TryGroup(ewin)) ecore_x_icccm_name_class_get(ewin->icccm.group, - &ewin->icccm.wm_res_name, - &ewin->icccm.wm_res_class); + &EwinGetIcccmCName(ewin), + &EwinGetIcccmClass(ewin)); } if (atom_change == 0 || atom_change == ECORE_X_ATOM_WM_COMMAND) =================================================================== RCS file: /cvs/e/e16/e/src/ipc.c,v retrieving revision 1.282 retrieving revision 1.283 diff -u -3 -r1.282 -r1.283 --- ipc.c 26 Nov 2006 11:11:14 -0000 1.282 +++ ipc.c 26 Nov 2006 12:42:05 -0000 1.283 @@ -171,14 +171,14 @@ } else if (type == 'w') /* Wildcard */ { - if (!matchregexp(match, ewin->icccm.wm_name)) + if (!matchregexp(match, EwinGetIcccmName(ewin))) continue; } else /* Match name (substring) */ { const char *name; - name = ewin->icccm.wm_name; + name = EwinGetIcccmName(ewin); if (!name) continue; if (!strcasestr(name, match)) @@ -464,12 +464,12 @@ { case '\0': IpcPrintf("%#lx : %s\n", EwinGetClientXwin(e), - SS(e->icccm.wm_name)); + SS(EwinGetIcccmName(e))); break; default: IpcPrintf("%#lx : %s :: %d : %d %d : %d %d %dx%d\n", - EwinGetClientXwin(e), SS(e->icccm.wm_name), + EwinGetClientXwin(e), SS(EwinGetIcccmName(e)), (EoIsSticky(e)) ? -1 : (int)EoGetDeskNum(e), e->area_x, e->area_y, EoGetX(e), EoGetY(e), EoGetW(e), EoGetH(e)); break; @@ -478,7 +478,7 @@ IpcPrintf("%#10lx : %5d %5d %4dx%4d :: %2d : %d %d : %s\n", EwinGetClientXwin(e), EoGetX(e), EoGetY(e), EoGetW(e), EoGetH(e), (EoIsSticky(e)) ? -1 : (int)EoGetDeskNum(e), - e->area_x, e->area_y, SS(e->icccm.wm_name)); + e->area_x, e->area_y, SS(EwinGetIcccmName(e))); break; case 'g': @@ -487,7 +487,7 @@ EwinGetClientXwin(e), EoGetX(e), EoGetY(e), EoGetW(e), EoGetH(e), (EoIsSticky(e)) ? -1 : (int)EoGetDeskNum(e), TxtPG[e->place.gravity & 3], e->place.gx, e->place.gy, - e->place.ax, e->place.ay, SS(e->icccm.wm_name)); + e->place.ax, e->place.ay, SS(EwinGetIcccmName(e))); break; case 'p': @@ -495,8 +495,8 @@ ("%#10lx : %5d %5d %4dx%4d :: %2d : \"%s\" \"%s\" \"%s\"\n", EwinGetClientXwin(e), EoGetX(e), EoGetY(e), EoGetW(e), EoGetH(e), (EoIsSticky(e)) ? -1 : (int)EoGetDeskNum(e), - SS(e->icccm.wm_res_name), SS(e->icccm.wm_res_class), - SS(e->icccm.wm_name)); + SS(EwinGetIcccmCName(e)), SS(EwinGetIcccmClass(e)), + SS(EwinGetIcccmName(e))); break; } } @@ -570,7 +570,7 @@ } if (!strcmp(prm, "?")) { - IpcPrintf("title: %s", ewin->icccm.wm_name); + IpcPrintf("title: %s", EwinGetIcccmName(ewin)); goto done; } HintsSetWindowName(EwinGetClientWin(ewin), prm); @@ -1173,9 +1173,9 @@ "Opacity %3i\n" #endif , - SS(ewin->icccm.wm_name), + SS(EwinGetIcccmName(ewin)), SS(ewin->icccm.wm_icon_name), - SS(ewin->icccm.wm_res_name), SS(ewin->icccm.wm_res_class), + SS(EwinGetIcccmCName(ewin)), SS(EwinGetIcccmClass(ewin)), SS(ewin->icccm.wm_role), SS(ewin->icccm.wm_command), SS(ewin->icccm.wm_machine), =================================================================== RCS file: /cvs/e/e16/e/src/snaps.c,v retrieving revision 1.127 retrieving revision 1.128 diff -u -3 -r1.127 -r1.128 --- snaps.c 26 Nov 2006 11:30:59 -0000 1.127 +++ snaps.c 26 Nov 2006 12:42:05 -0000 1.128 @@ -169,15 +169,15 @@ return 0; if (sn->match_flags & SNAP_MATCH_TITLE - && !SEQ(sn->win_title, ewin->icccm.wm_name)) + && !SEQ(sn->win_title, EwinGetIcccmName(ewin))) return 0; if (sn->match_flags & SNAP_MATCH_NAME - && !SEQ(sn->win_name, ewin->icccm.wm_res_name)) + && !SEQ(sn->win_name, EwinGetIcccmCName(ewin))) return 0; if (sn->match_flags & SNAP_MATCH_CLASS - && !SEQ(sn->win_class, ewin->icccm.wm_res_class)) + && !SEQ(sn->win_class, EwinGetIcccmClass(ewin))) return 0; if (sn->match_flags & SNAP_MATCH_ROLE) @@ -252,17 +252,17 @@ if (sn) return sn; - if ((match_flags & SNAP_MATCH_TITLE) && !ewin->icccm.wm_name) + if ((match_flags & SNAP_MATCH_TITLE) && !EwinGetIcccmName(ewin)) match_flags ^= SNAP_MATCH_TITLE; - if ((match_flags & SNAP_MATCH_NAME) && !ewin->icccm.wm_res_name) + if ((match_flags & SNAP_MATCH_NAME) && !EwinGetIcccmCName(ewin)) match_flags ^= SNAP_MATCH_NAME; - if ((match_flags & SNAP_MATCH_CLASS) && !ewin->icccm.wm_res_class) + if ((match_flags & SNAP_MATCH_CLASS) && !EwinGetIcccmClass(ewin)) match_flags ^= SNAP_MATCH_CLASS; if ((match_flags & SNAP_MATCH_ROLE) && !ewin->icccm.wm_role) match_flags ^= SNAP_MATCH_ROLE; if (match_flags == 0) { - if (!ewin->icccm.wm_name) + if (!EwinGetIcccmName(ewin)) return NULL; match_flags = SNAP_MATCH_TITLE; } @@ -273,11 +273,11 @@ sn->match_flags = match_flags; if (match_flags & SNAP_MATCH_TITLE) - sn->win_title = Estrdup(ewin->icccm.wm_name); + sn->win_title = Estrdup(EwinGetIcccmName(ewin)); if (match_flags & SNAP_MATCH_NAME) - sn->win_name = Estrdup(ewin->icccm.wm_res_name); + sn->win_name = Estrdup(EwinGetIcccmCName(ewin)); if (match_flags & SNAP_MATCH_CLASS) - sn->win_class = Estrdup(ewin->icccm.wm_res_class); + sn->win_class = Estrdup(EwinGetIcccmClass(ewin)); if (match_flags & SNAP_MATCH_ROLE) { s = SnapGetRole(ewin->icccm.wm_role, buf, sizeof(buf)); @@ -293,7 +293,7 @@ else if (sn->win_title) Esnprintf(buf, sizeof(buf), "TITLE.%s", sn->win_title); else /* We should not go here */ - Esnprintf(buf, sizeof(buf), "TITLE.%s", ewin->icccm.wm_name); + Esnprintf(buf, sizeof(buf), "TITLE.%s", EwinGetIcccmName(ewin)); sn->name = Estrdup(buf); if (!(sn->match_flags & SNAP_MATCH_MULTIPLE)) @@ -722,7 +722,7 @@ } else { - if (ewin->icccm.wm_res_name) + if (EwinGetIcccmCName(ewin)) { sd->match.name = 1; sd->match.class = 1; @@ -730,7 +730,7 @@ } else { - sd->match.title = ewin->icccm.wm_name != NULL; + sd->match.title = EwinGetIcccmName(ewin) != NULL; } } @@ -745,9 +745,9 @@ di = DialogAddItem(table, DITEM_TEXT); DialogItemSetColSpan(di, 3); DialogItemSetAlign(di, 1024, 512); - DialogItemSetText(di, ewin->icccm.wm_name); + DialogItemSetText(di, EwinGetIcccmName(ewin)); - if (ewin->icccm.wm_res_name) + if (EwinGetIcccmCName(ewin)) { di = DialogAddItem(table, DITEM_CHECKBUTTON); DialogItemSetAlign(di, 0, 512); @@ -757,10 +757,10 @@ di = DialogAddItem(table, DITEM_TEXT); DialogItemSetColSpan(di, 3); DialogItemSetAlign(di, 1024, 512); - DialogItemSetText(di, ewin->icccm.wm_res_name); + DialogItemSetText(di, EwinGetIcccmCName(ewin)); } - if (ewin->icccm.wm_res_class) + if (EwinGetIcccmClass(ewin)) { di = DialogAddItem(table, DITEM_CHECKBUTTON); DialogItemSetAlign(di, 0, 512); @@ -770,7 +770,7 @@ di = DialogAddItem(table, DITEM_TEXT); DialogItemSetColSpan(di, 3); DialogItemSetAlign(di, 1024, 512); - DialogItemSetText(di, ewin->icccm.wm_res_class); + DialogItemSetText(di, EwinGetIcccmClass(ewin)); } if (ewin->icccm.wm_role) =================================================================== RCS file: /cvs/e/e16/e/src/windowmatch.c,v retrieving revision 1.55 retrieving revision 1.56 diff -u -3 -r1.55 -r1.56 --- windowmatch.c 26 Nov 2006 11:30:59 -0000 1.55 +++ windowmatch.c 26 Nov 2006 12:42:05 -0000 1.56 @@ -528,13 +528,13 @@ switch (wm->match) { case MATCH_TYPE_TITLE: - return matchregexp(wm->value, ewin->icccm.wm_name); + return matchregexp(wm->value, EwinGetIcccmName(ewin)); case MATCH_TYPE_WM_NAME: - return matchregexp(wm->value, ewin->icccm.wm_res_name); + return matchregexp(wm->value, EwinGetIcccmCName(ewin)); case MATCH_TYPE_WM_CLASS: - return matchregexp(wm->value, ewin->icccm.wm_res_class); + return matchregexp(wm->value, EwinGetIcccmClass(ewin)); case MATCH_TYPE_SIZE: match = (ewin->client.w >= wm->width.min && @@ -689,8 +689,8 @@ return; case EWIN_OP_TITLE: - _EFREE(ewin->icccm.wm_name); - ewin->icccm.wm_name = Estrdup(args); + _EFREE(EwinGetIcccmName(ewin)); + EwinGetIcccmName(ewin) = Estrdup(args); break; case EWIN_OP_ICONIFY: ------------------------------------------------------------------------- Take Surveys. Earn Cash. Influence the Future of IT Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT & business topics through brief surveys - and earn cash http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV _______________________________________________ enlightenment-cvs mailing list enlightenment-cvs@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/enlightenment-cvs