Enlightenment CVS committal Author : raster Project : e17 Module : libs/ecore
Dir : e17/libs/ecore/src/lib/ecore_x Modified Files: Ecore_X.h ecore_x_netwm.c Log Message: patches that i said were in - commit. (see my reply emails) also finish off a TODO item or 2 =================================================================== RCS file: /cvs/e/e17/libs/ecore/src/lib/ecore_x/Ecore_X.h,v retrieving revision 1.168 retrieving revision 1.169 diff -u -3 -r1.168 -r1.169 --- Ecore_X.h 4 Jun 2006 05:30:37 -0000 1.168 +++ Ecore_X.h 7 Jun 2006 23:30:13 -0000 1.169 @@ -1337,7 +1337,7 @@ EAPI void ecore_x_netwm_window_type_set(Ecore_X_Window win, Ecore_X_Window_Type type); EAPI int ecore_x_netwm_window_type_get(Ecore_X_Window win, Ecore_X_Window_Type *type); EAPI int ecore_x_netwm_allowed_action_isset(Ecore_X_Window win, Ecore_X_Action action); -EAPI void ecore_x_netwm_allowed_action_set(Ecore_X_Window win, Ecore_X_Action action, int on); +EAPI void ecore_x_netwm_allowed_action_set(Ecore_X_Window win, Ecore_X_Action *action, unsigned int num); EAPI int ecore_x_netwm_allowed_action_get(Ecore_X_Window win, Ecore_X_Action **action, unsigned int *num); EAPI void ecore_x_netwm_opacity_set(Ecore_X_Window win, unsigned int opacity); EAPI int ecore_x_netwm_opacity_get(Ecore_X_Window win, unsigned int *opacity); =================================================================== RCS file: /cvs/e/e17/libs/ecore/src/lib/ecore_x/ecore_x_netwm.c,v retrieving revision 1.53 retrieving revision 1.54 diff -u -3 -r1.53 -r1.54 --- ecore_x_netwm.c 7 Jun 2006 10:36:47 -0000 1.53 +++ ecore_x_netwm.c 7 Jun 2006 23:30:13 -0000 1.54 @@ -1074,15 +1074,26 @@ /* FIXME: Set complete list */ EAPI void -ecore_x_netwm_allowed_action_set(Ecore_X_Window win, Ecore_X_Action action, int on) +ecore_x_netwm_allowed_action_set(Ecore_X_Window win, Ecore_X_Action *action, unsigned int num) { - Ecore_X_Atom atom; + Ecore_X_Atom *set; + int i; - atom = _ecore_x_netwm_action_atom_get(action); - on = (on) ? ECORE_X_PROP_LIST_ADD : ECORE_X_PROP_LIST_REMOVE; + if (!num) + { + ecore_x_window_prop_property_del(win, ECORE_X_ATOM_NET_WM_ALLOWED_ACTIONS); + return; + } - ecore_x_window_prop_atom_list_change(win, ECORE_X_ATOM_NET_WM_ALLOWED_ACTIONS, - atom, on); + set = malloc(num * sizeof(Ecore_X_Atom)); + if (!set) return; + + for (i = 0; i < num; i++) + set[i] = _ecore_x_netwm_action_atom_get(action[i]); + + ecore_x_window_prop_atom_set(win, ECORE_X_ATOM_NET_WM_ALLOWED_ACTIONS, set, num); + + free(set); } EAPI int _______________________________________________ enlightenment-cvs mailing list enlightenment-cvs@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/enlightenment-cvs