Enlightenment CVS committal

Author  : kwo
Project : e16
Module  : e

Dir     : e16/e/src


Modified Files:
      Tag: branch-exp
        Makefile.am ecore-e16.c ecore-e16.h ewmh.c icccm.c setup.c 


Log Message:
Atom stuff.
===================================================================
RCS file: /cvsroot/enlightenment/e16/e/src/Makefile.am,v
retrieving revision 1.43.2.24
retrieving revision 1.43.2.25
diff -u -3 -r1.43.2.24 -r1.43.2.25
--- Makefile.am 30 Nov 2004 23:31:51 -0000      1.43.2.24
+++ Makefile.am 8 Dec 2004 20:06:14 -0000       1.43.2.25
@@ -18,6 +18,7 @@
 endif
 e16_SOURCES = \
        E.h                     \
+       ecompmgr.h              \
        econfig.h               \
        ecore-e16.h             \
        emodule.h               \
===================================================================
RCS file: /cvsroot/enlightenment/e16/e/src/Attic/ecore-e16.c,v
retrieving revision 1.1.2.5
retrieving revision 1.1.2.6
diff -u -3 -r1.1.2.5 -r1.1.2.6
--- ecore-e16.c 29 Nov 2004 23:29:29 -0000      1.1.2.5
+++ ecore-e16.c 8 Dec 2004 20:06:14 -0000       1.1.2.6
@@ -28,19 +28,19 @@
 #define _ATOM_GET(name) \
    XInternAtom(_ecore_x_disp, name, False)
 
-#define _ATOM_SET_UTF8_STRING(atom, win, string) \
-   XChangeProperty(_ecore_x_disp, win, atom, _ecore_x_atom_utf8_string, 8, 
PropModeReplace, \
+#define _ATOM_SET_UTF8_STRING(win, atom, string) \
+   XChangeProperty(_ecore_x_disp, win, atom, ECORE_X_ATOM_UTF8_STRING, 8, 
PropModeReplace, \
                    (unsigned char *)string, strlen(string))
-#define _ATOM_SET_UTF8_STRING_LIST(atom, win, string, cnt) \
-   XChangeProperty(_ecore_x_disp, win, atom, _ecore_x_atom_utf8_string, 8, 
PropModeReplace, \
+#define _ATOM_SET_UTF8_STRING_LIST(win, atom, string, cnt) \
+   XChangeProperty(_ecore_x_disp, win, atom, ECORE_X_ATOM_UTF8_STRING, 8, 
PropModeReplace, \
                    (unsigned char *)string, cnt)
-#define _ATOM_SET_WINDOW(atom, win, p_wins, cnt) \
+#define _ATOM_SET_WINDOW(win, atom, p_wins, cnt) \
    XChangeProperty(_ecore_x_disp, win, atom, XA_WINDOW, 32, PropModeReplace, \
                    (unsigned char *)p_wins, cnt)
-#define _ATOM_SET_ATOM(atom, win, p_atom, cnt) \
+#define _ATOM_SET_ATOM(win, atom, p_atom, cnt) \
    XChangeProperty(_ecore_x_disp, win, atom, XA_ATOM, 32, PropModeReplace, \
                    (unsigned char *)p_atom, cnt)
-#define _ATOM_SET_CARD32(atom, win, p_val, cnt) \
+#define _ATOM_SET_CARD32(win, atom, p_val, cnt) \
    XChangeProperty(_ecore_x_disp, win, atom, XA_CARDINAL, 32, PropModeReplace, 
\
                    (unsigned char *)p_val, cnt)
 
@@ -93,6 +93,69 @@
 }
 
 /*
+ * Set CARD32 (array) property
+ */
+void
+ecore_x_window_prop_card32_set(Ecore_X_Window win, Ecore_X_Atom atom,
+                              unsigned int *val, unsigned int num)
+{
+#if SIZEOF_INT == 4
+   _ATOM_SET_CARD32(win, atom, val, num);
+#else
+   CARD32             *c32;
+   unsigned int        i;
+
+   c32 = malloc(num * sizeof(CARD32));
+   if (!c32)
+      return;
+   for (i = 0; i < num; i++)
+      c32[i] = val[i];
+   _ATOM_SET_CARD32(win, atom, c32, num);
+   free(c32);
+#endif
+}
+
+/*
+ * Get CARD32 (array) property
+ *
+ * At most len items are returned in val.
+ * If the property was successfully fetched the number of items stored in
+ * val is returned, otherwise -1 is returned.
+ * Note: Return value 0 means that the property exists but has no elements.
+ */
+int
+ecore_x_window_prop_card32_get(Ecore_X_Window win, Ecore_X_Atom atom,
+                              unsigned int *val, unsigned int len)
+{
+   unsigned char      *prop_ret;
+   Atom                type_ret;
+   unsigned long       bytes_after, num_ret;
+   int                 format_ret;
+   unsigned int        i;
+
+   prop_ret = NULL;
+   XGetWindowProperty(_ecore_x_disp, win, atom, 0, 0x7fffffff, False,
+                     ECORE_X_ATOM_UTF8_STRING, &type_ret,
+                     &format_ret, &num_ret, &bytes_after, &prop_ret);
+   if (prop_ret && num_ret > 0 && format_ret == 32)
+     {
+       if (num_ret < len)
+          len = num_ret;
+       for (i = 0; i < len; i++)
+          val[i] = prop_ret[i];
+     }
+   else
+     {
+       if (!prop_ret || format_ret != 32)
+          len = -1;
+     }
+   if (prop_ret)
+      XFree(prop_ret);
+
+   return len;
+}
+
+/*
  * Set UTF-8 string property
  */
 static void
@@ -109,27 +172,27 @@
 _ecore_x_window_prop_string_utf8_get(Ecore_X_Window win, Ecore_X_Atom atom)
 {
    char               *str;
-   unsigned char      *prop_return;
+   unsigned char      *prop_ret;
    Atom                type_ret;
    unsigned long       bytes_after, num_ret;
    int                 format_ret;
 
    str = NULL;
-   prop_return = NULL;
+   prop_ret = NULL;
    XGetWindowProperty(_ecore_x_disp, win, atom, 0, 0x7fffffff, False,
-                     _ecore_x_atom_utf8_string, &type_ret,
-                     &format_ret, &num_ret, &bytes_after, &prop_return);
-   if (prop_return && num_ret > 0 && format_ret == 8)
+                     ECORE_X_ATOM_UTF8_STRING, &type_ret,
+                     &format_ret, &num_ret, &bytes_after, &prop_ret);
+   if (prop_ret && num_ret > 0 && format_ret == 8)
      {
        str = malloc(num_ret + 1);
        if (str)
          {
-            memcpy(str, prop_return, num_ret);
+            memcpy(str, prop_ret, num_ret);
             str[num_ret] = '\0';
          }
      }
-   if (prop_return)
-      XFree(prop_return);
+   if (prop_ret)
+      XFree(prop_ret);
 
    return str;
 }
@@ -137,27 +200,25 @@
 /*
  * ICCCM stuff
  */
-Atom                _ecore_x_atom_wm_state = 0;
-Atom                _ecore_x_atom_wm_protocols = 0;
-Atom                _ecore_x_atom_wm_delete_window = 0;
-Atom                _ecore_x_atom_wm_take_focus = 0;
+Atom                ECORE_X_ATOM_WM_STATE = 0;
+Atom                ECORE_X_ATOM_WM_PROTOCOLS = 0;
+Atom                ECORE_X_ATOM_WM_DELETE_WINDOW = 0;
+Atom                ECORE_X_ATOM_WM_TAKE_FOCUS = 0;
 
 #if 0
-Atom                _ecore_x_atom_wm_save_yourself = 0;
+Atom                ECORE_X_ATOM_WM_SAVE_YOURSELF = 0;
 #endif
 
 void
 ecore_x_icccm_init(void)
 {
-   _ecore_x_atom_wm_state = XInternAtom(disp, "WM_STATE", False);
+   ECORE_X_ATOM_WM_STATE = XInternAtom(disp, "WM_STATE", False);
 
-   _ecore_x_atom_wm_protocols = XInternAtom(disp, "WM_PROTOCOLS", False);
-   _ecore_x_atom_wm_delete_window =
-      XInternAtom(disp, "WM_DELETE_WINDOW", False);
-   _ecore_x_atom_wm_take_focus = XInternAtom(disp, "WM_TAKE_FOCUS", False);
+   ECORE_X_ATOM_WM_PROTOCOLS = XInternAtom(disp, "WM_PROTOCOLS", False);
+   ECORE_X_ATOM_WM_DELETE_WINDOW = XInternAtom(disp, "WM_DELETE_WINDOW", 
False);
+   ECORE_X_ATOM_WM_TAKE_FOCUS = XInternAtom(disp, "WM_TAKE_FOCUS", False);
 #if 0
-   _ecore_x_atom_wm_save_yourself =
-      XInternAtom(disp, "WM_SAVE_YOURSELF", False);
+   ECORE_X_ATOM_WM_SAVE_YOURSELF = XInternAtom(disp, "WM_SAVE_YOURSELF", 
False);
 #endif
 }
 
@@ -168,8 +229,8 @@
 
    c[0] = state;
    c[1] = 0;
-   XChangeProperty(_ecore_x_disp, win, _ecore_x_atom_wm_state,
-                  _ecore_x_atom_wm_state, 32, PropModeReplace,
+   XChangeProperty(_ecore_x_disp, win, ECORE_X_ATOM_WM_STATE,
+                  ECORE_X_ATOM_WM_STATE, 32, PropModeReplace,
                   (unsigned char *)c, 2);
 }
 
@@ -195,27 +256,27 @@
 ecore_x_icccm_client_message_send(Ecore_X_Window win,
                                  Ecore_X_Atom atom, Ecore_X_Time ts)
 {
-   ecore_x_client_message32_send(win, _ecore_x_atom_wm_protocols, atom, ts,
+   ecore_x_client_message32_send(win, ECORE_X_ATOM_WM_PROTOCOLS, atom, ts,
                                 0, 0, 0);
 }
 
 void
 ecore_x_icccm_delete_window_send(Ecore_X_Window win, Ecore_X_Time ts)
 {
-   ecore_x_icccm_client_message_send(win, _ecore_x_atom_wm_delete_window, ts);
+   ecore_x_icccm_client_message_send(win, ECORE_X_ATOM_WM_DELETE_WINDOW, ts);
 }
 
 void
 ecore_x_icccm_take_focus_send(Ecore_X_Window win, Ecore_X_Time ts)
 {
-   ecore_x_icccm_client_message_send(win, _ecore_x_atom_wm_take_focus, ts);
+   ecore_x_icccm_client_message_send(win, ECORE_X_ATOM_WM_TAKE_FOCUS, ts);
 }
 
 #if 0
 void
 ecore_x_icccm_save_yourself_send(Ecore_X_Window win, Ecore_X_Time ts)
 {
-   ecore_x_icccm_client_message_send(win, _ecore_x_atom_wm_save_yourself, ts);
+   ecore_x_icccm_client_message_send(win, ECORE_X_ATOM_WM_SAVE_YOURSELF, ts);
 }
 #endif
 
@@ -223,109 +284,106 @@
  * _NET_WM hints (EWMH)
  */
 #ifndef USE_ECORE_X
-Atom                _ecore_x_atom_utf8_string;
+Atom                ECORE_X_ATOM_UTF8_STRING;
+
+Atom                ECORE_X_ATOM_NET_SUPPORTED;
+Atom                ECORE_X_ATOM_NET_SUPPORTING_WM_CHECK;
 
-Atom                _ecore_x_atom_net_supported;
-Atom                _ecore_x_atom_net_supporting_wm_check;
+Atom                ECORE_X_ATOM_NET_NUMBER_OF_DESKTOPS;
+Atom                ECORE_X_ATOM_NET_VIRTUAL_ROOTS;
+Atom                ECORE_X_ATOM_NET_DESKTOP_NAMES;
+Atom                ECORE_X_ATOM_NET_DESKTOP_GEOMETRY;
+Atom                ECORE_X_ATOM_NET_WORKAREA;
+Atom                ECORE_X_ATOM_NET_CURRENT_DESKTOP;
+Atom                ECORE_X_ATOM_NET_DESKTOP_VIEWPORT;
+Atom                ECORE_X_ATOM_NET_SHOWING_DESKTOP;
+
+Atom                ECORE_X_ATOM_NET_CLIENT_LIST;
+Atom                ECORE_X_ATOM_NET_CLIENT_LIST_STACKING;
+Atom                ECORE_X_ATOM_NET_ACTIVE_WINDOW;
+
+Atom                ECORE_X_ATOM_NET_WM_NAME;
+Atom                ECORE_X_ATOM_NET_WM_VISIBLE_NAME;
+Atom                ECORE_X_ATOM_NET_WM_ICON_NAME;
+Atom                ECORE_X_ATOM_NET_WM_VISIBLE_ICON_NAME;
 
-Atom                _ecore_x_atom_net_number_of_desktops;
-Atom                _ecore_x_atom_net_virtual_roots;
-Atom                _ecore_x_atom_net_desktop_names;
-Atom                _ecore_x_atom_net_desktop_geometry;
-Atom                _ecore_x_atom_net_workarea;
-Atom                _ecore_x_atom_net_current_desktop;
-Atom                _ecore_x_atom_net_desktop_viewport;
-Atom                _ecore_x_atom_net_showing_desktop;
-
-Atom                _ecore_x_atom_net_client_list;
-Atom                _ecore_x_atom_net_client_list_stacking;
-Atom                _ecore_x_atom_net_active_window;
-
-Atom                _ecore_x_atom_net_wm_name;
-Atom                _ecore_x_atom_net_wm_visible_name;
-Atom                _ecore_x_atom_net_wm_icon_name;
-Atom                _ecore_x_atom_net_wm_visible_icon_name;
+Atom                ECORE_X_ATOM_NET_WM_DESKTOP;
+Atom                ECORE_X_ATOM_NET_WM_WINDOW_OPACITY;
 
 void
 ecore_x_netwm_init(void)
 {
-   _ecore_x_atom_utf8_string = XInternAtom(_ecore_x_disp, "UTF8_STRING", 
False);
+   ECORE_X_ATOM_UTF8_STRING = XInternAtom(_ecore_x_disp, "UTF8_STRING", False);
 
-   _ecore_x_atom_net_supported = _ATOM_GET("_NET_SUPPORTED");
-   _ecore_x_atom_net_supporting_wm_check =
-      _ATOM_GET("_NET_SUPPORTING_WM_CHECK");
-
-   _ecore_x_atom_net_number_of_desktops = _ATOM_GET("_NET_NUMBER_OF_DESKTOPS");
-   _ecore_x_atom_net_virtual_roots = _ATOM_GET("_NET_VIRTUAL_ROOTS");
-   _ecore_x_atom_net_desktop_geometry = _ATOM_GET("_NET_DESKTOP_GEOMETRY");
-   _ecore_x_atom_net_desktop_names = _ATOM_GET("_NET_DESKTOP_NAMES");
-   _ecore_x_atom_net_current_desktop = _ATOM_GET("_NET_CURRENT_DESKTOP");
-   _ecore_x_atom_net_desktop_viewport = _ATOM_GET("_NET_DESKTOP_VIEWPORT");
-   _ecore_x_atom_net_workarea = _ATOM_GET("_NET_WORKAREA");
+   ECORE_X_ATOM_NET_SUPPORTED = _ATOM_GET("_NET_SUPPORTED");
+   ECORE_X_ATOM_NET_SUPPORTING_WM_CHECK = 
_ATOM_GET("_NET_SUPPORTING_WM_CHECK");
 
-   _ecore_x_atom_net_client_list = _ATOM_GET("_NET_CLIENT_LIST");
-   _ecore_x_atom_net_client_list_stacking =
+   ECORE_X_ATOM_NET_NUMBER_OF_DESKTOPS = _ATOM_GET("_NET_NUMBER_OF_DESKTOPS");
+   ECORE_X_ATOM_NET_VIRTUAL_ROOTS = _ATOM_GET("_NET_VIRTUAL_ROOTS");
+   ECORE_X_ATOM_NET_DESKTOP_GEOMETRY = _ATOM_GET("_NET_DESKTOP_GEOMETRY");
+   ECORE_X_ATOM_NET_DESKTOP_NAMES = _ATOM_GET("_NET_DESKTOP_NAMES");
+   ECORE_X_ATOM_NET_CURRENT_DESKTOP = _ATOM_GET("_NET_CURRENT_DESKTOP");
+   ECORE_X_ATOM_NET_DESKTOP_VIEWPORT = _ATOM_GET("_NET_DESKTOP_VIEWPORT");
+   ECORE_X_ATOM_NET_WORKAREA = _ATOM_GET("_NET_WORKAREA");
+
+   ECORE_X_ATOM_NET_CLIENT_LIST = _ATOM_GET("_NET_CLIENT_LIST");
+   ECORE_X_ATOM_NET_CLIENT_LIST_STACKING =
       _ATOM_GET("_NET_CLIENT_LIST_STACKING");
-   _ecore_x_atom_net_active_window = _ATOM_GET("_NET_ACTIVE_WINDOW");
+   ECORE_X_ATOM_NET_ACTIVE_WINDOW = _ATOM_GET("_NET_ACTIVE_WINDOW");
 
 #if 0
-   _ecore_x_atom_net_close_window = _ATOM_GET("_NET_CLOSE_WINDOW");
-   _ecore_x_atom_net_wm_moveresize = _ATOM_GET("_NET_WM_MOVERESIZE");
+   ECORE_X_ATOM_NET_CLOSE_WINDOW = _ATOM_GET("_NET_CLOSE_WINDOW");
+   ECORE_X_ATOM_NET_WM_MOVERESIZE = _ATOM_GET("_NET_WM_MOVERESIZE");
 #endif
 
-   _ecore_x_atom_net_wm_name = _ATOM_GET("_NET_WM_NAME");
-   _ecore_x_atom_net_wm_visible_name = _ATOM_GET("_NET_WM_VISIBLE_NAME");
-   _ecore_x_atom_net_wm_icon_name = _ATOM_GET("_NET_WM_ICON_NAME");
-   _ecore_x_atom_net_wm_visible_icon_name =
+   ECORE_X_ATOM_NET_WM_NAME = _ATOM_GET("_NET_WM_NAME");
+   ECORE_X_ATOM_NET_WM_VISIBLE_NAME = _ATOM_GET("_NET_WM_VISIBLE_NAME");
+   ECORE_X_ATOM_NET_WM_ICON_NAME = _ATOM_GET("_NET_WM_ICON_NAME");
+   ECORE_X_ATOM_NET_WM_VISIBLE_ICON_NAME =
       _ATOM_GET("_NET_WM_VISIBLE_ICON_NAME");
+   ECORE_X_ATOM_NET_WM_DESKTOP = _ATOM_GET("_NET_WM_DESKTOP");
 #if 0
-   _ecore_x_atom_net_wm_desktop = _ATOM_GET("_NET_WM_DESKTOP");
-   _ecore_x_atom_net_wm_window_type = _ATOM_GET("_NET_WM_WINDOW_TYPE");
-   _ecore_x_atom_net_wm_state = _ATOM_GET("_NET_WM_STATE");
-   _ecore_x_atom_net_wm_allowed_actions = _ATOM_GET("_NET_WM_ALLOWED_ACTIONS");
-   _ecore_x_atom_net_wm_strut = _ATOM_GET("_NET_WM_STRUT");
-   _ecore_x_atom_net_wm_strut_partial = _ATOM_GET("_NET_WM_STRUT_PARTIAL");
-   _ecore_x_atom_net_wm_icon_geometry = _ATOM_GET("_NET_WM_ICON_GEOMETRY");
-   _ecore_x_atom_net_wm_icon = _ATOM_GET("_NET_WM_ICON");
-   _ecore_x_atom_net_wm_pid = _ATOM_GET("_NET_WM_PID");
-   _ecore_x_atom_net_wm_user_time = _ATOM_GET("_NET_WM_USER_TIME");
+   ECORE_X_ATOM_NET_WM_WINDOW_TYPE = _ATOM_GET("_NET_WM_WINDOW_TYPE");
+   ECORE_X_ATOM_NET_WM_STATE = _ATOM_GET("_NET_WM_STATE");
+   ECORE_X_ATOM_NET_WM_ALLOWED_ACTIONS = _ATOM_GET("_NET_WM_ALLOWED_ACTIONS");
+   ECORE_X_ATOM_NET_WM_STRUT = _ATOM_GET("_NET_WM_STRUT");
+   ECORE_X_ATOM_NET_WM_STRUT_PARTIAL = _ATOM_GET("_NET_WM_STRUT_PARTIAL");
+   ECORE_X_ATOM_NET_WM_ICON_GEOMETRY = _ATOM_GET("_NET_WM_ICON_GEOMETRY");
+   ECORE_X_ATOM_NET_WM_ICON = _ATOM_GET("_NET_WM_ICON");
+   ECORE_X_ATOM_NET_WM_PID = _ATOM_GET("_NET_WM_PID");
+   ECORE_X_ATOM_NET_WM_USER_TIME = _ATOM_GET("_NET_WM_USER_TIME");
 
-   _ecore_x_atom_net_wm_window_type_desktop =
+   ECORE_X_ATOM_NET_WM_WINDOW_TYPE_DESKTOP =
       _ATOM_GET("_NET_WM_WINDOW_TYPE_DESKTOP");
-   _ecore_x_atom_net_wm_window_type_dock =
-      _ATOM_GET("_NET_WM_WINDOW_TYPE_DOCK");
-   _ecore_x_atom_net_wm_window_type_toolbar =
+   ECORE_X_ATOM_NET_WM_WINDOW_TYPE_DOCK = 
_ATOM_GET("_NET_WM_WINDOW_TYPE_DOCK");
+   ECORE_X_ATOM_NET_WM_WINDOW_TYPE_TOOLBAR =
       _ATOM_GET("_NET_WM_WINDOW_TYPE_TOOLBAR");
-   _ecore_x_atom_net_wm_window_type_menu =
-      _ATOM_GET("_NET_WM_WINDOW_TYPE_MENU");
-   _ecore_x_atom_net_wm_window_type_utility =
+   ECORE_X_ATOM_NET_WM_WINDOW_TYPE_MENU = 
_ATOM_GET("_NET_WM_WINDOW_TYPE_MENU");
+   ECORE_X_ATOM_NET_WM_WINDOW_TYPE_UTILITY =
       _ATOM_GET("_NET_WM_WINDOW_TYPE_UTILITY");
-   _ecore_x_atom_net_wm_window_type_splash =
+   ECORE_X_ATOM_NET_WM_WINDOW_TYPE_SPLASH =
       _ATOM_GET("_NET_WM_WINDOW_TYPE_SPLASH");
-   _ecore_x_atom_net_wm_window_type_dialog =
+   ECORE_X_ATOM_NET_WM_WINDOW_TYPE_DIALOG =
       _ATOM_GET("_NET_WM_WINDOW_TYPE_DIALOG");
-   _ecore_x_atom_net_wm_window_type_normal =
+   ECORE_X_ATOM_NET_WM_WINDOW_TYPE_NORMAL =
       _ATOM_GET("_NET_WM_WINDOW_TYPE_NORMAL");
 
-   _ecore_x_atom_net_wm_state_modal = _ATOM_GET("_NET_WM_STATE_MODAL");
-   _ecore_x_atom_net_wm_state_sticky = _ATOM_GET("_NET_WM_STATE_STICKY");
-   _ecore_x_atom_net_wm_state_maximized_vert =
+   ECORE_X_ATOM_NET_WM_STATE_MODAL = _ATOM_GET("_NET_WM_STATE_MODAL");
+   ECORE_X_ATOM_NET_WM_STATE_STICKY = _ATOM_GET("_NET_WM_STATE_STICKY");
+   ECORE_X_ATOM_NET_WM_STATE_MAXIMIZED_VERT =
       _ATOM_GET("_NET_WM_STATE_MAXIMIZED_VERT");
-   _ecore_x_atom_net_wm_state_maximized_horz =
+   ECORE_X_ATOM_NET_WM_STATE_MAXIMIZED_HORZ =
       _ATOM_GET("_NET_WM_STATE_MAXIMIZED_HORZ");
-   _ecore_x_atom_net_wm_state_shaded = _ATOM_GET("_NET_WM_STATE_SHADED");
-   _ecore_x_atom_net_wm_state_skip_taskbar =
+   ECORE_X_ATOM_NET_WM_STATE_SHADED = _ATOM_GET("_NET_WM_STATE_SHADED");
+   ECORE_X_ATOM_NET_WM_STATE_SKIP_TASKBAR =
       _ATOM_GET("_NET_WM_STATE_SKIP_TASKBAR");
-   _ecore_x_atom_net_wm_state_skip_pager =
-      _ATOM_GET("_NET_WM_STATE_SKIP_PAGER");
-   _ecore_x_atom_net_wm_state_hidden = _ATOM_GET("_NET_WM_STATE_HIDDEN");
-   _ecore_x_atom_net_wm_state_fullscreen =
-      _ATOM_GET("_NET_WM_STATE_FULLSCREEN");
-   _ecore_x_atom_net_wm_state_above = _ATOM_GET("_NET_WM_STATE_ABOVE");
-   _ecore_x_atom_net_wm_state_below = _ATOM_GET("_NET_WM_STATE_BELOW");
-
-   _ecore_x_atom_net_wm_window_opacity = _ATOM_GET("_NET_WM_WINDOW_OPACITY");
+   ECORE_X_ATOM_NET_WM_STATE_SKIP_PAGER = 
_ATOM_GET("_NET_WM_STATE_SKIP_PAGER");
+   ECORE_X_ATOM_NET_WM_STATE_HIDDEN = _ATOM_GET("_NET_WM_STATE_HIDDEN");
+   ECORE_X_ATOM_NET_WM_STATE_FULLSCREEN = 
_ATOM_GET("_NET_WM_STATE_FULLSCREEN");
+   ECORE_X_ATOM_NET_WM_STATE_ABOVE = _ATOM_GET("_NET_WM_STATE_ABOVE");
+   ECORE_X_ATOM_NET_WM_STATE_BELOW = _ATOM_GET("_NET_WM_STATE_BELOW");
 #endif
+   ECORE_X_ATOM_NET_WM_WINDOW_OPACITY = _ATOM_GET("_NET_WM_WINDOW_OPACITY");
 }
 #endif
 
@@ -336,11 +394,11 @@
 ecore_x_netwm_wm_identify(Ecore_X_Window root, Ecore_X_Window check,
                          const char *wm_name)
 {
-   _ATOM_SET_WINDOW(_ecore_x_atom_net_supporting_wm_check, root, &check, 1);
-   _ATOM_SET_WINDOW(_ecore_x_atom_net_supporting_wm_check, check, &check, 1);
-   _ATOM_SET_UTF8_STRING(_ecore_x_atom_net_wm_name, check, wm_name);
+   _ATOM_SET_WINDOW(root, ECORE_X_ATOM_NET_SUPPORTING_WM_CHECK, &check, 1);
+   _ATOM_SET_WINDOW(check, ECORE_X_ATOM_NET_SUPPORTING_WM_CHECK, &check, 1);
+   _ATOM_SET_UTF8_STRING(check, ECORE_X_ATOM_NET_WM_NAME, wm_name);
    /* This one isn't mandatory */
-   _ATOM_SET_UTF8_STRING(_ecore_x_atom_net_wm_name, root, wm_name);
+   _ATOM_SET_UTF8_STRING(root, ECORE_X_ATOM_NET_WM_NAME, wm_name);
 }
 
 /*
@@ -348,28 +406,27 @@
  */
 
 void
-ecore_x_netwm_desk_count_set(Ecore_X_Window root, int n_desks)
+ecore_x_netwm_desk_count_set(Ecore_X_Window root, unsigned int n_desks)
 {
-   CARD32              val;
-
-   val = n_desks;
-   _ATOM_SET_CARD32(_ecore_x_atom_net_number_of_desktops, root, &val, 1);
+   ecore_x_window_prop_card32_set(root, ECORE_X_ATOM_NET_NUMBER_OF_DESKTOPS,
+                                 &n_desks, 1);
 }
 
 void
-ecore_x_netwm_desk_roots_set(Ecore_X_Window root, int n_desks,
+ecore_x_netwm_desk_roots_set(Ecore_X_Window root, unsigned int n_desks,
                             Ecore_X_Window * vroots)
 {
-   _ATOM_SET_WINDOW(_ecore_x_atom_net_virtual_roots, root, vroots, n_desks);
+   _ATOM_SET_WINDOW(root, ECORE_X_ATOM_NET_VIRTUAL_ROOTS, vroots, n_desks);
 }
 
 void
-ecore_x_netwm_desk_names_set(Ecore_X_Window root, int n_desks,
+ecore_x_netwm_desk_names_set(Ecore_X_Window root, unsigned int n_desks,
                             const char **names)
 {
    char                ss[32], *buf;
    const char         *s;
-   int                 i, l, len;
+   unsigned int        i;
+   int                 l, len;
 
    buf = NULL;
    len = 0;
@@ -390,75 +447,54 @@
        len += l;
      }
 
-   _ATOM_SET_UTF8_STRING_LIST(_ecore_x_atom_net_desktop_names, root, buf, len);
+   _ATOM_SET_UTF8_STRING_LIST(root, ECORE_X_ATOM_NET_DESKTOP_NAMES, buf, len);
 
    free(buf);
 }
 
 void
-ecore_x_netwm_desk_size_set(Ecore_X_Window root, int width, int height)
+ecore_x_netwm_desk_size_set(Ecore_X_Window root, unsigned int width,
+                           unsigned int height)
 {
-   CARD32              size[2];
+   unsigned int        size[2];
 
    size[0] = width;
    size[1] = height;
-   _ATOM_SET_CARD32(_ecore_x_atom_net_desktop_geometry, root, &size, 2);
+   ecore_x_window_prop_card32_set(root, ECORE_X_ATOM_NET_DESKTOP_GEOMETRY, 
size,
+                                 2);
 }
 
 void
-ecore_x_netwm_desk_workareas_set(Ecore_X_Window root, int n_desks, int *areas)
+ecore_x_netwm_desk_workareas_set(Ecore_X_Window root, unsigned int n_desks,
+                                unsigned int *areas)
 {
-   CARD32             *p_coord;
-   int                 n_coord, i;
-
-   n_coord = 4 * n_desks;
-   p_coord = malloc(n_coord * sizeof(CARD32));
-   if (!p_coord)
-      return;
-
-   for (i = 0; i < n_coord; i++)
-      p_coord[i] = areas[i];
-
-   _ATOM_SET_CARD32(_ecore_x_atom_net_workarea, root, p_coord, n_coord);
-
-   free(p_coord);
+   ecore_x_window_prop_card32_set(root, ECORE_X_ATOM_NET_WORKAREA, areas,
+                                 4 * n_desks);
 }
 
 void
-ecore_x_netwm_desk_current_set(Ecore_X_Window root, int desk)
+ecore_x_netwm_desk_current_set(Ecore_X_Window root, unsigned int desk)
 {
-   CARD32              val;
-
-   val = desk;
-   _ATOM_SET_CARD32(_ecore_x_atom_net_current_desktop, root, &val, 1);
+   ecore_x_window_prop_card32_set(root, ECORE_X_ATOM_NET_CURRENT_DESKTOP, 
&desk,
+                                 1);
 }
 
 void
-ecore_x_netwm_desk_viewports_set(Ecore_X_Window root, int n_desks, int 
*origins)
+ecore_x_netwm_desk_viewports_set(Ecore_X_Window root, unsigned int n_desks,
+                                unsigned int *origins)
 {
-   CARD32             *p_coord;
-   int                 n_coord, i;
-
-   n_coord = 2 * n_desks;
-   p_coord = malloc(n_coord * sizeof(CARD32));
-   if (!p_coord)
-      return;
-
-   for (i = 0; i < n_coord; i++)
-      p_coord[i] = origins[i];
-
-   _ATOM_SET_CARD32(_ecore_x_atom_net_desktop_viewport, root, p_coord, 
n_coord);
-
-   free(p_coord);
+   ecore_x_window_prop_card32_set(root, ECORE_X_ATOM_NET_DESKTOP_VIEWPORT,
+                                 origins, 2 * n_desks);
 }
 
 void
 ecore_x_netwm_showing_desktop_set(Ecore_X_Window root, int on)
 {
-   CARD32              val;
+   unsigned int        val;
 
-   val = on;
-   _ATOM_SET_CARD32(_ecore_x_atom_net_showing_desktop, root, &val, 1);
+   val = (on) ? 1 : 0;
+   ecore_x_window_prop_card32_set(root, ECORE_X_ATOM_NET_SHOWING_DESKTOP, &val,
+                                 1);
 }
 
 /*
@@ -467,25 +503,26 @@
 
 /* Mapping order */
 void
-ecore_x_netwm_client_list_set(Ecore_X_Window root, int n_clients,
+ecore_x_netwm_client_list_set(Ecore_X_Window root, unsigned int n_clients,
                              Ecore_X_Window * p_clients)
 {
-   _ATOM_SET_WINDOW(_ecore_x_atom_net_client_list, root, p_clients, n_clients);
+   _ATOM_SET_WINDOW(root, ECORE_X_ATOM_NET_CLIENT_LIST, p_clients, n_clients);
 }
 
 /* Stacking order */
 void
-ecore_x_netwm_client_list_stacking_set(Ecore_X_Window root, int n_clients,
+ecore_x_netwm_client_list_stacking_set(Ecore_X_Window root,
+                                      unsigned int n_clients,
                                       Ecore_X_Window * p_clients)
 {
-   _ATOM_SET_WINDOW(_ecore_x_atom_net_client_list_stacking, root, p_clients,
+   _ATOM_SET_WINDOW(root, ECORE_X_ATOM_NET_CLIENT_LIST_STACKING, p_clients,
                    n_clients);
 }
 
 void
 ecore_x_netwm_client_active_set(Ecore_X_Window root, Ecore_X_Window win)
 {
-   _ATOM_SET_WINDOW(_ecore_x_atom_net_active_window, root, &win, 1);
+   _ATOM_SET_WINDOW(root, ECORE_X_ATOM_NET_ACTIVE_WINDOW, &win, 1);
 }
 
 /*
@@ -495,19 +532,19 @@
 void
 ecore_x_netwm_name_set(Ecore_X_Window win, const char *name)
 {
-   _ecore_x_window_prop_string_utf8_set(_ecore_x_atom_net_wm_name, win, name);
+   _ecore_x_window_prop_string_utf8_set(win, ECORE_X_ATOM_NET_WM_NAME, name);
 }
 
 char               *
 ecore_x_netwm_name_get(Ecore_X_Window win)
 {
-   return _ecore_x_window_prop_string_utf8_get(win, _ecore_x_atom_net_wm_name);
+   return _ecore_x_window_prop_string_utf8_get(win, ECORE_X_ATOM_NET_WM_NAME);
 }
 
 void
 ecore_x_netwm_visible_name_set(Ecore_X_Window win, const char *name)
 {
-   _ecore_x_window_prop_string_utf8_set(_ecore_x_atom_net_wm_visible_name, win,
+   _ecore_x_window_prop_string_utf8_set(win, ECORE_X_ATOM_NET_WM_VISIBLE_NAME,
                                        name);
 }
 
@@ -515,13 +552,13 @@
 ecore_x_netwm_visible_name_get(Ecore_X_Window win)
 {
    return _ecore_x_window_prop_string_utf8_get(win,
-                                              
_ecore_x_atom_net_wm_visible_name);
+                                              
ECORE_X_ATOM_NET_WM_VISIBLE_NAME);
 }
 
 void
 ecore_x_netwm_icon_name_set(Ecore_X_Window win, const char *name)
 {
-   _ecore_x_window_prop_string_utf8_set(_ecore_x_atom_net_wm_icon_name, win,
+   _ecore_x_window_prop_string_utf8_set(win, ECORE_X_ATOM_NET_WM_ICON_NAME,
                                        name);
 }
 
@@ -529,21 +566,50 @@
 ecore_x_netwm_icon_name_get(Ecore_X_Window win)
 {
    return _ecore_x_window_prop_string_utf8_get(win,
-                                              _ecore_x_atom_net_wm_icon_name);
+                                              ECORE_X_ATOM_NET_WM_ICON_NAME);
 }
 
 void
 ecore_x_netwm_visible_icon_name_set(Ecore_X_Window win, const char *name)
 {
-   _ecore_x_window_prop_string_utf8_set(_ecore_x_atom_net_wm_visible_icon_name,
-                                       win, name);
+   _ecore_x_window_prop_string_utf8_set(win,
+                                       ECORE_X_ATOM_NET_WM_VISIBLE_ICON_NAME,
+                                       name);
 }
 
 char               *
 ecore_x_netwm_visible_icon_name_get(Ecore_X_Window win)
 {
    return _ecore_x_window_prop_string_utf8_get(win,
-                                              
_ecore_x_atom_net_wm_visible_icon_name);
+                                              
ECORE_X_ATOM_NET_WM_VISIBLE_ICON_NAME);
+}
+
+void
+ecore_x_netwm_desktop_set(Ecore_X_Window win, unsigned int desk)
+{
+   ecore_x_window_prop_card32_set(win, ECORE_X_ATOM_NET_WM_DESKTOP, &desk, 1);
+}
+
+int
+ecore_x_netwm_desktop_get(Ecore_X_Window win, unsigned int *desk)
+{
+   return ecore_x_window_prop_card32_get(win, ECORE_X_ATOM_NET_WM_DESKTOP,
+                                        desk, 1);
+}
+
+void
+ecore_x_netwm_opacity_set(Ecore_X_Window win, unsigned int opacity)
+{
+   ecore_x_window_prop_card32_set(win, ECORE_X_ATOM_NET_WM_WINDOW_OPACITY,
+                                 &opacity, 1);
+}
+
+int
+ecore_x_netwm_opacity_get(Ecore_X_Window win, unsigned int *opacity)
+{
+   return ecore_x_window_prop_card32_get(win,
+                                        ECORE_X_ATOM_NET_WM_WINDOW_OPACITY,
+                                        opacity, 1);
 }
 
 #endif /* USE_ECORE_X */
===================================================================
RCS file: /cvsroot/enlightenment/e16/e/src/Attic/ecore-e16.h,v
retrieving revision 1.1.2.9
retrieving revision 1.1.2.10
diff -u -3 -r1.1.2.9 -r1.1.2.10
--- ecore-e16.h 29 Nov 2004 23:29:29 -0000      1.1.2.9
+++ ecore-e16.h 8 Dec 2004 20:06:16 -0000       1.1.2.10
@@ -47,42 +47,53 @@
                                                  long d0, long d1, long d2,
                                                  long d3, long d4);
 
+void                ecore_x_window_prop_card32_set(Ecore_X_Window win,
+                                                  Ecore_X_Atom atom,
+                                                  unsigned int *val,
+                                                  unsigned int num);
+int                 ecore_x_window_prop_card32_get(Ecore_X_Window win,
+                                                  Ecore_X_Atom atom,
+                                                  unsigned int *val,
+                                                  unsigned int len);
+
 void                ecore_x_icccm_delete_window_send(Ecore_X_Window win,
                                                     Ecore_X_Time ts);
 void                ecore_x_icccm_take_focus_send(Ecore_X_Window win,
                                                  Ecore_X_Time ts);
 
 /* Misc. */
-extern Atom         _ecore_x_atom_utf8_string;
+extern Atom         ECORE_X_ATOM_UTF8_STRING;
 
 /* ICCCM */
-extern Atom         _ecore_x_atom_wm_state;
-extern Atom         _ecore_x_atom_wm_protocols;
-extern Atom         _ecore_x_atom_wm_delete_window;
-extern Atom         _ecore_x_atom_wm_take_focus;
+extern Atom         ECORE_X_ATOM_WM_STATE;
+extern Atom         ECORE_X_ATOM_WM_PROTOCOLS;
+extern Atom         ECORE_X_ATOM_WM_DELETE_WINDOW;
+extern Atom         ECORE_X_ATOM_WM_TAKE_FOCUS;
 
 #if 0
-extern Atom         _ecore_x_atom_wm_save_yourself;
+extern Atom         ECORE_X_ATOM_WM_SAVE_YOURSELF;
 #endif
 
 void                ecore_x_icccm_init(void);
 
 /* NETWM (EWMH) */
-extern Atom         _ecore_x_atom_net_supported;
-extern Atom         _ecore_x_atom_net_supporting_wm_check;
+extern Atom         ECORE_X_ATOM_NET_SUPPORTED;
+extern Atom         ECORE_X_ATOM_NET_SUPPORTING_WM_CHECK;
+
+extern Atom         ECORE_X_ATOM_NET_NUMBER_OF_DESKTOPS;
+extern Atom         ECORE_X_ATOM_NET_VIRTUAL_ROOTS;
+extern Atom         ECORE_X_ATOM_NET_DESKTOP_NAMES;
+extern Atom         ECORE_X_ATOM_NET_DESKTOP_GEOMETRY;
+extern Atom         ECORE_X_ATOM_NET_WORKAREA;
+extern Atom         ECORE_X_ATOM_NET_CURRENT_DESKTOP;
+extern Atom         ECORE_X_ATOM_NET_DESKTOP_VIEWPORT;
+extern Atom         ECORE_X_ATOM_NET_SHOWING_DESKTOP;
 
-extern Atom         _ecore_x_atom_net_number_of_desktops;
-extern Atom         _ecore_x_atom_net_virtual_roots;
-extern Atom         _ecore_x_atom_net_desktop_names;
-extern Atom         _ecore_x_atom_net_desktop_geometry;
-extern Atom         _ecore_x_atom_net_workarea;
-extern Atom         _ecore_x_atom_net_current_desktop;
-extern Atom         _ecore_x_atom_net_desktop_viewport;
-extern Atom         _ecore_x_atom_net_showing_desktop;
+extern Atom         ECORE_X_ATOM_NET_SHOWING_DESKTOP;
 
-extern Atom         _ecore_x_atom_net_showing_desktop;
+extern Atom         ECORE_X_ATOM_NET_WM_NAME;
 
-extern Atom         _ecore_x_atom_net_wm_name;
+extern Atom         ECORE_X_ATOM_NET_WM_WINDOW_OPACITY;
 
 void                ecore_x_netwm_init(void);
 
@@ -91,29 +102,33 @@
                                              const char *wm_name);
 
 void                ecore_x_netwm_desk_count_set(Ecore_X_Window root,
-                                                int n_desks);
+                                                unsigned int n_desks);
 void                ecore_x_netwm_desk_roots_set(Ecore_X_Window root,
-                                                int n_desks,
+                                                unsigned int n_desks,
                                                 Ecore_X_Window * vroots);
 void                ecore_x_netwm_desk_names_set(Ecore_X_Window root,
-                                                int n_desks,
+                                                unsigned int n_desks,
                                                 const char **names);
-void                ecore_x_netwm_desk_size_set(Ecore_X_Window root, int width,
-                                               int height);
+void                ecore_x_netwm_desk_size_set(Ecore_X_Window root,
+                                               unsigned int width,
+                                               unsigned int height);
 void                ecore_x_netwm_desk_workareas_set(Ecore_X_Window root,
-                                                    int n_desks, int *areas);
+                                                    unsigned int n_desks,
+                                                    unsigned int *areas);
 void                ecore_x_netwm_desk_current_set(Ecore_X_Window root,
-                                                  int desk);
+                                                  unsigned int desk);
 void                ecore_x_netwm_desk_viewports_set(Ecore_X_Window root,
-                                                    int n_desks, int *origins);
+                                                    unsigned int n_desks,
+                                                    unsigned int *origins);
 void                ecore_x_netwm_showing_desktop_set(Ecore_X_Window root,
                                                      int on);
 
 void                ecore_x_netwm_client_list_set(Ecore_X_Window root,
-                                                 int n_clients,
+                                                 unsigned int n_clients,
                                                  Ecore_X_Window * p_clients);
 void                ecore_x_netwm_client_list_stacking_set(Ecore_X_Window root,
-                                                          int n_clients,
+                                                          unsigned int
+                                                          n_clients,
                                                           Ecore_X_Window *
                                                           p_clients);
 void                ecore_x_netwm_client_active_set(Ecore_X_Window root,
@@ -131,6 +146,15 @@
                                                        const char *name);
 char               *ecore_x_netwm_visible_icon_name_get(Ecore_X_Window win);
 
+void                ecore_x_netwm_desktop_set(Ecore_X_Window win,
+                                             unsigned int desk);
+int                 ecore_x_netwm_desktop_get(Ecore_X_Window win,
+                                             unsigned int *desk);
+void                ecore_x_netwm_opacity_set(Ecore_X_Window win,
+                                             unsigned int opacity);
+int                 ecore_x_netwm_opacity_get(Ecore_X_Window win,
+                                             unsigned int *opacity);
+
 #endif
 
 void                ecore_x_icccm_state_set_iconic(Ecore_X_Window win);
===================================================================
RCS file: /cvsroot/enlightenment/e16/e/src/ewmh.c,v
retrieving revision 1.55.2.17
retrieving revision 1.55.2.18
diff -u -3 -r1.55.2.17 -r1.55.2.18
--- ewmh.c      29 Nov 2004 23:29:29 -0000      1.55.2.17
+++ ewmh.c      8 Dec 2004 20:06:16 -0000       1.55.2.18
@@ -28,21 +28,12 @@
 #define _ATOM_INIT(atom) atom = XInternAtom(disp, #atom, False); \
     atom_list[atom_count++] = atom
 
-#define _ATOM_SET_UTF8_STRING(atom, win, string) \
-   XChangeProperty(disp, win, atom, E_XA_UTF8_STRING, 8, PropModeReplace, \
-                   (unsigned char *)string, strlen(string))
-#define _ATOM_SET_UTF8_STRING_LIST(atom, win, string, cnt) \
-   XChangeProperty(disp, win, atom, E_XA_UTF8_STRING, 8, PropModeReplace, \
-                   (unsigned char *)string, cnt)
-#define _ATOM_SET_WINDOW(atom, win, p_wins, cnt) \
+#define _ATOM_SET_WINDOW(win, atom, p_wins, cnt) \
    XChangeProperty(disp, win, atom, XA_WINDOW, 32, PropModeReplace, \
                    (unsigned char *)p_wins, cnt)
-#define _ATOM_SET_ATOM(atom, win, p_atom, cnt) \
+#define _ATOM_SET_ATOM(win, atom, p_atom, cnt) \
    XChangeProperty(disp, win, atom, XA_ATOM, 32, PropModeReplace, \
                    (unsigned char *)p_atom, cnt)
-#define _ATOM_SET_CARD32(atom, win, p_val, cnt) \
-   XChangeProperty(disp, win, atom, XA_CARDINAL, 32, PropModeReplace, \
-                   (unsigned char *)p_val, cnt)
 
 /* Will become predefined? */
 Atom                E_XA_UTF8_STRING;
@@ -259,7 +250,7 @@
 
    _ATOM_INIT(_NET_WM_STRUT);
 
-   _ATOM_SET_ATOM(_NET_SUPPORTED, VRoot.win, atom_list, atom_count);
+   _ATOM_SET_ATOM(VRoot.win, _NET_SUPPORTED, atom_list, atom_count);
 
    /* Set WM info properties */
    ecore_x_netwm_wm_identify(VRoot.win, win_wm_check, e_wm_name);
@@ -466,15 +457,13 @@
 void
 EWMH_SetWindowDesktop(const EWin * ewin)
 {
-   CARD32              val;
+   unsigned int        val;
 
-   EDBUG(6, "EWMH_SetWindowDesktop");
    if (EoIsSticky(ewin))
       val = 0xFFFFFFFF;
    else
       val = EoGetDesk(ewin);
-   _ATOM_SET_CARD32(_NET_WM_DESKTOP, ewin->client.win, &val, 1);
-   EDBUG_RETURN_;
+   ecore_x_netwm_desktop_set(ewin->client.win, val);
 }
 
 void
@@ -506,21 +495,19 @@
                 EoGetLayer(ewin) >= 6);
    atom_list_set(atom_list, len, &atom_count, _NET_WM_STATE_BELOW,
                 EoGetLayer(ewin) <= 2);
-   _ATOM_SET_ATOM(_NET_WM_STATE, ewin->client.win, atom_list, atom_count);
+   _ATOM_SET_ATOM(ewin->client.win, _NET_WM_STATE, atom_list, atom_count);
    EDBUG_RETURN_;
 }
 
 void
 EWMH_SetWindowOpacity(EWin * ewin, unsigned int opacity)
 {
-   CARD32              val = opacity;
-
    if (ewin->props.opacity != opacity)
      {
-       _ATOM_SET_CARD32(_NET_WM_WINDOW_OPACITY, ewin->client.win, &val, 1);
+       ecore_x_netwm_opacity_set(ewin->client.win, opacity);
        ewin->props.opacity = opacity;
      }
-   _ATOM_SET_CARD32(_NET_WM_WINDOW_OPACITY, EoGetWin(ewin), &val, 1);
+   ecore_x_netwm_opacity_set(EoGetWin(ewin), opacity);
 }
 
 /*
@@ -562,16 +549,14 @@
 void
 EWMH_GetWindowDesktop(EWin * ewin)
 {
-   CARD32             *val;
-   int                 size;
+   int                 num;
+   unsigned int        desk;
 
-   EDBUG(6, "EWMH_GetWindowDesktop");
-
-   val = AtomGet(ewin->client.win, _NET_WM_DESKTOP, XA_CARDINAL, &size);
-   if (!val)
+   num = ecore_x_netwm_desktop_get(ewin->client.win, &desk);
+   if (num <= 0)
       goto done;
 
-   if ((unsigned)val[0] == 0xFFFFFFFF)
+   if (desk == 0xFFFFFFFF)
      {
        /* It is possible to distinguish between "sticky" and "on all 
desktops". */
        /* E doesn't */
@@ -579,10 +564,9 @@
      }
    else
      {
-       EoSetDesk(ewin, val[0]);
+       EoSetDesk(ewin, desk);
        EoSetSticky(ewin, 0);
      }
-   Efree(val);
    EwinChange(ewin, EWIN_CHANGE_DESKTOP);
 
  done:
@@ -712,7 +696,7 @@
 static void
 EWMH_GetWindowMisc(EWin * ewin)
 {
-   CARD32             *val;
+   void               *val;
    int                 size;
 
    EDBUG(6, "EWMH_GetWindowMisc");
@@ -729,44 +713,32 @@
 static void
 EWMH_GetWindowOpacity(EWin * ewin)
 {
-   CARD32             *val;
-   int                 size;
-
-   EDBUG(6, "EWMH_GetWindowOpacity");
+   int                 num;
+   unsigned int        opacity;
 
-   val = AtomGet(ewin->client.win, _NET_WM_WINDOW_OPACITY, XA_CARDINAL, &size);
-   if (val)
-     {
-       ewin->props.opacity = val[0];
-       EWMH_SetWindowOpacity(ewin, val[0]);
-       Efree(val);
-     }
+   num = ecore_x_netwm_opacity_get(ewin->client.win, &opacity);
+   if (num <= 0)
+      return;
 
-   EDBUG_RETURN_;
+   ewin->props.opacity = opacity;
+   EWMH_SetWindowOpacity(ewin, opacity);
 }
 
 static void
 EWMH_GetWindowStrut(EWin * ewin)
 {
-   CARD32             *val;
-   int                 size;
+   int                 num;
+   unsigned int        val[4];
 
-   EDBUG(6, "EWMH_GetWindowStrut");
-
-   val = AtomGet(ewin->client.win, _NET_WM_STRUT, XA_CARDINAL, &size);
-   if (val)
-     {
-       if (size > 4)
-         {
-            ewin->strut.left = val[0];
-            ewin->strut.right = val[1];
-            ewin->strut.top = val[2];
-            ewin->strut.bottom = val[3];
-         }
-       Efree(val);
-     }
+   num =
+      ecore_x_window_prop_card32_get(ewin->client.win, _NET_WM_STRUT, val, 4);
+   if (num < 4)
+      return;
 
-   EDBUG_RETURN_;
+   ewin->strut.left = val[0];
+   ewin->strut.right = val[1];
+   ewin->strut.top = val[2];
+   ewin->strut.bottom = val[3];
 }
 
 void
===================================================================
RCS file: /cvsroot/enlightenment/e16/e/src/icccm.c,v
retrieving revision 1.76.2.15
retrieving revision 1.76.2.16
diff -u -3 -r1.76.2.15 -r1.76.2.16
--- icccm.c     5 Dec 2004 12:27:33 -0000       1.76.2.15
+++ icccm.c     8 Dec 2004 20:06:16 -0000       1.76.2.16
@@ -23,9 +23,9 @@
 #include "E.h"
 
 #ifdef USE_ECORE_X             /* Shouldn't be here */
-extern Atom         _ecore_x_atom_wm_protocols;
-extern Atom         _ecore_x_atom_wm_delete_window;
-extern Atom         _ecore_x_atom_wm_take_focus;
+extern Atom         ECORE_X_ATOM_WM_PROTOCOLS;
+extern Atom         ECORE_X_ATOM_WM_DELETE_WINDOW;
+extern Atom         ECORE_X_ATOM_WM_TAKE_FOCUS;
 #endif
 
 #define FREE_AND_CLEAR(ptr) if (ptr) { Efree(ptr); ptr = NULL; }
@@ -63,9 +63,11 @@
    ecore_x_icccm_init();
 #endif
 
+   ICCCM_SetIconSizes();
+
    if (Mode.wm.window)
      {
-       Atom                wm_props[1] = { _ecore_x_atom_wm_delete_window };
+       Atom                wm_props[1] = { ECORE_X_ATOM_WM_DELETE_WINDOW };
        XSetWMProtocols(disp, VRoot.win, wm_props, 1);
      }
 }
@@ -87,10 +89,10 @@
             EwinIconify(ewin);
          }
      }
-   else if (event->message_type == _ecore_x_atom_wm_protocols)
+   else if (event->message_type == ECORE_X_ATOM_WM_PROTOCOLS)
      {
        a = event->data.l[0];
-       if (a == _ecore_x_atom_wm_delete_window)
+       if (a == ECORE_X_ATOM_WM_DELETE_WINDOW)
           SessionExit(NULL);
      }
 }
@@ -872,7 +874,7 @@
        XFree(hint);
      }
 
-   if (atom_change == 0 || atom_change == _ecore_x_atom_wm_protocols)
+   if (atom_change == 0 || atom_change == ECORE_X_ATOM_WM_PROTOCOLS)
      {
        if (XGetWMProtocols(disp, ewin->client.win, &prop, &num))
          {
@@ -880,9 +882,9 @@
             ewin->client.delete_window = 0;
             for (i = 0; i < num; i++)
               {
-                 if (prop[i] == _ecore_x_atom_wm_take_focus)
+                 if (prop[i] == ECORE_X_ATOM_WM_TAKE_FOCUS)
                     ewin->client.take_focus = ewin->client.need_input = 1;
-                 else if (prop[i] == _ecore_x_atom_wm_delete_window)
+                 else if (prop[i] == ECORE_X_ATOM_WM_DELETE_WINDOW)
                     ewin->client.delete_window = 1;
               }
             XFree(prop);
===================================================================
RCS file: /cvsroot/enlightenment/e16/e/src/setup.c,v
retrieving revision 1.139.2.18
retrieving revision 1.139.2.19
diff -u -3 -r1.139.2.18 -r1.139.2.19
--- setup.c     28 Nov 2004 17:51:35 -0000      1.139.2.18
+++ setup.c     8 Dec 2004 20:06:16 -0000       1.139.2.19
@@ -314,7 +314,6 @@
                 "access to, nor have heard of.\n"), ProtocolVersion(disp));
      }
 
-   ICCCM_SetIconSizes();
    ICCCM_Focus(NULL);
    MWM_SetInfo();
 




-------------------------------------------------------
SF email is sponsored by - The IT Product Guide
Read honest & candid reviews on hundreds of IT Products from real users.
Discover which products truly live up to the hype. Start reading now. 
http://productguide.itmanagersjournal.com/
_______________________________________________
enlightenment-cvs mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/enlightenment-cvs

Reply via email to