Enlightenment CVS committal

Author  : kwo
Project : e16
Module  : e

Dir     : e16/e/src


Modified Files:
      Tag: branch-exp
        E.h desktops.c ecore-e16.c ecore-e16.h ewmh.c hints.c icccm.c 


Log Message:
Match ecore-x, new ecore-x-netwm stuff, fix.
===================================================================
RCS file: /cvsroot/enlightenment/e16/e/src/E.h,v
retrieving revision 1.314.2.56
retrieving revision 1.314.2.57
diff -u -3 -r1.314.2.56 -r1.314.2.57
--- E.h 21 Oct 2004 17:52:44 -0000      1.314.2.56
+++ E.h 23 Oct 2004 14:23:38 -0000      1.314.2.57
@@ -1704,6 +1704,7 @@
 /* ewmh.c */
 void                EWMH_Init(Window win_wm_check);
 void                EWMH_SetDesktopCount(void);
+void                EWMH_SetDesktopRoots(void);
 void                EWMH_SetDesktopNames(void);
 void                EWMH_SetDesktopSize(void);
 void                EWMH_SetCurrentDesktop(void);
===================================================================
RCS file: /cvsroot/enlightenment/e16/e/src/desktops.c,v
retrieving revision 1.95.2.22
retrieving revision 1.95.2.23
diff -u -3 -r1.95.2.22 -r1.95.2.23
--- desktops.c  20 Oct 2004 21:04:05 -0000      1.95.2.22
+++ desktops.c  23 Oct 2004 14:23:38 -0000      1.95.2.23
@@ -126,7 +126,7 @@
 int
 DesksGetNumber(void)
 {
-   return ENLIGHTENMENT_CONF_NUM_DESKTOPS;
+   return Conf.desks.num;
 }
 
 int
===================================================================
RCS file: /cvsroot/enlightenment/e16/e/src/Attic/ecore-e16.c,v
retrieving revision 1.1.2.1
retrieving revision 1.1.2.2
diff -u -3 -r1.1.2.1 -r1.1.2.2
--- ecore-e16.c 25 Sep 2004 16:15:14 -0000      1.1.2.1
+++ ecore-e16.c 23 Oct 2004 14:23:38 -0000      1.1.2.2
@@ -25,7 +25,43 @@
  */
 #include "E.h"
 
-#ifndef USE_ECORE_X
+#define _ATOM_SET_UTF8_STRING(atom, win, 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, \
+                   (unsigned char *)string, cnt)
+#define _ATOM_SET_WINDOW(atom, win, 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) \
+   XChangeProperty(_ecore_x_disp, win, atom, XA_ATOM, 32, PropModeReplace, \
+                   (unsigned char *)p_atom, cnt)
+#define _ATOM_SET_CARD32(atom, win, p_val, cnt) \
+   XChangeProperty(_ecore_x_disp, win, atom, XA_CARDINAL, 32, PropModeReplace, \
+                   (unsigned char *)p_val, cnt)
+
+#ifdef USE_ECORE_X
+
+void
+ecore_x_icccm_state_set_iconic(Ecore_X_Window win)
+{
+   ecore_x_icccm_state_set(win, ECORE_X_WINDOW_STATE_HINT_ICONIC);
+}
+
+void
+ecore_x_icccm_state_set_normal(Ecore_X_Window win)
+{
+   ecore_x_icccm_state_set(win, ECORE_X_WINDOW_STATE_HINT_NORMAL);
+}
+
+void
+ecore_x_icccm_state_set_withdrawn(Ecore_X_Window win)
+{
+   ecore_x_icccm_state_set(win, ECORE_X_WINDOW_STATE_HINT_WITHDRAWN);
+}
+
+#else /* USE_ECORE_X */
 
 Atom                _ecore_x_atom_wm_state = 0;
 Atom                _ecore_x_atom_wm_protocols = 0;
@@ -56,7 +92,7 @@
 }
 
 static void
-ecore_x_icccm_window_state_set(Ecore_X_Window win, unsigned int state)
+ecore_x_icccm_state_set(Ecore_X_Window win, unsigned int state)
 {
    unsigned long       c[2];
 
@@ -68,21 +104,21 @@
 }
 
 void
-ecore_x_icccm_window_state_set_iconic(Ecore_X_Window win)
+ecore_x_icccm_state_set_iconic(Ecore_X_Window win)
 {
-   ecore_x_icccm_window_state_set(win, IconicState);
+   ecore_x_icccm_state_set(win, IconicState);
 }
 
 void
-ecore_x_icccm_window_state_set_normal(Ecore_X_Window win)
+ecore_x_icccm_state_set_normal(Ecore_X_Window win)
 {
-   ecore_x_icccm_window_state_set(win, NormalState);
+   ecore_x_icccm_state_set(win, NormalState);
 }
 
 void
-ecore_x_icccm_window_state_set_withdrawn(Ecore_X_Window win)
+ecore_x_icccm_state_set_withdrawn(Ecore_X_Window win)
 {
-   ecore_x_icccm_window_state_set(win, WithdrawnState);
+   ecore_x_icccm_state_set(win, WithdrawnState);
 }
 
 static void
@@ -94,26 +130,218 @@
 }
 
 void
-ecore_x_icccm_send_delete_window(Ecore_X_Window win)
+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,
-                                    CurrentTime);
+   ecore_x_icccm_client_message_send(win, _ecore_x_atom_wm_delete_window, ts);
 }
 
 void
-ecore_x_icccm_send_take_focus(Ecore_X_Window win)
+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,
-                                    CurrentTime);
+   ecore_x_icccm_client_message_send(win, _ecore_x_atom_wm_take_focus, ts);
 }
 
 #if 0
 void
-ecore_x_icccm_send_save_yourself(Ecore_X_Window win)
+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);
+}
+#endif
+
+/*
+ * _NET_WM hints (EWMH)
+ */
+#ifndef USE_ECORE_X
+Atom                _ecore_x_atom_utf8_string;
+
+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;
+
+void
+ecore_x_netwm_init(void)
 {
-   ecore_x_icccm_client_message_send(win, _ecore_x_atom_wm_save_yourself,
-                                    CurrentTime);
+   _ecore_x_atom_utf8_string = XInternAtom(_ecore_x_disp, "UTF8_STRING", False);
+
+   _ecore_x_atom_net_number_of_desktops =
+      XInternAtom(_ecore_x_disp, "_NET_NUMBER_OF_DESKTOPS", False);
+   _ecore_x_atom_net_virtual_roots =
+      XInternAtom(_ecore_x_disp, "_NET_VIRTUAL_ROOTS", False);
+   _ecore_x_atom_net_desktop_names =
+      XInternAtom(_ecore_x_disp, "_NET_DESKTOP_NAMES", False);
+   _ecore_x_atom_net_desktop_geometry =
+      XInternAtom(_ecore_x_disp, "_NET_DESKTOP_GEOMETRY", False);
+   _ecore_x_atom_net_workarea =
+      XInternAtom(_ecore_x_disp, "_NET_WORKAREA", False);
+   _ecore_x_atom_net_current_desktop =
+      XInternAtom(_ecore_x_disp, "_NET_CURRENT_DESKTOP", False);
+   _ecore_x_atom_net_desktop_viewport =
+      XInternAtom(_ecore_x_disp, "_NET_DESKTOP_VIEWPORT", False);
+   _ecore_x_atom_net_showing_desktop =
+      XInternAtom(_ecore_x_disp, "_NET_SHOWING_DESKTOP", False);
+
+   _ecore_x_atom_net_client_list =
+      XInternAtom(_ecore_x_disp, "_NET_CLIENT_LIST", False);
+   _ecore_x_atom_net_client_list_stacking =
+      XInternAtom(_ecore_x_disp, "_NET_CLIENT_LIST_STACKING", False);
+   _ecore_x_atom_net_active_window =
+      XInternAtom(_ecore_x_disp, "_NET_ACTIVE_WINDOW", False);
 }
 #endif
 
+/*
+ * Desktop configuration and status
+ */
+
+void
+ecore_x_netwm_desk_count_set(Ecore_X_Window root, int n_desks)
+{
+   CARD32              val;
+
+   val = n_desks;
+   _ATOM_SET_CARD32(_ecore_x_atom_net_number_of_desktops, root, &val, 1);
+}
+
+void
+ecore_x_netwm_desk_roots_set(Ecore_X_Window root, int n_desks,
+                            Ecore_X_Window * vroots)
+{
+   _ATOM_SET_WINDOW(_ecore_x_atom_net_virtual_roots, root, vroots, n_desks);
+}
+
+void
+ecore_x_netwm_desk_names_set(Ecore_X_Window root, int n_desks,
+                            const char **names)
+{
+   char                ss[32], *buf;
+   const char         *s;
+   int                 i, l, len;
+
+   buf = NULL;
+   len = 0;
+
+   for (i = 0; i < n_desks; i++)
+     {
+       s = (names) ? names[i] : NULL;
+       if (!s)
+         {
+            /* Default to "Desk-<number>" */
+            sprintf(ss, "Desk-%d", i);
+            s = ss;
+         }
+
+       l = strlen(s) + 1;
+       buf = realloc(buf, len + l);
+       memcpy(buf + len, s, l);
+       len += l;
+     }
+
+   _ATOM_SET_UTF8_STRING_LIST(_ecore_x_atom_net_desktop_names, root, buf, len);
+
+   free(buf);
+}
+
+void
+ecore_x_netwm_desk_size_set(Ecore_X_Window root, int width, int height)
+{
+   CARD32              size[2];
+
+   size[0] = width;
+   size[1] = height;
+   _ATOM_SET_CARD32(_ecore_x_atom_net_desktop_geometry, root, &size, 2);
+}
+
+void
+ecore_x_netwm_desk_workareas_set(Ecore_X_Window root, int n_desks, 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);
+}
+
+void
+ecore_x_netwm_desk_current_set(Ecore_X_Window root, int desk)
+{
+   CARD32              val;
+
+   val = desk;
+   _ATOM_SET_CARD32(_ecore_x_atom_net_current_desktop, root, &val, 1);
+}
+
+void
+ecore_x_netwm_desk_viewports_set(Ecore_X_Window root, int n_desks, 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);
+}
+
+void
+ecore_x_netwm_showing_desktop_set(Ecore_X_Window root, int on)
+{
+   CARD32              val;
+
+   val = on;
+   _ATOM_SET_CARD32(_ecore_x_atom_net_showing_desktop, root, &val, 1);
+}
+
+/*
+ * Client status
+ */
+
+/* Mapping order */
+void
+ecore_x_netwm_client_list_set(Ecore_X_Window root, int n_clients,
+                             Ecore_X_Window * p_clients)
+{
+   _ATOM_SET_WINDOW(_ecore_x_atom_net_client_list, root, p_clients, n_clients);
+}
+
+/* Stacking order */
+void
+ecore_x_netwm_client_list_stacking_set(Ecore_X_Window root, int n_clients,
+                                      Ecore_X_Window * p_clients)
+{
+   _ATOM_SET_WINDOW(_ecore_x_atom_net_client_list_stacking, root, 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);
+}
+
 #endif /* USE_ECORE_X */
===================================================================
RCS file: /cvsroot/enlightenment/e16/e/src/Attic/ecore-e16.h,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.h 25 Sep 2004 16:15:14 -0000      1.1.2.5
+++ ecore-e16.h 23 Oct 2004 14:23:38 -0000      1.1.2.6
@@ -46,21 +46,65 @@
                                                  long d0, long d1, long d2,
                                                  long d3, long d4);
 
-void                ecore_x_icccm_window_state_set_iconic(Ecore_X_Window win);
-void                ecore_x_icccm_window_state_set_normal(Ecore_X_Window win);
-void                ecore_x_icccm_window_state_set_withdrawn(Ecore_X_Window
-                                                            win);
-
-void                ecore_x_icccm_send_delete_window(Ecore_X_Window win);
-void                ecore_x_icccm_send_take_focus(Ecore_X_Window win);
+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);
 
 #endif
 
+/* Misc. */
+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;
 
+void                ecore_x_icccm_state_set_iconic(Ecore_X_Window win);
+void                ecore_x_icccm_state_set_normal(Ecore_X_Window win);
+void                ecore_x_icccm_state_set_withdrawn(Ecore_X_Window win);
+
 #if 0
 extern Atom         _ecore_x_atom_wm_save_yourself;
 #endif
+
+/* NETWM (EWMH) */
+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;
+
+void                ecore_x_netwm_init(void);
+
+void                ecore_x_netwm_desk_count_set(Window root, int n_desks);
+void                ecore_x_netwm_desk_roots_set(Window root, int n_desks,
+                                                Window * vroots);
+void                ecore_x_netwm_desk_names_set(Window root, int n_desks,
+                                                const char **names);
+void                ecore_x_netwm_desk_size_set(Window root, int width,
+                                               int height);
+void                ecore_x_netwm_desk_workareas_set(Ecore_X_Window root,
+                                                    int n_desks, int *areas);
+void                ecore_x_netwm_desk_current_set(Ecore_X_Window root,
+                                                  int desk);
+void                ecore_x_netwm_desk_viewports_set(Ecore_X_Window root,
+                                                    int n_desks, 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,
+                                                 Ecore_X_Window * p_clients);
+void                ecore_x_netwm_client_list_stacking_set(Ecore_X_Window root,
+                                                          int n_clients,
+                                                          Ecore_X_Window *
+                                                          p_clients);
+void                ecore_x_netwm_client_active_set(Ecore_X_Window root,
+                                                   Ecore_X_Window win);
===================================================================
RCS file: /cvsroot/enlightenment/e16/e/src/ewmh.c,v
retrieving revision 1.55.2.11
retrieving revision 1.55.2.12
diff -u -3 -r1.55.2.11 -r1.55.2.12
--- ewmh.c      21 Oct 2004 17:25:46 -0000      1.55.2.11
+++ ewmh.c      23 Oct 2004 14:23:38 -0000      1.55.2.12
@@ -263,7 +263,13 @@
    _ATOM_SET_WINDOW(_NET_SUPPORTING_WM_CHECK, win_wm_check, &win_wm_check, 1);
    _ATOM_SET_UTF8_STRING(_NET_WM_NAME, win_wm_check, e_wm_name);
 
+#ifndef USE_ECORE_X
+   /* FIXME - TBD */
+   ecore_x_netwm_init();
+#endif
+
    EWMH_SetDesktopCount();
+   EWMH_SetDesktopRoots();
    EWMH_SetDesktopNames();
    EWMH_SetDesktopSize();
    EWMH_SetWorkArea();
@@ -284,125 +290,103 @@
 void
 EWMH_SetDesktopCount(void)
 {
+   ecore_x_netwm_desk_count_set(VRoot.win, DesksGetNumber());
+}
+
+void
+EWMH_SetDesktopRoots(void)
+{
    int                 i, n_desks;
-   CARD32              val;
    Window             *wl;
 
-   EDBUG(6, "EWMH_SetDesktopCount");
-
    n_desks = DesksGetNumber();
-   val = n_desks;
-   _ATOM_SET_CARD32(_NET_NUMBER_OF_DESKTOPS, VRoot.win, &val, 1);
-
    wl = Emalloc(n_desks * sizeof(Window));
    if (!wl)
-      EDBUG_RETURN_;
+      return;
 
    for (i = 0; i < n_desks; i++)
       wl[i] = DeskGetWin(i);
-   _ATOM_SET_WINDOW(_NET_VIRTUAL_ROOTS, VRoot.win, &wl, n_desks);
-   Efree(wl);
 
-   EDBUG_RETURN_;
+   ecore_x_netwm_desk_roots_set(VRoot.win, n_desks, wl);
+
+   Efree(wl);
 }
 
 void
 EWMH_SetDesktopNames(void)
 {
-   char               *buf, *s;
-   int                 i, n_desks;
-
-   EDBUG(6, "EWMH_SetDesktopNames");
-
-   n_desks = DesksGetNumber();
-   buf = Emalloc(n_desks * 10);
-   if (!buf)
-      EDBUG_RETURN_;
-
-   s = buf;
-   for (i = 0; i < n_desks; i++)
-      s += sprintf(s, "Desk-%d", i) + 1;
-
-   _ATOM_SET_UTF8_STRING_LIST(_NET_DESKTOP_NAMES, VRoot.win, buf, s - buf);
-   Efree(buf);
-
-   EDBUG_RETURN_;
+   /* Fall back to defaults */
+   ecore_x_netwm_desk_names_set(VRoot.win, DesksGetNumber(), NULL);
 }
 
 void
 EWMH_SetDesktopSize(void)
 {
-   CARD32              size[2];
    int                 ax, ay;
 
-   EDBUG(6, "EWMH_SetDesktopSize");
    GetAreaSize(&ax, &ay);
-   size[0] = ax * VRoot.w;
-   size[1] = ay * VRoot.h;
-   _ATOM_SET_CARD32(_NET_DESKTOP_GEOMETRY, VRoot.win, &size, 2);
-   EDBUG_RETURN_;
+   ecore_x_netwm_desk_size_set(VRoot.win, ax * VRoot.w, ay * VRoot.h);
 }
 
 void
 EWMH_SetWorkArea(void)
 {
-   CARD32             *p_coord;
+   int                *p_coord;
    int                 n_coord, i, n_desks;
 
-   EDBUG(6, "EWMH_SetWorkArea");
-
    n_desks = DesksGetNumber();
    n_coord = 4 * n_desks;
-   p_coord = Emalloc(n_coord * sizeof(CARD32));
-   if (p_coord)
+   p_coord = Emalloc(n_coord * sizeof(int));
+   if (!p_coord)
+      return;
+
+   for (i = 0; i < n_desks; i++)
      {
-       for (i = 0; i < n_desks; i++)
-         {
-            p_coord[4 * i] = 0;
-            p_coord[4 * i + 1] = 0;
-            p_coord[4 * i + 2] = VRoot.w;
-            p_coord[4 * i + 3] = VRoot.h;
-         }
-       _ATOM_SET_CARD32(_NET_WORKAREA, VRoot.win, p_coord, n_coord);
-       Efree(p_coord);
+       p_coord[4 * i] = 0;
+       p_coord[4 * i + 1] = 0;
+       p_coord[4 * i + 2] = VRoot.w;
+       p_coord[4 * i + 3] = VRoot.h;
      }
-   EDBUG_RETURN_;
+
+   ecore_x_netwm_desk_workareas_set(VRoot.win, n_desks, p_coord);
+
+   Efree(p_coord);
 }
 
 void
 EWMH_SetCurrentDesktop(void)
 {
-   CARD32              val;
-
-   EDBUG(6, "EWMH_SetCurrentDesktop");
-   val = DesksGetCurrent();
-   _ATOM_SET_CARD32(_NET_CURRENT_DESKTOP, VRoot.win, &val, 1);
-   EDBUG_RETURN_;
+   ecore_x_netwm_desk_current_set(VRoot.win, DesksGetCurrent());
 }
 
 void
 EWMH_SetDesktopViewport(void)
 {
-   CARD32             *p_coord;
+   int                *p_coord;
    int                 n_coord, i, ax, ay, n_desks;
 
-   EDBUG(6, "EWMH_SetDesktopViewport");
-
    n_desks = DesksGetNumber();
    n_coord = 2 * n_desks;
-   p_coord = Emalloc(n_coord * sizeof(CARD32));
-   if (p_coord)
+   p_coord = Emalloc(n_coord * sizeof(int));
+   if (!p_coord)
+      return;
+
+   for (i = 0; i < n_desks; i++)
      {
-       for (i = 0; i < n_desks; i++)
-         {
-            DeskGetArea(i, &ax, &ay);
-            p_coord[2 * i] = ax * VRoot.w;
-            p_coord[2 * i + 1] = ay * VRoot.h;
-         }
-       _ATOM_SET_CARD32(_NET_DESKTOP_VIEWPORT, VRoot.win, p_coord, n_coord);
-       Efree(p_coord);
+       DeskGetArea(i, &ax, &ay);
+       p_coord[2 * i] = ax * VRoot.w;
+       p_coord[2 * i + 1] = ay * VRoot.h;
      }
-   EDBUG_RETURN_;
+
+   ecore_x_netwm_desk_viewports_set(VRoot.win, n_desks, p_coord);
+
+   Efree(p_coord);
+}
+
+void
+EWMH_SetShowingDesktop(int on)
+{
+   ecore_x_netwm_showing_desktop_set(VRoot.win, on);
 }
 
 /*
@@ -412,57 +396,49 @@
 void
 EWMH_SetClientList(void)
 {
-   Window             *wl;
+   Ecore_X_Window     *wl;
    int                 i, num;
    EWin              **lst;
 
-   EDBUG(6, "EWMH_SetClientList");
-
    /* Mapping order */
    lst = (EWin **) ListItemType(&num, LIST_TYPE_EWIN);
    if (num > 0)
      {
-       wl = Emalloc(num * sizeof(Window));
+       wl = Emalloc(num * sizeof(Ecore_X_Window));
        for (i = 0; i < num; i++)
           wl[i] = lst[i]->client.win;
-       _ATOM_SET_WINDOW(_NET_CLIENT_LIST, VRoot.win, wl, num);
+       ecore_x_netwm_client_list_set(VRoot.win, num, wl);
        Efree(wl);
      }
    else
      {
-       _ATOM_SET_WINDOW(_NET_CLIENT_LIST, VRoot.win, NULL, 0);
+       ecore_x_netwm_client_list_set(VRoot.win, 0, NULL);
      }
    if (lst)
       Efree(lst);
-
-   EDBUG_RETURN_;
 }
 
 void
 EWMH_SetClientStacking(void)
 {
-   Window             *wl;
+   Ecore_X_Window     *wl;
    int                 i, num;
    EWin               *const *lst;
 
-   EDBUG(6, "EWMH_SetClientStacking");
-
    /* Stacking order */
    lst = EwinListGetStacking(&num);
    if (num > 0)
      {
-       wl = Emalloc(num * sizeof(Window));
+       wl = Emalloc(num * sizeof(Ecore_X_Window));
        for (i = 0; i < num; i++)
           wl[i] = lst[num - i - 1]->client.win;
-       _ATOM_SET_WINDOW(_NET_CLIENT_LIST_STACKING, VRoot.win, wl, num);
+       ecore_x_netwm_client_list_stacking_set(VRoot.win, num, wl);
        Efree(wl);
      }
    else
      {
-       _ATOM_SET_WINDOW(_NET_CLIENT_LIST_STACKING, VRoot.win, NULL, 0);
+       ecore_x_netwm_client_list_stacking_set(VRoot.win, 0, NULL);
      }
-
-   EDBUG_RETURN_;
 }
 
 void
@@ -470,24 +446,11 @@
 {
    static Window       win_last_set;
 
-   EDBUG(6, "EWMH_SetActiveWindow");
-   if (win != win_last_set)
-     {
-       _ATOM_SET_WINDOW(_NET_ACTIVE_WINDOW, VRoot.win, &win, 1);
-       win_last_set = win;
-     }
-   EDBUG_RETURN_;
-}
-
-void
-EWMH_SetShowingDesktop(int on)
-{
-   CARD32              val;
+   if (win == win_last_set)
+      return;
 
-   EDBUG(6, "EWMH_SetShowingDesktop");
-   val = on;
-   _ATOM_SET_CARD32(_NET_SHOWING_DESKTOP, VRoot.win, &val, 1);
-   EDBUG_RETURN_;
+   ecore_x_netwm_client_active_set(VRoot.win, win);
+   win_last_set = win;
 }
 
 /*
===================================================================
RCS file: /cvsroot/enlightenment/e16/e/src/hints.c,v
retrieving revision 1.25.2.3
retrieving revision 1.25.2.4
diff -u -3 -r1.25.2.3 -r1.25.2.4
--- hints.c     27 Aug 2004 23:27:43 -0000      1.25.2.3
+++ hints.c     23 Oct 2004 14:23:39 -0000      1.25.2.4
@@ -92,6 +92,7 @@
 #endif
 #if ENABLE_EWMH
    EWMH_SetDesktopCount();
+   EWMH_SetDesktopRoots();
    EWMH_SetDesktopNames();
    EWMH_SetWorkArea();
 #endif
===================================================================
RCS file: /cvsroot/enlightenment/e16/e/src/icccm.c,v
retrieving revision 1.76.2.10
retrieving revision 1.76.2.11
diff -u -3 -r1.76.2.10 -r1.76.2.11
--- icccm.c     21 Oct 2004 17:25:46 -0000      1.76.2.10
+++ icccm.c     23 Oct 2004 14:23:39 -0000      1.76.2.11
@@ -183,7 +183,7 @@
      }
 
    if (ewin->client.delete_window)
-      ecore_x_icccm_send_delete_window(ewin->client.win);
+      ecore_x_icccm_delete_window_send(ewin->client.win, CurrentTime);
    else
       XKillClient(disp, ewin->client.win);
 }
@@ -203,7 +203,7 @@
 ICCCM_Iconify(EWin * ewin)
 {
    EUnmapWindow(disp, ewin->client.win);
-   ecore_x_icccm_window_state_set_iconic(ewin->client.win);
+   ecore_x_icccm_state_set_iconic(ewin->client.win);
    AddItem(ewin, "ICON", ewin->client.win, LIST_TYPE_ICONIFIEDS);
 }
 
@@ -211,7 +211,7 @@
 ICCCM_DeIconify(EWin * ewin)
 {
    EMapWindow(disp, ewin->client.win);
-   ecore_x_icccm_window_state_set_normal(ewin->client.win);
+   ecore_x_icccm_state_set_normal(ewin->client.win);
    RemoveItem("ICON", ewin->client.win, LIST_FINDBY_BOTH, LIST_TYPE_ICONIFIEDS);
 }
 
@@ -222,7 +222,7 @@
     * or changing the value to Withdrawn. Since twm/fvwm does
     * it that way, we change it to Withdrawn.
     */
-   ecore_x_icccm_window_state_set_withdrawn(ewin->client.win);
+   ecore_x_icccm_state_set_withdrawn(ewin->client.win);
 
    XRemoveFromSaveSet(disp, ewin->client.win);
 }
@@ -371,9 +371,9 @@
    EReparentWindow(disp, win, ewin->win_container, 0, 0);
 
    if (ewin->client.start_iconified)
-      ecore_x_icccm_window_state_set_iconic(win);
+      ecore_x_icccm_state_set_iconic(win);
    else
-      ecore_x_icccm_window_state_set_normal(win);
+      ecore_x_icccm_state_set_normal(win);
 }
 
 void
@@ -453,7 +453,7 @@
 
    if (ewin->client.take_focus)
      {
-       ecore_x_icccm_send_take_focus(ewin->client.win);
+       ecore_x_icccm_take_focus_send(ewin->client.win, CurrentTime);
      }
 
    XSetInputFocus(disp, ewin->client.win, RevertToPointerRoot, CurrentTime);




-------------------------------------------------------
This SF.net email is sponsored by: IT Product Guide on ITManagersJournal
Use IT products in your business? Tell us what you think of them. Give us
Your Opinions, Get Free ThinkGeek Gift Certificates! Click to find out more
http://productguide.itmanagersjournal.com/guidepromo.tmpl
_______________________________________________
enlightenment-cvs mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/enlightenment-cvs

Reply via email to