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.c ecore_x_error.c ecore_x_events.c 
        ecore_x_icccm.c ecore_x_netwm.c ecore_x_selection.c 
        ecore_x_window_prop.c 


Log Message:


kwo's ecore cleanup patch

===================================================================
RCS file: /cvsroot/enlightenment/e17/libs/ecore/src/lib/ecore_x/Ecore_X.h,v
retrieving revision 1.96
retrieving revision 1.97
diff -u -3 -r1.96 -r1.97
--- Ecore_X.h   15 Feb 2005 11:27:24 -0000      1.96
+++ Ecore_X.h   2 Mar 2005 07:06:42 -0000       1.97
@@ -1101,7 +1101,8 @@
 EAPI int                 ecore_x_netwm_window_state_isset(Ecore_X_Window win, 
Ecore_X_Window_State state);
 EAPI void                ecore_x_netwm_window_type_set(Ecore_X_Window win, 
Ecore_X_Window_Type type);
 EAPI Ecore_X_Window_Type ecore_x_netwm_window_type_get(Ecore_X_Window win);
-EAPI int                 ecore_x_netwm_action_allowed(Ecore_X_Window win, 
Ecore_X_Action action);
+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_opacity_set(Ecore_X_Window win, 
unsigned int opacity);
 EAPI int                 ecore_x_netwm_opacity_get(Ecore_X_Window win, 
unsigned int *opacity);
 EAPI void                ecore_x_netwm_frame_size_set(Ecore_X_Window win, int 
fl, int fr, int ft, int fb);
===================================================================
RCS file: /cvsroot/enlightenment/e17/libs/ecore/src/lib/ecore_x/ecore_x.c,v
retrieving revision 1.65
retrieving revision 1.66
diff -u -3 -r1.65 -r1.66
--- ecore_x.c   11 Jan 2005 13:31:13 -0000      1.65
+++ ecore_x.c   2 Mar 2005 07:06:43 -0000       1.66
@@ -1,3 +1,4 @@
+#include "ecore_private.h"
 #include "Ecore.h"
 #include "ecore_x_private.h"
 #include "Ecore_X.h"
@@ -563,7 +564,7 @@
 }
 
 static int
-_ecore_x_fd_handler(void *data, Ecore_Fd_Handler *fd_handler)
+_ecore_x_fd_handler(void *data, Ecore_Fd_Handler *fd_handler __UNUSED__)
 {
    Display *d;
    
@@ -583,7 +584,7 @@
 }
 
 static int
-_ecore_x_fd_handler_buf(void *data, Ecore_Fd_Handler *fd_handler)
+_ecore_x_fd_handler_buf(void *data, Ecore_Fd_Handler *fd_handler __UNUSED__)
 {
    Display *d;
 
@@ -637,7 +638,7 @@
 };
 
 static void *
-_ecore_x_event_filter_start(void *data)
+_ecore_x_event_filter_start(void *data __UNUSED__)
 {
    Ecore_X_Filter_Data *filter_data;
    
@@ -646,7 +647,7 @@
 }
 
 static int
-_ecore_x_event_filter_filter(void *data, void *loop_data,int type, void *event)
+_ecore_x_event_filter_filter(void *data __UNUSED__, void *loop_data,int type, 
void *event __UNUSED__)
 {
    Ecore_X_Filter_Data *filter_data;
    
@@ -665,7 +666,7 @@
 }
 
 static void
-_ecore_x_event_filter_end(void *data, void *loop_data)
+_ecore_x_event_filter_end(void *data __UNUSED__, void *loop_data)
 {
    Ecore_X_Filter_Data *filter_data;
    
@@ -815,7 +816,7 @@
 
 static int _ecore_x_window_manage_failed = 0;
 static void
-_ecore_x_window_manage_error(void *data)
+_ecore_x_window_manage_error(void *data __UNUSED__)
 {
    if ((ecore_x_error_request_get() == X_ChangeWindowAttributes) &&
        (ecore_x_error_code_get() == BadAccess))
@@ -968,7 +969,7 @@
        windows = malloc(children_ret_num * sizeof(Ecore_X_Window));
        if (windows)
          {
-            int i;
+            unsigned int i;
             
             for (i = 0; i < children_ret_num; i++)
               windows[i] = children_ret[i];
===================================================================
RCS file: 
/cvsroot/enlightenment/e17/libs/ecore/src/lib/ecore_x/ecore_x_error.c,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -3 -r1.3 -r1.4
--- ecore_x_error.c     20 Feb 2004 07:06:29 -0000      1.3
+++ ecore_x_error.c     2 Mar 2005 07:06:44 -0000       1.4
@@ -1,3 +1,4 @@
+#include "ecore_private.h"
 #include "Ecore.h"
 #include "ecore_x_private.h"
 #include "Ecore_X.h"
@@ -72,7 +73,7 @@
 }
 
 static void
-_ecore_x_error_handle(Display *d, XErrorEvent *ev)
+_ecore_x_error_handle(Display *d __UNUSED__, XErrorEvent *ev)
 {
    _error_request_code = ev->request_code;
    _error_code = ev->error_code;
@@ -80,7 +81,7 @@
 }
 
 static int
-_ecore_x_io_error_handle(Display *d)
+_ecore_x_io_error_handle(Display *d __UNUSED__)
 {
    if (_io_error_func) _io_error_func(_io_error_data);
    else exit(-1);
===================================================================
RCS file: 
/cvsroot/enlightenment/e17/libs/ecore/src/lib/ecore_x/ecore_x_events.c,v
retrieving revision 1.40
retrieving revision 1.41
diff -u -3 -r1.40 -r1.41
--- ecore_x_events.c    4 Dec 2004 10:10:28 -0000       1.40
+++ ecore_x_events.c    2 Mar 2005 07:06:44 -0000       1.41
@@ -2,6 +2,7 @@
  * vim:ts=8:sw=3:sts=8:noexpandtab:cino=>5n-3f0^-2{2
  */
 
+#include "ecore_private.h"
 #include "Ecore.h"
 #include "ecore_x_private.h"
 #include "Ecore_X.h"
@@ -112,7 +113,7 @@
 #endif
 
 static void
-_ecore_x_event_free_key_down(void *data, void *ev)
+_ecore_x_event_free_key_down(void *data __UNUSED__, void *ev)
 {
    Ecore_X_Event_Key_Down *e;
 
@@ -124,7 +125,7 @@
 }
 
 static void
-_ecore_x_event_free_key_up(void *data, void *ev)
+_ecore_x_event_free_key_up(void *data __UNUSED__, void *ev)
 {
    Ecore_X_Event_Key_Up *e;
 
@@ -136,7 +137,7 @@
 }
 
 static void
-_ecore_x_event_free_selection_notify(void *data, void *ev)
+_ecore_x_event_free_selection_notify(void *data __UNUSED__, void *ev)
 {
    Ecore_X_Event_Selection_Notify *e;
 
@@ -350,12 +351,12 @@
             else e->win = xevent->xbutton.window;
             e->event_win = xevent->xbutton.window;
             e->time = xevent->xbutton.time;
-            if (((e->time - last_time) <= 
+            if (((int)(e->time - last_time) <= 
                  (int)(1000 * _ecore_x_double_click_time)) &&
                 (e->win == last_win) &&
                 (e->event_win == last_event_win))
               e->double_click = 1;
-            if (((e->time - last_last_time) <= 
+            if (((int)(e->time - last_last_time) <= 
                  (int)(2 * 1000 * _ecore_x_double_click_time)) &&
                 (e->win == last_win) && (e->win == last_last_win) &&
                 (e->event_win == last_event_win) && (e->event_win == 
last_last_event_win))
@@ -661,7 +662,7 @@
 }
 
 void
-_ecore_x_event_handle_keymap_notify(XEvent *xevent)
+_ecore_x_event_handle_keymap_notify(XEvent *xevent __UNUSED__)
 {
    /* FIXME: handle this event type */   
 }
@@ -835,7 +836,7 @@
 }
 
 void
-_ecore_x_event_handle_gravity_notify(XEvent *xevent)
+_ecore_x_event_handle_gravity_notify(XEvent *xevent __UNUSED__)
 {
    /* FIXME: handle this event type */
 }
@@ -855,13 +856,13 @@
 }
 
 void
-_ecore_x_event_handle_circulate_notify(XEvent *xevent)
+_ecore_x_event_handle_circulate_notify(XEvent *xevent __UNUSED__)
 {
    /* FIXME: handle this event type */
 }
 
 void
-_ecore_x_event_handle_circulate_request(XEvent *xevent)
+_ecore_x_event_handle_circulate_request(XEvent *xevent __UNUSED__)
 {
    /* FIXME: handle this event type */
 }
@@ -1231,7 +1232,7 @@
       _xdnd = _ecore_x_dnd_protocol_get();
       /* Make sure source/target match */
       if (_xdnd->source != xevent->xclient.window 
-            || _xdnd->dest != xevent->xclient.data.l[0])
+            || _xdnd->dest != (Window)xevent->xclient.data.l[0])
          return;
       _xdnd->will_accept = xevent->xclient.data.l[1] & 0x1UL;
       _xdnd->suppress = (xevent->xclient.data.l[1] & 0x2UL) ? 0 : 1;
@@ -1266,7 +1267,7 @@
 
       _xdnd = _ecore_x_dnd_protocol_get();
       /* Match source/target */
-      if (_xdnd->source != xevent->xclient.data.l[0]
+      if (_xdnd->source != (Window)xevent->xclient.data.l[0]
             || _xdnd->dest != xevent->xclient.window)
          return;
       if (_xdnd->types)
@@ -1289,12 +1290,12 @@
 
       _xdnd = _ecore_x_dnd_protocol_get();
       /* Match source/target */
-      if (_xdnd->source != xevent->xclient.data.l[0]
+      if (_xdnd->source != (Window)xevent->xclient.data.l[0]
             || _xdnd->dest != xevent->xclient.window)
          return;
       
-      timestamp = (_xdnd->version >= 1) ? 
-                     xevent->xclient.data.l[2] : _ecore_x_event_last_time;
+      timestamp = (_xdnd->version >= (int)1) ? 
+                     (Time)xevent->xclient.data.l[2] : 
_ecore_x_event_last_time;
       
       XConvertSelection(_ecore_x_disp, ECORE_X_ATOM_SELECTION_XDND,
             _xdnd->dest, ECORE_X_ATOM_SELECTION_PROP_XDND, _xdnd->dest,
@@ -1324,7 +1325,7 @@
       _xdnd = _ecore_x_dnd_protocol_get();
       /* Match source/target */
       if (_xdnd->source != xevent->xclient.window
-            || _xdnd->dest != xevent->xclient.data.l[0])
+            || _xdnd->dest != (Window)xevent->xclient.data.l[0])
          return;
 
       if (_xdnd->version >= 5 && (xevent->xclient.data.l[1] & 0x1UL))
@@ -1375,13 +1376,13 @@
 }
 
 void
-_ecore_x_event_handle_mapping_notify(XEvent *xevent)
+_ecore_x_event_handle_mapping_notify(XEvent *xevent __UNUSED__)
 {
    /* FIXME: handle this event type */
 }
 
 void
-_ecore_x_event_handle_shape_change(XEvent *xevent)
+_ecore_x_event_handle_shape_change(XEvent *xevent __UNUSED__)
 {
    /* FIXME: handle this event type */
 }
===================================================================
RCS file: 
/cvsroot/enlightenment/e17/libs/ecore/src/lib/ecore_x/ecore_x_icccm.c,v
retrieving revision 1.19
retrieving revision 1.20
diff -u -3 -r1.19 -r1.20
--- ecore_x_icccm.c     15 Feb 2005 11:24:25 -0000      1.19
+++ ecore_x_icccm.c     2 Mar 2005 07:06:44 -0000       1.20
@@ -92,6 +92,7 @@
    int            format_ret;
    Ecore_X_Window_State_Hint hint;
 
+   hint = ECORE_X_WINDOW_STATE_HINT_NONE;
    XGetWindowProperty(_ecore_x_disp, win, ECORE_X_ATOM_WM_STATE,
                      0, 0x7fffffff, False, ECORE_X_ATOM_WM_STATE,
                      &type_ret, &format_ret, &num_ret, &bytes_after,
@@ -105,8 +106,6 @@
        else if (prop_ret[0] == IconicState)
          hint = ECORE_X_WINDOW_STATE_HINT_ICONIC;
      }
-   else
-     hint = ECORE_X_WINDOW_STATE_HINT_NORMAL;
 
    if (prop_ret)
      XFree(prop_ret);
@@ -544,7 +543,7 @@
    int                 i;
 
    /* Check for invalid values */
-   if (protocol < 0 || protocol >= ECORE_X_WM_PROTOCOL_NUM)
+   if (protocol >= ECORE_X_WM_PROTOCOL_NUM)
       return;
 
    proto = _ecore_x_atoms_wm_protocols[protocol];
@@ -621,7 +620,7 @@
    int                 i, ret = 0, protos_count = 0;
 
    /* check for invalid values */
-   if (protocol < 0 || protocol >= ECORE_X_WM_PROTOCOL_NUM)
+   if (protocol >= ECORE_X_WM_PROTOCOL_NUM)
       return 0;
 
    proto = _ecore_x_atoms_wm_protocols[protocol];
===================================================================
RCS file: 
/cvsroot/enlightenment/e17/libs/ecore/src/lib/ecore_x/ecore_x_netwm.c,v
retrieving revision 1.10
retrieving revision 1.11
diff -u -3 -r1.10 -r1.11
--- ecore_x_netwm.c     15 Feb 2005 11:21:47 -0000      1.10
+++ ecore_x_netwm.c     2 Mar 2005 07:06:44 -0000       1.11
@@ -142,6 +142,7 @@
    return str;
 }
 
+#if 0 /* Unused */
 /* Set/clear atom in list */
 static void
 _ecore_x_netwm_atom_list_set(Ecore_X_Atom *atoms, int size, int *count,
@@ -172,6 +173,7 @@
           *count = n;
    }
 }
+#endif
 
 
 /*
===================================================================
RCS file: 
/cvsroot/enlightenment/e17/libs/ecore/src/lib/ecore_x/ecore_x_selection.c,v
retrieving revision 1.18
retrieving revision 1.19
diff -u -3 -r1.18 -r1.19
--- ecore_x_selection.c 10 Feb 2005 12:27:13 -0000      1.18
+++ ecore_x_selection.c 2 Mar 2005 07:06:44 -0000       1.19
@@ -6,8 +6,8 @@
 #include "Ecore_X.h"
 #include "Ecore_X_Atoms.h"
 
-static Ecore_X_Selection_Data selections[3] = {{0}};
-static Ecore_X_Selection_Data request_data[3] = {{0}};
+static Ecore_X_Selection_Data selections[3];
+static Ecore_X_Selection_Data request_data[3];
 static Ecore_X_Selection_Converter *converters = NULL;
 
 static int _ecore_x_selection_converter_text(char *target, void *data, int 
size, void **data_ret, int *size_ret);
@@ -15,6 +15,10 @@
 void
 _ecore_x_selection_data_init(void)
 {
+   /* Initialize global data */
+   memset(selections, 0, sizeof(selections));
+   memset(request_data, 0, sizeof(request_data));
+
    /* Initialize converters */
    ecore_x_selection_converter_atom_add(ECORE_X_ATOM_TEXT, 
                                        _ecore_x_selection_converter_text);
===================================================================
RCS file: 
/cvsroot/enlightenment/e17/libs/ecore/src/lib/ecore_x/ecore_x_window_prop.c,v
retrieving revision 1.60
retrieving revision 1.61
diff -u -3 -r1.60 -r1.61
--- ecore_x_window_prop.c       7 Feb 2005 13:51:05 -0000       1.60
+++ ecore_x_window_prop.c       2 Mar 2005 07:06:44 -0000       1.61
@@ -496,7 +496,7 @@
    int   i;
 
    /* check for invalid values */
-   if (protocol < 0 || protocol >= ECORE_X_WM_PROTOCOL_NUM)
+   if (protocol >= ECORE_X_WM_PROTOCOL_NUM)
        return;
 
    proto = _ecore_x_atoms_wm_protocols[protocol];
@@ -568,7 +568,7 @@
    int i, ret = 0, protos_count = 0;
 
    /* check for invalid values */
-   if (protocol < 0 || protocol >= ECORE_X_WM_PROTOCOL_NUM)
+   if (protocol >= ECORE_X_WM_PROTOCOL_NUM)
        return 0;
 
    proto = _ecore_x_atoms_wm_protocols[protocol];




-------------------------------------------------------
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://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=click
_______________________________________________
enlightenment-cvs mailing list
enlightenment-cvs@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/enlightenment-cvs

Reply via email to