uncrustify so T_UNIX will stop nagging me! :)
authordiscomfitor <discomfitor@7cbeb6ba-43b4-40fd-8cce-4c39aea84d33>
Wed, 28 Jul 2010 05:23:42 +0000 (05:23 +0000)
committerdiscomfitor <discomfitor@7cbeb6ba-43b4-40fd-8cce-4c39aea84d33>
Wed, 28 Jul 2010 05:23:42 +0000 (05:23 +0000)
git-svn-id: http://svn.enlightenment.org/svn/e/trunk/ecore@50583 7cbeb6ba-43b4-40fd-8cce-4c39aea84d33

33 files changed:
src/lib/ecore_x/Ecore_X.h
src/lib/ecore_x/Ecore_X_Atoms.h
src/lib/ecore_x/ecore_x_atoms_decl.h
src/lib/ecore_x/xlib/ecore_x.c
src/lib/ecore_x/xlib/ecore_x_atoms.c
src/lib/ecore_x/xlib/ecore_x_composite.c
src/lib/ecore_x/xlib/ecore_x_cursor.c
src/lib/ecore_x/xlib/ecore_x_damage.c
src/lib/ecore_x/xlib/ecore_x_dnd.c
src/lib/ecore_x/xlib/ecore_x_dpms.c
src/lib/ecore_x/xlib/ecore_x_drawable.c
src/lib/ecore_x/xlib/ecore_x_e.c
src/lib/ecore_x/xlib/ecore_x_error.c
src/lib/ecore_x/xlib/ecore_x_events.c
src/lib/ecore_x/xlib/ecore_x_fixes.c
src/lib/ecore_x/xlib/ecore_x_gc.c
src/lib/ecore_x/xlib/ecore_x_icccm.c
src/lib/ecore_x/xlib/ecore_x_image.c
src/lib/ecore_x/xlib/ecore_x_mwm.c
src/lib/ecore_x/xlib/ecore_x_netwm.c
src/lib/ecore_x/xlib/ecore_x_pixmap.c
src/lib/ecore_x/xlib/ecore_x_private.h
src/lib/ecore_x/xlib/ecore_x_randr.c
src/lib/ecore_x/xlib/ecore_x_region.c
src/lib/ecore_x/xlib/ecore_x_screensaver.c
src/lib/ecore_x/xlib/ecore_x_selection.c
src/lib/ecore_x/xlib/ecore_x_sync.c
src/lib/ecore_x/xlib/ecore_x_test.c
src/lib/ecore_x/xlib/ecore_x_window.c
src/lib/ecore_x/xlib/ecore_x_window_prop.c
src/lib/ecore_x/xlib/ecore_x_window_shape.c
src/lib/ecore_x/xlib/ecore_x_xi2.c
src/lib/ecore_x/xlib/ecore_x_xinerama.c

index 3af13c7..6bdf097 100644 (file)
 
 typedef unsigned int Ecore_X_ID;
 #ifndef _ECORE_X_WINDOW_PREDEF
-typedef Ecore_X_ID   Ecore_X_Window;
+typedef Ecore_X_ID Ecore_X_Window;
 #endif
 #ifdef HAVE_ECORE_X_XCB
-typedef Ecore_X_ID   Ecore_X_Visual;
+typedef Ecore_X_ID Ecore_X_Visual;
 #else
-typedef void       * Ecore_X_Visual;
+typedef void *Ecore_X_Visual;
 #endif /* HAVE_ECORE_X_XCB */
-typedef Ecore_X_ID   Ecore_X_Pixmap;
-typedef Ecore_X_ID   Ecore_X_Drawable;
+typedef Ecore_X_ID Ecore_X_Pixmap;
+typedef Ecore_X_ID Ecore_X_Drawable;
 #ifdef HAVE_ECORE_X_XCB
-typedef Ecore_X_ID   Ecore_X_GC;
+typedef Ecore_X_ID Ecore_X_GC;
 #else
-typedef void       * Ecore_X_GC;
+typedef void *Ecore_X_GC;
 #endif /* HAVE_ECORE_X_XCB */
-typedef Ecore_X_ID   Ecore_X_Atom;
-typedef Ecore_X_ID   Ecore_X_Colormap;
-typedef Ecore_X_ID   Ecore_X_Time;
-typedef Ecore_X_ID   Ecore_X_Cursor;
-typedef void         Ecore_X_Display;
-typedef void         Ecore_X_Connection;
-typedef void         Ecore_X_Screen;
-typedef Ecore_X_ID   Ecore_X_Sync_Counter;
-typedef Ecore_X_ID   Ecore_X_Sync_Alarm;
-typedef void         Ecore_X_XRegion;
-
-typedef Ecore_X_ID     Ecore_X_Randr_Output;
-typedef Ecore_X_ID     Ecore_X_Randr_Crtc;
-typedef Ecore_X_ID     Ecore_X_Randr_Mode;
+typedef Ecore_X_ID Ecore_X_Atom;
+typedef Ecore_X_ID Ecore_X_Colormap;
+typedef Ecore_X_ID Ecore_X_Time;
+typedef Ecore_X_ID Ecore_X_Cursor;
+typedef void Ecore_X_Display;
+typedef void Ecore_X_Connection;
+typedef void Ecore_X_Screen;
+typedef Ecore_X_ID Ecore_X_Sync_Counter;
+typedef Ecore_X_ID Ecore_X_Sync_Alarm;
+typedef void Ecore_X_XRegion;
+
+typedef Ecore_X_ID Ecore_X_Randr_Output;
+typedef Ecore_X_ID Ecore_X_Randr_Crtc;
+typedef Ecore_X_ID Ecore_X_Randr_Mode;
 typedef unsigned short Ecore_X_Randr_Size_ID;
 
-typedef Ecore_X_ID   Ecore_X_Device;
+typedef Ecore_X_ID Ecore_X_Device;
 
 #ifdef __cplusplus
 extern "C" {
 #endif
 
-typedef struct _Ecore_X_Rectangle {
+typedef struct _Ecore_X_Rectangle
+{
    int x, y;
    unsigned int width, height;
 } Ecore_X_Rectangle;
 
-typedef struct _Ecore_X_Icon {
-   unsigned int  width, height;
+typedef struct _Ecore_X_Icon
+{
+   unsigned int width, height;
    unsigned int *data;
 } Ecore_X_Icon;
 
@@ -124,42 +126,42 @@ typedef enum _Ecore_X_Composite_Update_Type {
 } Ecore_X_Composite_Update_Type;
 
 typedef enum _Ecore_X_Window_State {
-    /* Unknown state */
-    ECORE_X_WINDOW_STATE_UNKNOWN = 0,
-    /** The window is iconified. */
-    ECORE_X_WINDOW_STATE_ICONIFIED,
-    /** The window is a modal dialog box. */
-    ECORE_X_WINDOW_STATE_MODAL,
-    /** The window manager should keep the window's position fixed
-     * even if the virtual desktop scrolls. */
-    ECORE_X_WINDOW_STATE_STICKY,
-    /** The window has the maximum vertical size. */
-    ECORE_X_WINDOW_STATE_MAXIMIZED_VERT,
-    /** The window has the maximum horizontal size. */
-    ECORE_X_WINDOW_STATE_MAXIMIZED_HORZ,
-    /** The window is shaded. */
-    ECORE_X_WINDOW_STATE_SHADED,
-    /** The window should not be included in the taskbar. */
-    ECORE_X_WINDOW_STATE_SKIP_TASKBAR,
-    /** The window should not be included in the pager. */
-    ECORE_X_WINDOW_STATE_SKIP_PAGER,
-    /** The window is invisible (i.e. minimized/iconified) */
-    ECORE_X_WINDOW_STATE_HIDDEN,
-    /** The window should fill the entire screen and have no
-     * window border/decorations */
-    ECORE_X_WINDOW_STATE_FULLSCREEN,
-    /* The following are not documented because they are not
-     * intended for use in applications. */
-    ECORE_X_WINDOW_STATE_ABOVE,
-    ECORE_X_WINDOW_STATE_BELOW,
-    /* FIXME: Documentation */
-    ECORE_X_WINDOW_STATE_DEMANDS_ATTENTION
+   /* Unknown state */
+   ECORE_X_WINDOW_STATE_UNKNOWN = 0,
+   /** The window is iconified. */
+   ECORE_X_WINDOW_STATE_ICONIFIED,
+   /** The window is a modal dialog box. */
+   ECORE_X_WINDOW_STATE_MODAL,
+   /** The window manager should keep the window's position fixed
+    * even if the virtual desktop scrolls. */
+   ECORE_X_WINDOW_STATE_STICKY,
+   /** The window has the maximum vertical size. */
+   ECORE_X_WINDOW_STATE_MAXIMIZED_VERT,
+   /** The window has the maximum horizontal size. */
+   ECORE_X_WINDOW_STATE_MAXIMIZED_HORZ,
+   /** The window is shaded. */
+   ECORE_X_WINDOW_STATE_SHADED,
+   /** The window should not be included in the taskbar. */
+   ECORE_X_WINDOW_STATE_SKIP_TASKBAR,
+   /** The window should not be included in the pager. */
+   ECORE_X_WINDOW_STATE_SKIP_PAGER,
+   /** The window is invisible (i.e. minimized/iconified) */
+   ECORE_X_WINDOW_STATE_HIDDEN,
+   /** The window should fill the entire screen and have no
+    * window border/decorations */
+   ECORE_X_WINDOW_STATE_FULLSCREEN,
+   /* The following are not documented because they are not
+    * intended for use in applications. */
+   ECORE_X_WINDOW_STATE_ABOVE,
+   ECORE_X_WINDOW_STATE_BELOW,
+   /* FIXME: Documentation */
+   ECORE_X_WINDOW_STATE_DEMANDS_ATTENTION
 } Ecore_X_Window_State;
 
 typedef enum _Ecore_X_Window_State_Action {
-     ECORE_X_WINDOW_STATE_ACTION_REMOVE,
-     ECORE_X_WINDOW_STATE_ACTION_ADD,
-     ECORE_X_WINDOW_STATE_ACTION_TOGGLE
+   ECORE_X_WINDOW_STATE_ACTION_REMOVE,
+   ECORE_X_WINDOW_STATE_ACTION_ADD,
+   ECORE_X_WINDOW_STATE_ACTION_TOGGLE
 } Ecore_X_Window_State_Action;
 
 typedef enum _Ecore_X_Window_Stack_Mode {
@@ -180,9 +182,9 @@ typedef enum _Ecore_X_Randr_Rotation {
 } Ecore_X_Randr_Rotation;
 
 typedef enum _Ecore_X_Randr_Connection {
-  ECORE_X_RANDR_CONNECTED = 0,
-  ECORE_X_RANDR_DISCONNECTED = 1,
-  ECORE_X_RANDR_UNKNOWN_CONNECTION = 2
+   ECORE_X_RANDR_CONNECTED = 0,
+   ECORE_X_RANDR_DISCONNECTED = 1,
+   ECORE_X_RANDR_UNKNOWN_CONNECTION = 2
 } Ecore_X_Randr_Connection;
 
 typedef enum _Ecore_X_Render_Subpixel_Order {
@@ -239,27 +241,27 @@ typedef enum _Ecore_X_Event_Detail
 
 typedef enum _Ecore_X_Event_Mask
 {
-   ECORE_X_EVENT_MASK_NONE                   = 0L,
-   ECORE_X_EVENT_MASK_KEY_DOWN               = (1L << 0),
-   ECORE_X_EVENT_MASK_KEY_UP                 = (1L << 1),
-   ECORE_X_EVENT_MASK_MOUSE_DOWN             = (1L << 2),
-   ECORE_X_EVENT_MASK_MOUSE_UP               = (1L << 3),
-   ECORE_X_EVENT_MASK_MOUSE_IN               = (1L << 4),
-   ECORE_X_EVENT_MASK_MOUSE_OUT              = (1L << 5),
-   ECORE_X_EVENT_MASK_MOUSE_MOVE             = (1L << 6),
-   ECORE_X_EVENT_MASK_WINDOW_DAMAGE          = (1L << 15),
-   ECORE_X_EVENT_MASK_WINDOW_VISIBILITY      = (1L << 16),
-   ECORE_X_EVENT_MASK_WINDOW_CONFIGURE       = (1L << 17),
-   ECORE_X_EVENT_MASK_WINDOW_RESIZE_MANAGE   = (1L << 18),
-   ECORE_X_EVENT_MASK_WINDOW_MANAGE          = (1L << 19),
+   ECORE_X_EVENT_MASK_NONE = 0L,
+   ECORE_X_EVENT_MASK_KEY_DOWN = (1L << 0),
+   ECORE_X_EVENT_MASK_KEY_UP = (1L << 1),
+   ECORE_X_EVENT_MASK_MOUSE_DOWN = (1L << 2),
+   ECORE_X_EVENT_MASK_MOUSE_UP = (1L << 3),
+   ECORE_X_EVENT_MASK_MOUSE_IN = (1L << 4),
+   ECORE_X_EVENT_MASK_MOUSE_OUT = (1L << 5),
+   ECORE_X_EVENT_MASK_MOUSE_MOVE = (1L << 6),
+   ECORE_X_EVENT_MASK_WINDOW_DAMAGE = (1L << 15),
+   ECORE_X_EVENT_MASK_WINDOW_VISIBILITY = (1L << 16),
+   ECORE_X_EVENT_MASK_WINDOW_CONFIGURE = (1L << 17),
+   ECORE_X_EVENT_MASK_WINDOW_RESIZE_MANAGE = (1L << 18),
+   ECORE_X_EVENT_MASK_WINDOW_MANAGE = (1L << 19),
    ECORE_X_EVENT_MASK_WINDOW_CHILD_CONFIGURE = (1L << 20),
-   ECORE_X_EVENT_MASK_WINDOW_FOCUS_CHANGE    = (1L << 21),
-   ECORE_X_EVENT_MASK_WINDOW_PROPERTY        = (1L << 22),
-   ECORE_X_EVENT_MASK_WINDOW_COLORMAP        = (1L << 23),
-   ECORE_X_EVENT_MASK_WINDOW_GRAB            = (1L << 24),
-   ECORE_X_EVENT_MASK_MOUSE_WHEEL            = (1L << 29),
-   ECORE_X_EVENT_MASK_WINDOW_FOCUS_IN        = (1L << 30),
-   ECORE_X_EVENT_MASK_WINDOW_FOCUS_OUT       = (1L << 31)
+   ECORE_X_EVENT_MASK_WINDOW_FOCUS_CHANGE = (1L << 21),
+   ECORE_X_EVENT_MASK_WINDOW_PROPERTY = (1L << 22),
+   ECORE_X_EVENT_MASK_WINDOW_COLORMAP = (1L << 23),
+   ECORE_X_EVENT_MASK_WINDOW_GRAB = (1L << 24),
+   ECORE_X_EVENT_MASK_MOUSE_WHEEL = (1L << 29),
+   ECORE_X_EVENT_MASK_WINDOW_FOCUS_IN = (1L << 30),
+   ECORE_X_EVENT_MASK_WINDOW_FOCUS_OUT = (1L << 31)
 } Ecore_X_Event_Mask;
 
 typedef enum _Ecore_X_Gravity
@@ -285,565 +287,589 @@ typedef enum _Ecore_X_Shape_Type
    ECORE_X_SHAPE_CLIP
 } Ecore_X_Shape_Type;
 
-typedef struct _Ecore_X_Event_Mouse_In                 Ecore_X_Event_Mouse_In;
-typedef struct _Ecore_X_Event_Mouse_Out                Ecore_X_Event_Mouse_Out;
-typedef struct _Ecore_X_Event_Window_Focus_In          Ecore_X_Event_Window_Focus_In;
-typedef struct _Ecore_X_Event_Window_Focus_Out         Ecore_X_Event_Window_Focus_Out;
-typedef struct _Ecore_X_Event_Window_Keymap            Ecore_X_Event_Window_Keymap;
-typedef struct _Ecore_X_Event_Window_Damage            Ecore_X_Event_Window_Damage;
-typedef struct _Ecore_X_Event_Window_Visibility_Change Ecore_X_Event_Window_Visibility_Change;
-typedef struct _Ecore_X_Event_Window_Create            Ecore_X_Event_Window_Create;
-typedef struct _Ecore_X_Event_Window_Destroy           Ecore_X_Event_Window_Destroy;
-typedef struct _Ecore_X_Event_Window_Hide              Ecore_X_Event_Window_Hide;
-typedef struct _Ecore_X_Event_Window_Show              Ecore_X_Event_Window_Show;
-typedef struct _Ecore_X_Event_Window_Show_Request      Ecore_X_Event_Window_Show_Request;
-typedef struct _Ecore_X_Event_Window_Reparent          Ecore_X_Event_Window_Reparent;
-typedef struct _Ecore_X_Event_Window_Configure         Ecore_X_Event_Window_Configure;
-typedef struct _Ecore_X_Event_Window_Configure_Request Ecore_X_Event_Window_Configure_Request;
-typedef struct _Ecore_X_Event_Window_Gravity           Ecore_X_Event_Window_Gravity;
-typedef struct _Ecore_X_Event_Window_Resize_Request    Ecore_X_Event_Window_Resize_Request;
-typedef struct _Ecore_X_Event_Window_Stack             Ecore_X_Event_Window_Stack;
-typedef struct _Ecore_X_Event_Window_Stack_Request     Ecore_X_Event_Window_Stack_Request;
-typedef struct _Ecore_X_Event_Window_Property          Ecore_X_Event_Window_Property;
-typedef struct _Ecore_X_Event_Window_Colormap          Ecore_X_Event_Window_Colormap;
-typedef struct _Ecore_X_Event_Window_Mapping           Ecore_X_Event_Window_Mapping;
-typedef struct _Ecore_X_Event_Selection_Clear          Ecore_X_Event_Selection_Clear;
-typedef struct _Ecore_X_Event_Selection_Request        Ecore_X_Event_Selection_Request;
-typedef struct _Ecore_X_Event_Selection_Notify         Ecore_X_Event_Selection_Notify;
-typedef struct _Ecore_X_Selection_Data                 Ecore_X_Selection_Data;
-typedef struct _Ecore_X_Selection_Data_Files           Ecore_X_Selection_Data_Files;
-typedef struct _Ecore_X_Selection_Data_Text            Ecore_X_Selection_Data_Text;
-typedef struct _Ecore_X_Selection_Data_Targets         Ecore_X_Selection_Data_Targets;
-typedef struct _Ecore_X_Event_Xdnd_Enter               Ecore_X_Event_Xdnd_Enter;
-typedef struct _Ecore_X_Event_Xdnd_Position            Ecore_X_Event_Xdnd_Position;
-typedef struct _Ecore_X_Event_Xdnd_Status              Ecore_X_Event_Xdnd_Status;
-typedef struct _Ecore_X_Event_Xdnd_Leave               Ecore_X_Event_Xdnd_Leave;
-typedef struct _Ecore_X_Event_Xdnd_Drop                Ecore_X_Event_Xdnd_Drop;
-typedef struct _Ecore_X_Event_Xdnd_Finished            Ecore_X_Event_Xdnd_Finished;
-typedef struct _Ecore_X_Event_Client_Message           Ecore_X_Event_Client_Message;
-typedef struct _Ecore_X_Event_Window_Shape             Ecore_X_Event_Window_Shape;
-typedef struct _Ecore_X_Event_Screensaver_Notify       Ecore_X_Event_Screensaver_Notify;
-typedef struct _Ecore_X_Event_Sync_Counter             Ecore_X_Event_Sync_Counter;
-typedef struct _Ecore_X_Event_Sync_Alarm               Ecore_X_Event_Sync_Alarm;
-typedef struct _Ecore_X_Event_Screen_Change            Ecore_X_Event_Screen_Change;
-typedef struct _Ecore_X_Event_Randr_Crtc_Change            Ecore_X_Event_Randr_Crtc_Change;
-typedef struct _Ecore_X_Event_Randr_Output_Change          Ecore_X_Event_Randr_Output_Change;
-typedef struct _Ecore_X_Event_Randr_Output_Property_Notify Ecore_X_Event_Randr_Output_Property_Notify;
-
-typedef struct _Ecore_X_Event_Window_Delete_Request                Ecore_X_Event_Window_Delete_Request;
-typedef struct _Ecore_X_Event_Window_Prop_Title_Change             Ecore_X_Event_Window_Prop_Title_Change;
-typedef struct _Ecore_X_Event_Window_Prop_Visible_Title_Change     Ecore_X_Event_Window_Prop_Visible_Title_Change;
-typedef struct _Ecore_X_Event_Window_Prop_Icon_Name_Change         Ecore_X_Event_Window_Prop_Icon_Name_Change;
-typedef struct _Ecore_X_Event_Window_Prop_Visible_Icon_Name_Change Ecore_X_Event_Window_Prop_Visible_Icon_Name_Change;
-typedef struct _Ecore_X_Event_Window_Prop_Client_Machine_Change    Ecore_X_Event_Window_Prop_Client_Machine_Change;
-typedef struct _Ecore_X_Event_Window_Prop_Name_Class_Change        Ecore_X_Event_Window_Prop_Name_Class_Change;
-typedef struct _Ecore_X_Event_Window_Prop_Pid_Change               Ecore_X_Event_Window_Prop_Pid_Change;
-typedef struct _Ecore_X_Event_Window_Prop_Desktop_Change           Ecore_X_Event_Window_Prop_Desktop_Change;
-
-typedef struct _Ecore_X_Event_Window_Move_Resize_Request Ecore_X_Event_Window_Move_Resize_Request;
-typedef struct _Ecore_X_Event_Window_State_Request       Ecore_X_Event_Window_State_Request;
-typedef struct _Ecore_X_Event_Frame_Extents_Request      Ecore_X_Event_Frame_Extents_Request;
-typedef struct _Ecore_X_Event_Ping                       Ecore_X_Event_Ping;
-typedef struct _Ecore_X_Event_Desktop_Change             Ecore_X_Event_Desktop_Change;
-
-typedef struct _Ecore_X_Event_Startup_Sequence           Ecore_X_Event_Startup_Sequence;
-
-typedef struct _Ecore_X_Event_Generic                    Ecore_X_Event_Generic;
+typedef struct _Ecore_X_Event_Mouse_In Ecore_X_Event_Mouse_In;
+typedef struct _Ecore_X_Event_Mouse_Out Ecore_X_Event_Mouse_Out;
+typedef struct _Ecore_X_Event_Window_Focus_In Ecore_X_Event_Window_Focus_In;
+typedef struct _Ecore_X_Event_Window_Focus_Out Ecore_X_Event_Window_Focus_Out;
+typedef struct _Ecore_X_Event_Window_Keymap Ecore_X_Event_Window_Keymap;
+typedef struct _Ecore_X_Event_Window_Damage Ecore_X_Event_Window_Damage;
+typedef struct _Ecore_X_Event_Window_Visibility_Change
+Ecore_X_Event_Window_Visibility_Change;
+typedef struct _Ecore_X_Event_Window_Create Ecore_X_Event_Window_Create;
+typedef struct _Ecore_X_Event_Window_Destroy Ecore_X_Event_Window_Destroy;
+typedef struct _Ecore_X_Event_Window_Hide Ecore_X_Event_Window_Hide;
+typedef struct _Ecore_X_Event_Window_Show Ecore_X_Event_Window_Show;
+typedef struct _Ecore_X_Event_Window_Show_Request
+Ecore_X_Event_Window_Show_Request;
+typedef struct _Ecore_X_Event_Window_Reparent Ecore_X_Event_Window_Reparent;
+typedef struct _Ecore_X_Event_Window_Configure Ecore_X_Event_Window_Configure;
+typedef struct _Ecore_X_Event_Window_Configure_Request
+Ecore_X_Event_Window_Configure_Request;
+typedef struct _Ecore_X_Event_Window_Gravity Ecore_X_Event_Window_Gravity;
+typedef struct _Ecore_X_Event_Window_Resize_Request
+Ecore_X_Event_Window_Resize_Request;
+typedef struct _Ecore_X_Event_Window_Stack Ecore_X_Event_Window_Stack;
+typedef struct _Ecore_X_Event_Window_Stack_Request
+Ecore_X_Event_Window_Stack_Request;
+typedef struct _Ecore_X_Event_Window_Property Ecore_X_Event_Window_Property;
+typedef struct _Ecore_X_Event_Window_Colormap Ecore_X_Event_Window_Colormap;
+typedef struct _Ecore_X_Event_Window_Mapping Ecore_X_Event_Window_Mapping;
+typedef struct _Ecore_X_Event_Selection_Clear Ecore_X_Event_Selection_Clear;
+typedef struct _Ecore_X_Event_Selection_Request Ecore_X_Event_Selection_Request;
+typedef struct _Ecore_X_Event_Selection_Notify Ecore_X_Event_Selection_Notify;
+typedef struct _Ecore_X_Selection_Data Ecore_X_Selection_Data;
+typedef struct _Ecore_X_Selection_Data_Files Ecore_X_Selection_Data_Files;
+typedef struct _Ecore_X_Selection_Data_Text Ecore_X_Selection_Data_Text;
+typedef struct _Ecore_X_Selection_Data_Targets Ecore_X_Selection_Data_Targets;
+typedef struct _Ecore_X_Event_Xdnd_Enter Ecore_X_Event_Xdnd_Enter;
+typedef struct _Ecore_X_Event_Xdnd_Position Ecore_X_Event_Xdnd_Position;
+typedef struct _Ecore_X_Event_Xdnd_Status Ecore_X_Event_Xdnd_Status;
+typedef struct _Ecore_X_Event_Xdnd_Leave Ecore_X_Event_Xdnd_Leave;
+typedef struct _Ecore_X_Event_Xdnd_Drop Ecore_X_Event_Xdnd_Drop;
+typedef struct _Ecore_X_Event_Xdnd_Finished Ecore_X_Event_Xdnd_Finished;
+typedef struct _Ecore_X_Event_Client_Message Ecore_X_Event_Client_Message;
+typedef struct _Ecore_X_Event_Window_Shape Ecore_X_Event_Window_Shape;
+typedef struct _Ecore_X_Event_Screensaver_Notify
+Ecore_X_Event_Screensaver_Notify;
+typedef struct _Ecore_X_Event_Sync_Counter Ecore_X_Event_Sync_Counter;
+typedef struct _Ecore_X_Event_Sync_Alarm Ecore_X_Event_Sync_Alarm;
+typedef struct _Ecore_X_Event_Screen_Change Ecore_X_Event_Screen_Change;
+typedef struct _Ecore_X_Event_Randr_Crtc_Change Ecore_X_Event_Randr_Crtc_Change;
+typedef struct _Ecore_X_Event_Randr_Output_Change
+Ecore_X_Event_Randr_Output_Change;
+typedef struct _Ecore_X_Event_Randr_Output_Property_Notify
+Ecore_X_Event_Randr_Output_Property_Notify;
+
+typedef struct _Ecore_X_Event_Window_Delete_Request
+Ecore_X_Event_Window_Delete_Request;
+typedef struct _Ecore_X_Event_Window_Prop_Title_Change
+Ecore_X_Event_Window_Prop_Title_Change;
+typedef struct _Ecore_X_Event_Window_Prop_Visible_Title_Change
+Ecore_X_Event_Window_Prop_Visible_Title_Change;
+typedef struct _Ecore_X_Event_Window_Prop_Icon_Name_Change
+Ecore_X_Event_Window_Prop_Icon_Name_Change;
+typedef struct _Ecore_X_Event_Window_Prop_Visible_Icon_Name_Change
+Ecore_X_Event_Window_Prop_Visible_Icon_Name_Change;
+typedef struct _Ecore_X_Event_Window_Prop_Client_Machine_Change
+Ecore_X_Event_Window_Prop_Client_Machine_Change;
+typedef struct _Ecore_X_Event_Window_Prop_Name_Class_Change
+Ecore_X_Event_Window_Prop_Name_Class_Change;
+typedef struct _Ecore_X_Event_Window_Prop_Pid_Change
+Ecore_X_Event_Window_Prop_Pid_Change;
+typedef struct _Ecore_X_Event_Window_Prop_Desktop_Change
+Ecore_X_Event_Window_Prop_Desktop_Change;
+
+typedef struct _Ecore_X_Event_Window_Move_Resize_Request
+Ecore_X_Event_Window_Move_Resize_Request;
+typedef struct _Ecore_X_Event_Window_State_Request
+Ecore_X_Event_Window_State_Request;
+typedef struct _Ecore_X_Event_Frame_Extents_Request
+Ecore_X_Event_Frame_Extents_Request;
+typedef struct _Ecore_X_Event_Ping Ecore_X_Event_Ping;
+typedef struct _Ecore_X_Event_Desktop_Change Ecore_X_Event_Desktop_Change;
+
+typedef struct _Ecore_X_Event_Startup_Sequence Ecore_X_Event_Startup_Sequence;
+
+typedef struct _Ecore_X_Event_Generic Ecore_X_Event_Generic;
 
 struct _Ecore_X_Event_Mouse_In
 {
-   int                  modifiers;
-   int                  x, y;
-   int                 same_screen;
-   struct {
-      int  x, y;
+   int modifiers;
+   int x, y;
+   int same_screen;
+   struct
+   {
+      int x, y;
    } root;
-   Ecore_X_Window               win;
-   Ecore_X_Window               event_win;
-   Ecore_X_Window              root_win;
-   Ecore_X_Event_Mode          mode;
-   Ecore_X_Event_Detail                detail;
-   Ecore_X_Time                 time;
+   Ecore_X_Window win;
+   Ecore_X_Window event_win;
+   Ecore_X_Window root_win;
+   Ecore_X_Event_Mode mode;
+   Ecore_X_Event_Detail detail;
+   Ecore_X_Time time;
 };
 
 struct _Ecore_X_Event_Mouse_Out
 {
-   int                  modifiers;
-   int                  x, y;
-   int                 same_screen;
-   struct {
-      int  x, y;
+   int modifiers;
+   int x, y;
+   int same_screen;
+   struct
+   {
+      int x, y;
    } root;
-   Ecore_X_Window               win;
-   Ecore_X_Window               event_win;
-   Ecore_X_Window              root_win;
-   Ecore_X_Event_Mode          mode;
-   Ecore_X_Event_Detail                detail;
-   Ecore_X_Time                 time;
+   Ecore_X_Window win;
+   Ecore_X_Window event_win;
+   Ecore_X_Window root_win;
+   Ecore_X_Event_Mode mode;
+   Ecore_X_Event_Detail detail;
+   Ecore_X_Time time;
 };
 
 struct _Ecore_X_Event_Window_Focus_In
 {
-   Ecore_X_Window       win;
-   Ecore_X_Event_Mode   mode;
+   Ecore_X_Window win;
+   Ecore_X_Event_Mode mode;
    Ecore_X_Event_Detail detail;
-   Ecore_X_Time         time;
+   Ecore_X_Time time;
 };
 
 struct _Ecore_X_Event_Window_Focus_Out
 {
-   Ecore_X_Window       win;
-   Ecore_X_Event_Mode   mode;
+   Ecore_X_Window win;
+   Ecore_X_Event_Mode mode;
    Ecore_X_Event_Detail detail;
-   Ecore_X_Time         time;
+   Ecore_X_Time time;
 };
 
 struct _Ecore_X_Event_Window_Keymap
 {
-   Ecore_X_Window  win;
+   Ecore_X_Window win;
 };
 
 struct _Ecore_X_Event_Window_Damage
 {
-   Ecore_X_Window  win;
-   int             x, y, w, h;
-   int             count;
-   Ecore_X_Time    time;
+   Ecore_X_Window win;
+   int x, y, w, h;
+   int count;
+   Ecore_X_Time time;
 };
 
 struct _Ecore_X_Event_Window_Visibility_Change
 {
-   Ecore_X_Window  win;
-   int             fully_obscured;
-   Ecore_X_Time    time;
+   Ecore_X_Window win;
+   int fully_obscured;
+   Ecore_X_Time time;
 };
 
 struct _Ecore_X_Event_Window_Create
 {
-   Ecore_X_Window  win;
-   Ecore_X_Window  parent;
-   int             override;
-   int             x, y, w, h;
-   int             border;
-   Ecore_X_Time    time;
+   Ecore_X_Window win;
+   Ecore_X_Window parent;
+   int override;
+   int x, y, w, h;
+   int border;
+   Ecore_X_Time time;
 };
 
 struct _Ecore_X_Event_Window_Destroy
 {
-   Ecore_X_Window  win;
-   Ecore_X_Window  event_win;
-   Ecore_X_Time    time;
+   Ecore_X_Window win;
+   Ecore_X_Window event_win;
+   Ecore_X_Time time;
 };
 
 struct _Ecore_X_Event_Window_Hide
 {
-   Ecore_X_Window  win;
-   Ecore_X_Window  event_win;
-   Ecore_X_Time    time;
+   Ecore_X_Window win;
+   Ecore_X_Window event_win;
+   Ecore_X_Time time;
 };
 
 struct _Ecore_X_Event_Window_Show
 {
-   Ecore_X_Window  win;
-   Ecore_X_Window  event_win;
-   Ecore_X_Time    time;
+   Ecore_X_Window win;
+   Ecore_X_Window event_win;
+   Ecore_X_Time time;
 };
 
 struct _Ecore_X_Event_Window_Show_Request
 {
-   Ecore_X_Window  win;
-   Ecore_X_Window  parent;
-   Ecore_X_Time    time;
+   Ecore_X_Window win;
+   Ecore_X_Window parent;
+   Ecore_X_Time time;
 };
 
 struct _Ecore_X_Event_Window_Reparent
 {
-   Ecore_X_Window  win;
-   Ecore_X_Window  event_win; 
-   Ecore_X_Window  parent;
-   Ecore_X_Time    time;
+   Ecore_X_Window win;
+   Ecore_X_Window event_win;
+   Ecore_X_Window parent;
+   Ecore_X_Time time;
 };
 
 struct _Ecore_X_Event_Window_Configure
 {
-   Ecore_X_Window  win;
-   Ecore_X_Window  event_win;
-   Ecore_X_Window  abovewin;
-   int             x, y, w, h;
-   int             border;
-   unsigned int    override : 1;
-   unsigned int    from_wm : 1;
-   Ecore_X_Time    time;
+   Ecore_X_Window win;
+   Ecore_X_Window event_win;
+   Ecore_X_Window abovewin;
+   int x, y, w, h;
+   int border;
+   unsigned int override : 1;
+   unsigned int from_wm : 1;
+   Ecore_X_Time time;
 };
 
 struct _Ecore_X_Event_Window_Configure_Request
 {
-   Ecore_X_Window  win;
-   Ecore_X_Window  parent_win;
-   Ecore_X_Window  abovewin;
-   int             x, y, w, h;
-   int             border;
+   Ecore_X_Window win;
+   Ecore_X_Window parent_win;
+   Ecore_X_Window abovewin;
+   int x, y, w, h;
+   int border;
    Ecore_X_Window_Stack_Mode detail;
-   unsigned long   value_mask;
-   Ecore_X_Time    time;
+   unsigned long value_mask;
+   Ecore_X_Time time;
 };
 
 struct _Ecore_X_Event_Window_Gravity
 {
-   Ecore_X_Window  win;
-   Ecore_X_Window  event_win;
-   Ecore_X_Time    time;
+   Ecore_X_Window win;
+   Ecore_X_Window event_win;
+   Ecore_X_Time time;
 };
 
 struct _Ecore_X_Event_Window_Resize_Request
 {
-   Ecore_X_Window  win;
-   int             w, h;
-   Ecore_X_Time    time;
+   Ecore_X_Window win;
+   int w, h;
+   Ecore_X_Time time;
 };
 
 struct _Ecore_X_Event_Window_Stack
 {
-   Ecore_X_Window  win;
-   Ecore_X_Window  event_win;
+   Ecore_X_Window win;
+   Ecore_X_Window event_win;
    Ecore_X_Window_Stack_Mode detail;
-   Ecore_X_Time    time;
+   Ecore_X_Time time;
 };
 
 struct _Ecore_X_Event_Window_Stack_Request
 {
-   Ecore_X_Window  win;
-   Ecore_X_Window  parent;
+   Ecore_X_Window win;
+   Ecore_X_Window parent;
    Ecore_X_Window_Stack_Mode detail;
-   Ecore_X_Time    time;
+   Ecore_X_Time time;
 };
 
 struct _Ecore_X_Event_Window_Property
 {
-   Ecore_X_Window  win;
-   Ecore_X_Atom    atom;
-   Ecore_X_Time    time;
+   Ecore_X_Window win;
+   Ecore_X_Atom atom;
+   Ecore_X_Time time;
 };
 
 struct _Ecore_X_Event_Window_Colormap
 {
-   Ecore_X_Window   win;
+   Ecore_X_Window win;
    Ecore_X_Colormap cmap;
-   int              installed;
-   Ecore_X_Time     time;
+   int installed;
+   Ecore_X_Time time;
 };
 
 struct _Ecore_X_Event_Selection_Clear
 {
-   Ecore_X_Window    win;
+   Ecore_X_Window win;
    Ecore_X_Selection selection;
-   Ecore_X_Atom      atom;
-   Ecore_X_Time      time;
+   Ecore_X_Atom atom;
+   Ecore_X_Time time;
 };
 
 struct _Ecore_X_Event_Selection_Request
 {
-   Ecore_X_Window    owner;
-   Ecore_X_Window    requestor;
-   Ecore_X_Time      time;
-   Ecore_X_Atom      selection;
-   Ecore_X_Atom      target;
-   Ecore_X_Atom      property;
+   Ecore_X_Window owner;
+   Ecore_X_Window requestor;
+   Ecore_X_Time time;
+   Ecore_X_Atom selection;
+   Ecore_X_Atom target;
+   Ecore_X_Atom property;
 };
 
 struct _Ecore_X_Event_Selection_Notify
 {
-   Ecore_X_Window             win;
-   Ecore_X_Time               time;
-   Ecore_X_Selection          selection;
-   Ecore_X_Atom               atom;
-   char                      *target;
-   void                      *data;
+   Ecore_X_Window win;
+   Ecore_X_Time time;
+   Ecore_X_Selection selection;
+   Ecore_X_Atom atom;
+   char *target;
+   void *data;
 };
 
 struct _Ecore_X_Selection_Data
 {
    enum {
-       ECORE_X_SELECTION_CONTENT_NONE,
-       ECORE_X_SELECTION_CONTENT_TEXT,
-       ECORE_X_SELECTION_CONTENT_FILES,
-       ECORE_X_SELECTION_CONTENT_TARGETS,
-       ECORE_X_SELECTION_CONTENT_CUSTOM
+      ECORE_X_SELECTION_CONTENT_NONE,
+      ECORE_X_SELECTION_CONTENT_TEXT,
+      ECORE_X_SELECTION_CONTENT_FILES,
+      ECORE_X_SELECTION_CONTENT_TARGETS,
+      ECORE_X_SELECTION_CONTENT_CUSTOM
    } content;
-   unsigned char    *data;
-   int               length;
-   int               format;
+   unsigned char *data;
+   int length;
+   int format;
 
-   int             (*free)(void *data);
+   int (*free)(void *data);
 };
 
 struct _Ecore_X_Selection_Data_Files
 {
    Ecore_X_Selection_Data data;
-   char     **files;
-   int        num_files;
+   char **files;
+   int num_files;
 };
 
 struct _Ecore_X_Selection_Data_Text
 {
    Ecore_X_Selection_Data data;
-   char     *text;
+   char *text;
 };
 
 struct _Ecore_X_Selection_Data_Targets
 {
    Ecore_X_Selection_Data data;
-   char     **targets;
-   int        num_targets;
+   char **targets;
+   int num_targets;
 };
 
 struct _Ecore_X_Event_Xdnd_Enter
 {
-   Ecore_X_Window       win, source;
+   Ecore_X_Window win, source;
 
-   char               **types;
-   int                  num_types;
+   char **types;
+   int num_types;
 };
 
 struct _Ecore_X_Event_Xdnd_Position
 {
-   Ecore_X_Window       win, source;
-   struct {
+   Ecore_X_Window win, source;
+   struct
+   {
       int x, y;
    } position;
-   Ecore_X_Atom         action;
+   Ecore_X_Atom action;
 };
 
 struct _Ecore_X_Event_Xdnd_Status
 {
-   Ecore_X_Window       win, target;
-   int                  will_accept;
-   Ecore_X_Rectangle    rectangle;
-   Ecore_X_Atom         action;
+   Ecore_X_Window win, target;
+   int will_accept;
+   Ecore_X_Rectangle rectangle;
+   Ecore_X_Atom action;
 };
 
 struct _Ecore_X_Event_Xdnd_Leave
 {
-   Ecore_X_Window       win, source;
+   Ecore_X_Window win, source;
 };
 
 struct _Ecore_X_Event_Xdnd_Drop
 {
-   Ecore_X_Window       win, source;
-   Ecore_X_Atom         action;
-   struct {
+   Ecore_X_Window win, source;
+   Ecore_X_Atom action;
+   struct
+   {
       int x, y;
    } position;
 };
 
 struct _Ecore_X_Event_Xdnd_Finished
 {
-   Ecore_X_Window       win, target;
-   int                  completed;
-   Ecore_X_Atom         action;
+   Ecore_X_Window win, target;
+   int completed;
+   Ecore_X_Atom action;
 };
 
 struct _Ecore_X_Event_Client_Message
 {
-   Ecore_X_Window       win;
-   Ecore_X_Atom         message_type;
-   int                  format;
+   Ecore_X_Window win;
+   Ecore_X_Atom message_type;
+   int format;
    union {
-      char              b[20];
-      short             s[10];
-      long              l[5];
+      char b[20];
+      short s[10];
+      long l[5];
    }                    data;
-   Ecore_X_Time         time;
+   Ecore_X_Time time;
 };
 
 struct _Ecore_X_Event_Window_Shape
 {
-   Ecore_X_Window  win;
-   Ecore_X_Time    time;
+   Ecore_X_Window win;
+   Ecore_X_Time time;
 };
 
 struct _Ecore_X_Event_Screensaver_Notify
 {
-   Ecore_X_Window  win;
-   int             on;
-   Ecore_X_Time    time;
+   Ecore_X_Window win;
+   int on;
+   Ecore_X_Time time;
 };
 
 struct _Ecore_X_Event_Sync_Counter
 {
-   Ecore_X_Time    time;
+   Ecore_X_Time time;
 };
 
 struct _Ecore_X_Event_Sync_Alarm
 {
-   Ecore_X_Time       time;
+   Ecore_X_Time time;
    Ecore_X_Sync_Alarm alarm;
 };
 
 struct _Ecore_X_Event_Screen_Change
 {
-   Ecore_X_Window                win;
-   Ecore_X_Window                root;
-   int                           width;
-   int                           height;
-   Ecore_X_Time                  time;
-   Ecore_X_Time                  config_time;
-   int                           mm_width;   /* in millimeters */
-   int                           mm_height;  /* in millimeters */
-   Ecore_X_Randr_Rotation        rotation;
+   Ecore_X_Window win;
+   Ecore_X_Window root;
+   int width;
+   int height;
+   Ecore_X_Time time;
+   Ecore_X_Time config_time;
+   int mm_width; /* in millimeters */
+   int mm_height; /* in millimeters */
+   Ecore_X_Randr_Rotation rotation;
    Ecore_X_Render_Subpixel_Order subpixel_order;
-   Ecore_X_Randr_Size_ID         size_id;
+   Ecore_X_Randr_Size_ID size_id;
 };
 
 struct _Ecore_X_Event_Randr_Crtc_Change
 {
-   Ecore_X_Window                win;
-   Ecore_X_Randr_Crtc            crtc;
-   Ecore_X_Randr_Mode            mode;
-   Ecore_X_Randr_Rotation        rotation;
-   int                           x;
-   int                           y;
-   int                           width;
-   int                           height;
+   Ecore_X_Window win;
+   Ecore_X_Randr_Crtc crtc;
+   Ecore_X_Randr_Mode mode;
+   Ecore_X_Randr_Rotation rotation;
+   int x;
+   int y;
+   int width;
+   int height;
 };
 
 struct _Ecore_X_Event_Randr_Output_Change
 {
-   Ecore_X_Window                win;
-   Ecore_X_Randr_Output          output;
-   Ecore_X_Randr_Crtc            crtc;
-   Ecore_X_Randr_Mode            mode;
-   Ecore_X_Randr_Rotation        rotation;
-   Ecore_X_Randr_Connection      connection;
+   Ecore_X_Window win;
+   Ecore_X_Randr_Output output;
+   Ecore_X_Randr_Crtc crtc;
+   Ecore_X_Randr_Mode mode;
+   Ecore_X_Randr_Rotation rotation;
+   Ecore_X_Randr_Connection connection;
    Ecore_X_Render_Subpixel_Order subpixel_order;
 };
 
 struct _Ecore_X_Event_Randr_Output_Property_Notify
 {
-   Ecore_X_Window                win;
-   Ecore_X_Randr_Output          output;
-   Ecore_X_Atom                  property;
-   Ecore_X_Time                  time;
-   int                           state; /* NewValue, Deleted */
+   Ecore_X_Window win;
+   Ecore_X_Randr_Output output;
+   Ecore_X_Atom property;
+   Ecore_X_Time time;
+   int state; /* NewValue, Deleted */
 };
 
 struct _Ecore_X_Event_Window_Delete_Request
 {
-   Ecore_X_Window  win;
-   Ecore_X_Time    time;
+   Ecore_X_Window win;
+   Ecore_X_Time time;
 };
 
 struct _Ecore_X_Event_Window_Prop_Title_Change
 {
-   Ecore_X_Window  win;
-   char   *title;
-   Ecore_X_Time    time;
+   Ecore_X_Window win;
+   char *title;
+   Ecore_X_Time time;
 };
 
 struct _Ecore_X_Event_Window_Prop_Visible_Title_Change
 {
-   Ecore_X_Window  win;
-   char   *title;
-   Ecore_X_Time    time;
+   Ecore_X_Window win;
+   char *title;
+   Ecore_X_Time time;
 };
 
 struct _Ecore_X_Event_Window_Prop_Icon_Name_Change
 {
-   Ecore_X_Window  win;
-   char   *name;
-   Ecore_X_Time    time;
+   Ecore_X_Window win;
+   char *name;
+   Ecore_X_Time time;
 };
 
 struct _Ecore_X_Event_Window_Prop_Visible_Icon_Name_Change
 {
-   Ecore_X_Window  win;
-   char   *name;
-   Ecore_X_Time    time;
+   Ecore_X_Window win;
+   char *name;
+   Ecore_X_Time time;
 };
 
 struct _Ecore_X_Event_Window_Prop_Client_Machine_Change
 {
-   Ecore_X_Window  win;
-   char   *name;
-   Ecore_X_Time    time;
+   Ecore_X_Window win;
+   char *name;
+   Ecore_X_Time time;
 };
 
 struct _Ecore_X_Event_Window_Prop_Name_Class_Change
 {
-   Ecore_X_Window  win;
-   char   *name;
-   char   *clas;
-   Ecore_X_Time    time;
+   Ecore_X_Window win;
+   char *name;
+   char *clas;
+   Ecore_X_Time time;
 };
 
 struct _Ecore_X_Event_Window_Prop_Pid_Change
 {
-   Ecore_X_Window  win;
-   pid_t   pid;
-   Ecore_X_Time    time;
+   Ecore_X_Window win;
+   pid_t pid;
+   Ecore_X_Time time;
 };
 
 struct _Ecore_X_Event_Window_Prop_Desktop_Change
 {
-   Ecore_X_Window  win;
-   long    desktop;
-   Ecore_X_Time    time;
+   Ecore_X_Window win;
+   long desktop;
+   Ecore_X_Time time;
 };
 
 struct _Ecore_X_Event_Startup_Sequence
 {
-   Ecore_X_Window  win;
+   Ecore_X_Window win;
 };
 
 struct _Ecore_X_Event_Window_Move_Resize_Request
 {
    Ecore_X_Window win;
-   int            x, y;
-   int            direction;
-   int            button;
-   int            source;
+   int x, y;
+   int direction;
+   int button;
+   int source;
 };
 
 struct _Ecore_X_Event_Window_State_Request
 {
-   Ecore_X_Window              win;
+   Ecore_X_Window win;
    Ecore_X_Window_State_Action action;
-   Ecore_X_Window_State        state[2];
-   int                         source;
+   Ecore_X_Window_State state[2];
+   int source;
 };
 
 struct _Ecore_X_Event_Frame_Extents_Request
 {
-   Ecore_X_Window              win;
+   Ecore_X_Window win;
 };
 
 struct _Ecore_X_Event_Ping
 {
-   Ecore_X_Window  win;
-   Ecore_X_Window  event_win;
-   Ecore_X_Time    time;
+   Ecore_X_Window win;
+   Ecore_X_Window event_win;
+   Ecore_X_Time time;
 };
 
 struct _Ecore_X_Event_Desktop_Change
 {
-   Ecore_X_Window              win;
-   unsigned int                desk;
-   int                         source;
+   Ecore_X_Window win;
+   unsigned int desk;
+   int source;
 };
 
 struct _Ecore_X_Event_Generic
 {
-   int            extension;
-   int            evtype;
-   unsigned int   cookie;
-   void           *data;
+   int extension;
+   int evtype;
+   unsigned int cookie;
+   void *data;
 };
 
 EAPI extern int ECORE_X_EVENT_ANY; /**< low level event dependent on
-                                       backend in use, if Xlib will be XEvent,
-                                       if XCB will be xcb_generic_event_t.
-                                       @warning avoid using it.
-                                  */
+                                        backend in use, if Xlib will be XEvent,
+                                        if XCB will be xcb_generic_event_t.
+                                        @warning avoid using it.
+                                    */
 EAPI extern int ECORE_X_EVENT_MOUSE_IN;
 EAPI extern int ECORE_X_EVENT_MOUSE_OUT;
 EAPI extern int ECORE_X_EVENT_WINDOW_FOCUS_IN;
@@ -882,15 +908,15 @@ EAPI extern int ECORE_X_EVENT_DAMAGE_NOTIFY;
 
 EAPI extern int ECORE_X_EVENT_WINDOW_DELETE_REQUEST;
 /*
-EAPI extern int ECORE_X_EVENT_WINDOW_PROP_TITLE_CHANGE;
-EAPI extern int ECORE_X_EVENT_WINDOW_PROP_VISIBLE_TITLE_CHANGE;
-EAPI extern int ECORE_X_EVENT_WINDOW_PROP_ICON_NAME_CHANGE;
-EAPI extern int ECORE_X_EVENT_WINDOW_PROP_VISIBLE_ICON_NAME_CHANGE;
-EAPI extern int ECORE_X_EVENT_WINDOW_PROP_CLIENT_MACHINE_CHANGE;
-EAPI extern int ECORE_X_EVENT_WINDOW_PROP_NAME_CLASS_CHANGE;
-EAPI extern int ECORE_X_EVENT_WINDOW_PROP_PID_CHANGE;
-EAPI extern int ECORE_X_EVENT_WINDOW_PROP_DESKTOP_CHANGE;
-*/
+   EAPI extern int ECORE_X_EVENT_WINDOW_PROP_TITLE_CHANGE;
+   EAPI extern int ECORE_X_EVENT_WINDOW_PROP_VISIBLE_TITLE_CHANGE;
+   EAPI extern int ECORE_X_EVENT_WINDOW_PROP_ICON_NAME_CHANGE;
+   EAPI extern int ECORE_X_EVENT_WINDOW_PROP_VISIBLE_ICON_NAME_CHANGE;
+   EAPI extern int ECORE_X_EVENT_WINDOW_PROP_CLIENT_MACHINE_CHANGE;
+   EAPI extern int ECORE_X_EVENT_WINDOW_PROP_NAME_CLASS_CHANGE;
+   EAPI extern int ECORE_X_EVENT_WINDOW_PROP_PID_CHANGE;
+   EAPI extern int ECORE_X_EVENT_WINDOW_PROP_DESKTOP_CHANGE;
+ */
 
 EAPI extern int ECORE_X_EVENT_WINDOW_MOVE_RESIZE_REQUEST;
 EAPI extern int ECORE_X_EVENT_WINDOW_STATE_REQUEST;
@@ -915,7 +941,7 @@ EAPI extern int ECORE_X_LOCK_SCROLL;
 EAPI extern int ECORE_X_LOCK_NUM;
 EAPI extern int ECORE_X_LOCK_CAPS;
 
-typedef enum _Ecore_X_WM_Protocol 
+typedef enum _Ecore_X_WM_Protocol
 {
    /* If enabled the window manager will be asked to send a
     * delete message instead of just closing (destroying) the window. */
@@ -937,7 +963,7 @@ typedef enum _Ecore_X_WM_Protocol
    ECORE_X_WM_PROTOCOL_NUM
 } Ecore_X_WM_Protocol;
 
-typedef enum _Ecore_X_Window_Input_Mode 
+typedef enum _Ecore_X_Window_Input_Mode
 {
    /* The window can never be focused */
    ECORE_X_WINDOW_INPUT_MODE_NONE,
@@ -954,7 +980,7 @@ typedef enum _Ecore_X_Window_Input_Mode
    ECORE_X_WINDOW_INPUT_MODE_ACTIVE_GLOBAL
 } Ecore_X_Window_Input_Mode;
 
-typedef enum _Ecore_X_Window_State_Hint 
+typedef enum _Ecore_X_Window_State_Hint
 {
    /** Do not provide any state hint to the window manager */
    ECORE_X_WINDOW_STATE_HINT_NONE = -1,
@@ -969,26 +995,26 @@ typedef enum _Ecore_X_Window_State_Hint
    ECORE_X_WINDOW_STATE_HINT_ICONIC
 } Ecore_X_Window_State_Hint;
 
-typedef enum _Ecore_X_Window_Type 
-{
-     ECORE_X_WINDOW_TYPE_UNKNOWN = 0,
-     ECORE_X_WINDOW_TYPE_DESKTOP,
-     ECORE_X_WINDOW_TYPE_DOCK,
-     ECORE_X_WINDOW_TYPE_TOOLBAR,
-     ECORE_X_WINDOW_TYPE_MENU,
-     ECORE_X_WINDOW_TYPE_UTILITY,
-     ECORE_X_WINDOW_TYPE_SPLASH,
-     ECORE_X_WINDOW_TYPE_DIALOG,
-     ECORE_X_WINDOW_TYPE_NORMAL,
-     ECORE_X_WINDOW_TYPE_DROPDOWN_MENU,
-     ECORE_X_WINDOW_TYPE_POPUP_MENU,
-     ECORE_X_WINDOW_TYPE_TOOLTIP,
-     ECORE_X_WINDOW_TYPE_NOTIFICATION,
-     ECORE_X_WINDOW_TYPE_COMBO,
-     ECORE_X_WINDOW_TYPE_DND
+typedef enum _Ecore_X_Window_Type
+{
+   ECORE_X_WINDOW_TYPE_UNKNOWN = 0,
+   ECORE_X_WINDOW_TYPE_DESKTOP,
+   ECORE_X_WINDOW_TYPE_DOCK,
+   ECORE_X_WINDOW_TYPE_TOOLBAR,
+   ECORE_X_WINDOW_TYPE_MENU,
+   ECORE_X_WINDOW_TYPE_UTILITY,
+   ECORE_X_WINDOW_TYPE_SPLASH,
+   ECORE_X_WINDOW_TYPE_DIALOG,
+   ECORE_X_WINDOW_TYPE_NORMAL,
+   ECORE_X_WINDOW_TYPE_DROPDOWN_MENU,
+   ECORE_X_WINDOW_TYPE_POPUP_MENU,
+   ECORE_X_WINDOW_TYPE_TOOLTIP,
+   ECORE_X_WINDOW_TYPE_NOTIFICATION,
+   ECORE_X_WINDOW_TYPE_COMBO,
+   ECORE_X_WINDOW_TYPE_DND
 } Ecore_X_Window_Type;
 
-typedef enum _Ecore_X_Action 
+typedef enum _Ecore_X_Action
 {
    ECORE_X_ACTION_MOVE,
    ECORE_X_ACTION_RESIZE,
@@ -1004,7 +1030,7 @@ typedef enum _Ecore_X_Action
    ECORE_X_ACTION_BELOW
 } Ecore_X_Action;
 
-typedef enum _Ecore_X_Window_Configure_Mask 
+typedef enum _Ecore_X_Window_Configure_Mask
 {
    ECORE_X_WINDOW_CONFIGURE_MASK_X = (1 << 0),
    ECORE_X_WINDOW_CONFIGURE_MASK_Y = (1 << 1),
@@ -1015,7 +1041,7 @@ typedef enum _Ecore_X_Window_Configure_Mask
    ECORE_X_WINDOW_CONFIGURE_MASK_STACK_MODE = (1 << 6)
 } Ecore_X_Window_Configure_Mask;
 
-typedef enum _Ecore_X_Virtual_Keyboard_State 
+typedef enum _Ecore_X_Virtual_Keyboard_State
 {
    ECORE_X_VIRTUAL_KEYBOARD_STATE_UNKNOWN = 0,
    ECORE_X_VIRTUAL_KEYBOARD_STATE_OFF,
@@ -1035,18 +1061,18 @@ typedef enum _Ecore_X_Virtual_Keyboard_State
    ECORE_X_VIRTUAL_KEYBOARD_STATE_J2ME
 } Ecore_X_Virtual_Keyboard_State;
 
-typedef enum _Ecore_X_Illume_Mode 
+typedef enum _Ecore_X_Illume_Mode
 {
-   ECORE_X_ILLUME_MODE_UNKNOWN = 0, 
-   ECORE_X_ILLUME_MODE_SINGLE, 
-   ECORE_X_ILLUME_MODE_DUAL_TOP, 
+   ECORE_X_ILLUME_MODE_UNKNOWN = 0,
+   ECORE_X_ILLUME_MODE_SINGLE,
+   ECORE_X_ILLUME_MODE_DUAL_TOP,
    ECORE_X_ILLUME_MODE_DUAL_LEFT
 } Ecore_X_Illume_Mode;
 
-typedef enum _Ecore_X_Illume_Quickpanel_State 
+typedef enum _Ecore_X_Illume_Quickpanel_State
 {
-   ECORE_X_ILLUME_QUICKPANEL_STATE_UNKNOWN = 0, 
-   ECORE_X_ILLUME_QUICKPANEL_STATE_OFF, 
+   ECORE_X_ILLUME_QUICKPANEL_STATE_UNKNOWN = 0,
+   ECORE_X_ILLUME_QUICKPANEL_STATE_OFF,
    ECORE_X_ILLUME_QUICKPANEL_STATE_ON
 } Ecore_X_Illume_Quickpanel_State;
 
@@ -1060,367 +1086,697 @@ typedef enum _Ecore_X_Illume_Quickpanel_State
 #define ECORE_X_PROP_LIST_ADD 1
 #define ECORE_X_PROP_LIST_TOGGLE 2
 
-EAPI int              ecore_x_init(const char *name);
-EAPI int              ecore_x_shutdown(void);
-EAPI int              ecore_x_disconnect(void);
-EAPI Ecore_X_Display *ecore_x_display_get(void);
+EAPI int                 ecore_x_init(const char *name);
+EAPI int                 ecore_x_shutdown(void);
+EAPI int                 ecore_x_disconnect(void);
+EAPI Ecore_X_Display *   ecore_x_display_get(void);
 EAPI Ecore_X_Connection *ecore_x_connection_get(void);
-EAPI int              ecore_x_fd_get(void);
-EAPI Ecore_X_Screen  *ecore_x_default_screen_get(void);
-EAPI void             ecore_x_double_click_time_set(double t);
-EAPI double           ecore_x_double_click_time_get(void);
-EAPI void             ecore_x_flush(void);
-EAPI void             ecore_x_sync(void);
-EAPI void             ecore_x_killall(Ecore_X_Window root);
-EAPI void             ecore_x_kill(Ecore_X_Window win);
-EAPI int              ecore_x_dpi_get(void);
-EAPI Eina_Bool        ecore_x_bell(int percent);
-
-EAPI Ecore_X_Time     ecore_x_current_time_get(void);
-
-EAPI void             ecore_x_error_handler_set(void (*func) (void *data), const void *data);
-EAPI void             ecore_x_io_error_handler_set(void (*func) (void *data), const void *data);
-EAPI int              ecore_x_error_request_get(void);
-EAPI int              ecore_x_error_code_get(void);
-
-EAPI void             ecore_x_event_mask_set(Ecore_X_Window w, Ecore_X_Event_Mask mask);
-EAPI void             ecore_x_event_mask_unset(Ecore_X_Window w, Ecore_X_Event_Mask mask);
-
-EAPI int              ecore_x_selection_notify_send(Ecore_X_Window requestor, Ecore_X_Atom selection, Ecore_X_Atom target, Ecore_X_Atom property, Ecore_X_Time time);
-EAPI void             ecore_x_selection_primary_prefetch(void);
-EAPI void             ecore_x_selection_primary_fetch(void);
-EAPI int              ecore_x_selection_primary_set(Ecore_X_Window w, const void *data, int size);
-EAPI int              ecore_x_selection_primary_clear(void);
-EAPI void             ecore_x_selection_secondary_prefetch(void);
-EAPI void             ecore_x_selection_secondary_fetch(void);
-EAPI int              ecore_x_selection_secondary_set(Ecore_X_Window w, const void *data, int size);
-EAPI int              ecore_x_selection_secondary_clear(void);
-EAPI void             ecore_x_selection_xdnd_prefetch(void);
-EAPI void             ecore_x_selection_xdnd_fetch(void);
-EAPI int              ecore_x_selection_xdnd_set(Ecore_X_Window w, const void *data, int size);
-EAPI int              ecore_x_selection_xdnd_clear(void);
-EAPI void             ecore_x_selection_clipboard_prefetch(void);
-EAPI void             ecore_x_selection_clipboard_fetch(void);
-EAPI int              ecore_x_selection_clipboard_set(Ecore_X_Window w, const void *data, int size);
-EAPI int              ecore_x_selection_clipboard_clear(void);
-EAPI void             ecore_x_selection_primary_request(Ecore_X_Window w, const char *target);
-EAPI void             ecore_x_selection_secondary_request(Ecore_X_Window w, const char *target);
-EAPI void             ecore_x_selection_xdnd_request(Ecore_X_Window w, const char *target);
-EAPI void             ecore_x_selection_clipboard_request(Ecore_X_Window w, const char *target);
-EAPI int              ecore_x_selection_convert(Ecore_X_Atom selection, Ecore_X_Atom target, void **data_ret, int *len, Ecore_X_Atom *targprop, int *targsize);
-EAPI void             ecore_x_selection_converter_add(char *target, int (*func)(char *target, void *data, int size, void **data_ret, int *size_ret, Ecore_X_Atom *, int *));
-EAPI void             ecore_x_selection_converter_atom_add(Ecore_X_Atom target, int (*func)(char *target, void *data, int size, void **data_ret, int *size_ret, Ecore_X_Atom *tprop, int *tsize));
-EAPI void             ecore_x_selection_converter_del(char *target);
-EAPI void             ecore_x_selection_converter_atom_del(Ecore_X_Atom target);
-EAPI void             ecore_x_selection_parser_add(const char *target, void *(*func)(const char *target, void *data, int size, int format));
-EAPI void             ecore_x_selection_parser_del(const char *target);
-
-EAPI void             ecore_x_dnd_aware_set(Ecore_X_Window win, int on);
-EAPI void             ecore_x_dnd_version_get_prefetch(Ecore_X_Window window);
-EAPI void             ecore_x_dnd_version_get_fetch(void);
-EAPI int              ecore_x_dnd_version_get(Ecore_X_Window win);
-EAPI void             ecore_x_dnd_type_get_prefetch(Ecore_X_Window window);
-EAPI void             ecore_x_dnd_type_get_fetch(void);
-EAPI int              ecore_x_dnd_type_isset(Ecore_X_Window win, const char *type);
-EAPI void             ecore_x_dnd_type_set(Ecore_X_Window win, const char *type, int on);
-EAPI void             ecore_x_dnd_types_set(Ecore_X_Window win, const char **types, unsigned int num_types);
-EAPI void             ecore_x_dnd_actions_set(Ecore_X_Window win, Ecore_X_Atom *actions, unsigned int num_actions);
-EAPI void             ecore_x_dnd_begin_prefetch(Ecore_X_Window source);
-EAPI void             ecore_x_dnd_begin_fetch(void);
-EAPI int              ecore_x_dnd_begin(Ecore_X_Window source, unsigned char *data, int size);
-EAPI int              ecore_x_dnd_drop(void);
-EAPI void             ecore_x_dnd_send_status(int will_accept, int suppress, Ecore_X_Rectangle rectangle, Ecore_X_Atom action);
-EAPI void             ecore_x_dnd_send_finished(void);
-EAPI void             ecore_x_dnd_source_action_set(Ecore_X_Atom action);
-EAPI Ecore_X_Atom     ecore_x_dnd_source_action_get(void);
-
-EAPI Ecore_X_Window   ecore_x_window_new(Ecore_X_Window parent, int x, int y, int w, int h);
-EAPI Ecore_X_Window   ecore_x_window_override_new(Ecore_X_Window parent, int x, int y, int w, int h);
-EAPI int              ecore_x_window_argb_get(Ecore_X_Window win);
-EAPI Ecore_X_Window   ecore_x_window_manager_argb_new(Ecore_X_Window parent, int x, int y, int w, int h);
-EAPI Ecore_X_Window   ecore_x_window_argb_new(Ecore_X_Window parent, int x, int y, int w, int h);
-EAPI Ecore_X_Window   ecore_x_window_override_argb_new(Ecore_X_Window parent, int x, int y, int w, int h);
-EAPI Ecore_X_Window   ecore_x_window_input_new(Ecore_X_Window parent, int x, int y, int w, int h);
-EAPI void             ecore_x_window_configure(Ecore_X_Window win,
-                                              Ecore_X_Window_Configure_Mask mask,
-                                              int x, int y, int w, int h,
-                                              int border_width,
-                                              Ecore_X_Window sibling,
-                                              int stack_mode);
-EAPI void             ecore_x_window_cursor_set(Ecore_X_Window win, Ecore_X_Cursor c);
-EAPI void             ecore_x_window_free(Ecore_X_Window win);
-EAPI void             ecore_x_window_ignore_set(Ecore_X_Window win, int ignore);
-EAPI Ecore_X_Window  *ecore_x_window_ignore_list(int *num);
-
-EAPI void             ecore_x_window_delete_request_send(Ecore_X_Window win);
-EAPI void             ecore_x_window_show(Ecore_X_Window win);
-EAPI void             ecore_x_window_hide(Ecore_X_Window win);
-EAPI void             ecore_x_window_move(Ecore_X_Window win, int x, int y);
-EAPI void             ecore_x_window_resize(Ecore_X_Window win, int w, int h);
-EAPI void             ecore_x_window_move_resize(Ecore_X_Window win, int x, int y, int w, int h);
-EAPI void             ecore_x_window_focus(Ecore_X_Window win);
-EAPI void             ecore_x_window_focus_at_time(Ecore_X_Window win, Ecore_X_Time t);
-EAPI void             ecore_x_get_input_focus_prefetch(void);
-EAPI void             ecore_x_get_input_focus_fetch(void);
-EAPI Ecore_X_Window   ecore_x_window_focus_get(void);
-EAPI void             ecore_x_window_raise(Ecore_X_Window win);
-EAPI void             ecore_x_window_lower(Ecore_X_Window win);
-EAPI void             ecore_x_window_reparent(Ecore_X_Window win, Ecore_X_Window new_parent, int x, int y);
-EAPI void             ecore_x_window_size_get(Ecore_X_Window win, int *w, int *h);
-EAPI void             ecore_x_window_geometry_get(Ecore_X_Window win, int *x, int *y, int *w, int *h);
-EAPI int              ecore_x_window_border_width_get(Ecore_X_Window win);
-EAPI void             ecore_x_window_border_width_set(Ecore_X_Window win, int width);
-EAPI int              ecore_x_window_depth_get(Ecore_X_Window win);
-EAPI void             ecore_x_window_cursor_show(Ecore_X_Window win, int show);
-EAPI void             ecore_x_window_defaults_set(Ecore_X_Window win);
-EAPI int              ecore_x_window_visible_get(Ecore_X_Window win);
-EAPI Ecore_X_Window   ecore_x_window_shadow_tree_at_xy_with_skip_get(Ecore_X_Window base, int x, int y, Ecore_X_Window *skip, int skip_num);
-EAPI Ecore_X_Window   ecore_x_window_shadow_parent_get(Ecore_X_Window root, Ecore_X_Window win);
-EAPI void             ecore_x_window_shadow_tree_flush(void);
-EAPI Ecore_X_Window   ecore_x_window_root_get(Ecore_X_Window win);
-EAPI Ecore_X_Window   ecore_x_window_at_xy_get(int x, int y);
-EAPI Ecore_X_Window   ecore_x_window_at_xy_with_skip_get(int x, int y, Ecore_X_Window *skip, int skip_num);
-EAPI Ecore_X_Window   ecore_x_window_at_xy_begin_get(Ecore_X_Window begin, int x, int y);
-EAPI void             ecore_x_query_tree_prefetch(Ecore_X_Window window);
-EAPI void             ecore_x_query_tree_fetch(void);
-EAPI Ecore_X_Window   ecore_x_window_parent_get(Ecore_X_Window win);
-
-EAPI void             ecore_x_window_background_color_set(Ecore_X_Window win,
-                                                         unsigned short r,
-                                                         unsigned short g,
-                                                         unsigned short b);
-EAPI void             ecore_x_window_gravity_set(Ecore_X_Window win,
-                                                Ecore_X_Gravity grav);
-EAPI void             ecore_x_window_pixel_gravity_set(Ecore_X_Window win,
-                                                      Ecore_X_Gravity grav);
-EAPI void             ecore_x_window_pixmap_set(Ecore_X_Window win,
-                                               Ecore_X_Pixmap pmap);
-EAPI void             ecore_x_window_area_clear(Ecore_X_Window win,
-                                               int x, int y, int w, int h);
-EAPI void             ecore_x_window_area_expose(Ecore_X_Window win,
-                                                int x, int y, int w, int h);
-EAPI void             ecore_x_window_override_set(Ecore_X_Window win, int override);
-
-EAPI void             ecore_x_window_prop_card32_set(Ecore_X_Window win, Ecore_X_Atom atom,
-                                                    unsigned int *val, unsigned int num);
-EAPI void             ecore_x_window_prop_card32_get_prefetch(Ecore_X_Window window,
-                                                              Ecore_X_Atom atom);
-EAPI void             ecore_x_window_prop_card32_get_fetch(void);
-EAPI int              ecore_x_window_prop_card32_get(Ecore_X_Window win, Ecore_X_Atom atom,
-                                                    unsigned int *val, unsigned int len);
-EAPI int              ecore_x_window_prop_card32_list_get(Ecore_X_Window win,
-                                                          Ecore_X_Atom atom,
-                                                          unsigned int **plst);
-
-EAPI void             ecore_x_window_prop_xid_set(Ecore_X_Window win,
-                                                  Ecore_X_Atom atom,
-                                                  Ecore_X_Atom type,
-                                                  Ecore_X_ID * lst,
-                                                  unsigned int num);
-EAPI void             ecore_x_window_prop_xid_get_prefetch(Ecore_X_Window window,
-                                                           Ecore_X_Atom   atom,
-                                                           Ecore_X_Atom   type);
-EAPI void             ecore_x_window_prop_xid_get_fetch(void);
-EAPI int              ecore_x_window_prop_xid_get(Ecore_X_Window win,
-                                                  Ecore_X_Atom atom,
-                                                  Ecore_X_Atom type,
-                                                  Ecore_X_ID * lst,
-                                                  unsigned int len);
-EAPI int              ecore_x_window_prop_xid_list_get(Ecore_X_Window win,
-                                                       Ecore_X_Atom atom,
-                                                       Ecore_X_Atom type,
-                                                       Ecore_X_ID ** plst);
-EAPI void             ecore_x_window_prop_xid_list_change(Ecore_X_Window win,
-                                                          Ecore_X_Atom atom,
-                                                          Ecore_X_Atom type,
-                                                          Ecore_X_ID item,
-                                                          int op);
-EAPI void             ecore_x_window_prop_atom_set(Ecore_X_Window win,
-                                                   Ecore_X_Atom atom,
-                                                   Ecore_X_Atom * val,
-                                                   unsigned int num);
-EAPI void             ecore_x_window_prop_atom_get_prefetch(Ecore_X_Window window,
-                                                            Ecore_X_Atom   atom);
-EAPI void             ecore_x_window_prop_atom_get_fetch(void);
-EAPI int              ecore_x_window_prop_atom_get(Ecore_X_Window win,
-                                                   Ecore_X_Atom atom,
-                                                   Ecore_X_Atom * val,
-                                                   unsigned int len);
-EAPI int              ecore_x_window_prop_atom_list_get(Ecore_X_Window win,
-                                                        Ecore_X_Atom atom,
-                                                        Ecore_X_Atom ** plst);
-EAPI void             ecore_x_window_prop_atom_list_change(Ecore_X_Window win,
-                                                           Ecore_X_Atom atom,
-                                                           Ecore_X_Atom item,
-                                                           int op);
-EAPI void             ecore_x_window_prop_window_set(Ecore_X_Window win,
-                                                     Ecore_X_Atom atom,
-                                                     Ecore_X_Window * val,
-                                                     unsigned int num);
-EAPI void             ecore_x_window_prop_window_get_prefetch(Ecore_X_Window window,
-                                                              Ecore_X_Atom   atom);
-EAPI void             ecore_x_window_prop_window_get_fetch(void);
-EAPI int              ecore_x_window_prop_window_get(Ecore_X_Window win,
-                                                     Ecore_X_Atom atom,
-                                                     Ecore_X_Window * val,
-                                                     unsigned int len);
-EAPI int              ecore_x_window_prop_window_list_get(Ecore_X_Window win,
-                                                          Ecore_X_Atom atom,
-                                                          Ecore_X_Window ** plst);
-
-EAPI Ecore_X_Atom     ecore_x_window_prop_any_type(void);
-EAPI void             ecore_x_window_prop_property_set(Ecore_X_Window win, Ecore_X_Atom type, Ecore_X_Atom format, int size, void *data, int number);
-EAPI void             ecore_x_window_prop_property_get_prefetch(Ecore_X_Window window,
-                                                                Ecore_X_Atom   property,
-                                                                Ecore_X_Atom   type);
-EAPI void             ecore_x_window_prop_property_get_fetch(void);
-EAPI int              ecore_x_window_prop_property_get(Ecore_X_Window win, Ecore_X_Atom property, Ecore_X_Atom type, int size, unsigned char **data, int *num);
-EAPI void             ecore_x_window_prop_property_del(Ecore_X_Window win, Ecore_X_Atom property);
-EAPI void             ecore_x_window_prop_list_prefetch(Ecore_X_Window window);
-EAPI void             ecore_x_window_prop_list_fetch(void);
-EAPI Ecore_X_Atom    *ecore_x_window_prop_list(Ecore_X_Window win, int *num_ret);
-EAPI void             ecore_x_window_prop_string_set(Ecore_X_Window win, Ecore_X_Atom type, const char *str);
-EAPI void             ecore_x_window_prop_string_get_prefetch(Ecore_X_Window window,
-                                                              Ecore_X_Atom   type);
-EAPI void             ecore_x_window_prop_string_get_fetch(void);
-EAPI char            *ecore_x_window_prop_string_get(Ecore_X_Window win, Ecore_X_Atom type);
-EAPI int              ecore_x_window_prop_protocol_isset(Ecore_X_Window win, Ecore_X_WM_Protocol protocol);
-EAPI Ecore_X_WM_Protocol *ecore_x_window_prop_protocol_list_get(Ecore_X_Window win, int *num_ret);
-
-EAPI void               ecore_x_window_shape_mask_set(Ecore_X_Window win, Ecore_X_Pixmap mask);
-EAPI void               ecore_x_window_shape_window_set(Ecore_X_Window win, Ecore_X_Window shape_win);
-EAPI void               ecore_x_window_shape_window_set_xy(Ecore_X_Window win, Ecore_X_Window shape_win, int x, int y);
-EAPI void               ecore_x_window_shape_rectangle_set(Ecore_X_Window win, int x, int y, int w, int h);
-EAPI void               ecore_x_window_shape_rectangles_set(Ecore_X_Window win, Ecore_X_Rectangle *rects, int num);
-EAPI void               ecore_x_window_shape_window_add(Ecore_X_Window win, Ecore_X_Window shape_win);
-EAPI void               ecore_x_window_shape_window_add_xy(Ecore_X_Window win, Ecore_X_Window shape_win, int x, int y);
-EAPI void               ecore_x_window_shape_rectangle_add(Ecore_X_Window win, int x, int y, int w, int h);
-EAPI void               ecore_x_window_shape_rectangle_clip(Ecore_X_Window win, int x, int y, int w, int h);
-EAPI void               ecore_x_window_shape_rectangles_add(Ecore_X_Window win, Ecore_X_Rectangle *rects, int num);
-EAPI void               ecore_x_window_shape_rectangles_get_prefetch(Ecore_X_Window window);
+EAPI int                 ecore_x_fd_get(void);
+EAPI Ecore_X_Screen *    ecore_x_default_screen_get(void);
+EAPI void                ecore_x_double_click_time_set(double t);
+EAPI double              ecore_x_double_click_time_get(void);
+EAPI void                ecore_x_flush(void);
+EAPI void                ecore_x_sync(void);
+EAPI void                ecore_x_killall(Ecore_X_Window root);
+EAPI void                ecore_x_kill(Ecore_X_Window win);
+EAPI int                 ecore_x_dpi_get(void);
+EAPI Eina_Bool           ecore_x_bell(int percent);
+
+EAPI Ecore_X_Time        ecore_x_current_time_get(void);
+
+EAPI void ecore_x_error_handler_set(void (*func)(void *data), const void *data);
+EAPI void ecore_x_io_error_handler_set(void (*func)(
+                                          void *data), const void *data);
+EAPI int                 ecore_x_error_request_get(void);
+EAPI int                 ecore_x_error_code_get(void);
+
+EAPI void                ecore_x_event_mask_set(Ecore_X_Window w,
+                                                Ecore_X_Event_Mask mask);
+EAPI void                ecore_x_event_mask_unset(Ecore_X_Window w,
+                                                  Ecore_X_Event_Mask mask);
+
+EAPI int                 ecore_x_selection_notify_send(Ecore_X_Window requestor,
+                                                       Ecore_X_Atom selection,
+                                                       Ecore_X_Atom target,
+                                                       Ecore_X_Atom property,
+                                                       Ecore_X_Time time);
+EAPI void                ecore_x_selection_primary_prefetch(void);
+EAPI void                ecore_x_selection_primary_fetch(void);
+EAPI int                 ecore_x_selection_primary_set(Ecore_X_Window w,
+                                                       const void *data,
+                                                       int size);
+EAPI int                 ecore_x_selection_primary_clear(void);
+EAPI void                ecore_x_selection_secondary_prefetch(void);
+EAPI void                ecore_x_selection_secondary_fetch(void);
+EAPI int                 ecore_x_selection_secondary_set(Ecore_X_Window w,
+                                                         const void *data,
+                                                         int size);
+EAPI int                 ecore_x_selection_secondary_clear(void);
+EAPI void                ecore_x_selection_xdnd_prefetch(void);
+EAPI void                ecore_x_selection_xdnd_fetch(void);
+EAPI int                 ecore_x_selection_xdnd_set(Ecore_X_Window w,
+                                                    const void *data,
+                                                    int size);
+EAPI int                 ecore_x_selection_xdnd_clear(void);
+EAPI void                ecore_x_selection_clipboard_prefetch(void);
+EAPI void                ecore_x_selection_clipboard_fetch(void);
+EAPI int                 ecore_x_selection_clipboard_set(Ecore_X_Window w,
+                                                         const void *data,
+                                                         int size);
+EAPI int                 ecore_x_selection_clipboard_clear(void);
+EAPI void                ecore_x_selection_primary_request(Ecore_X_Window w,
+                                                           const char *target);
+EAPI void                ecore_x_selection_secondary_request(Ecore_X_Window w,
+                                                             const char *target);
+EAPI void                ecore_x_selection_xdnd_request(Ecore_X_Window w,
+                                                        const char *target);
+EAPI void                ecore_x_selection_clipboard_request(Ecore_X_Window w,
+                                                             const char *target);
+EAPI int                 ecore_x_selection_convert(Ecore_X_Atom selection,
+                                                   Ecore_X_Atom target,
+                                                   void **data_ret,
+                                                   int *len,
+                                                   Ecore_X_Atom *targprop,
+                                                   int *targsize);
+EAPI void ecore_x_selection_converter_add(char *target, int (*func)(
+                                             char *target,
+                                             void *data,
+                                             int size,
+                                             void **data_ret,
+                                             int *size_ret,
+                                             Ecore_X_Atom *,
+                                             int *));
+EAPI void ecore_x_selection_converter_atom_add(Ecore_X_Atom target, int (*func)(
+                                                  char *target,
+                                                  void *data,
+                                                  int size,
+                                                  void **data_ret,
+                                                  int *size_ret,
+                                                  Ecore_X_Atom *tprop,
+                                                  int *tsize));
+EAPI void ecore_x_selection_converter_del(char *target);
+EAPI void ecore_x_selection_converter_atom_del(
+   Ecore_X_Atom target);
+EAPI void ecore_x_selection_parser_add(const char *target,
+                                       void *(*func)(const char *target,
+                                                     void *data, int size,
+                                                     int format));
+EAPI void           ecore_x_selection_parser_del(const char *target);
+
+EAPI void           ecore_x_dnd_aware_set(Ecore_X_Window win, int on);
+EAPI void           ecore_x_dnd_version_get_prefetch(Ecore_X_Window window);
+EAPI void           ecore_x_dnd_version_get_fetch(void);
+EAPI int            ecore_x_dnd_version_get(Ecore_X_Window win);
+EAPI void           ecore_x_dnd_type_get_prefetch(Ecore_X_Window window);
+EAPI void           ecore_x_dnd_type_get_fetch(void);
+EAPI int            ecore_x_dnd_type_isset(Ecore_X_Window win,
+                                           const char *type);
+EAPI void           ecore_x_dnd_type_set(Ecore_X_Window win,
+                                         const char *type,
+                                         int on);
+EAPI void           ecore_x_dnd_types_set(Ecore_X_Window win,
+                                          const char **types,
+                                          unsigned int num_types);
+EAPI void           ecore_x_dnd_actions_set(Ecore_X_Window win,
+                                            Ecore_X_Atom *actions,
+                                            unsigned int num_actions);
+EAPI void           ecore_x_dnd_begin_prefetch(Ecore_X_Window source);
+EAPI void           ecore_x_dnd_begin_fetch(void);
+EAPI int            ecore_x_dnd_begin(Ecore_X_Window source,
+                                      unsigned char *data,
+                                      int size);
+EAPI int            ecore_x_dnd_drop(void);
+EAPI void           ecore_x_dnd_send_status(int will_accept,
+                                            int suppress,
+                                            Ecore_X_Rectangle rectangle,
+                                            Ecore_X_Atom action);
+EAPI void           ecore_x_dnd_send_finished(void);
+EAPI void           ecore_x_dnd_source_action_set(Ecore_X_Atom action);
+EAPI Ecore_X_Atom   ecore_x_dnd_source_action_get(void);
+
+EAPI Ecore_X_Window ecore_x_window_new(Ecore_X_Window parent,
+                                       int x,
+                                       int y,
+                                       int w,
+                                       int h);
+EAPI Ecore_X_Window ecore_x_window_override_new(Ecore_X_Window parent,
+                                                int x,
+                                                int y,
+                                                int w,
+                                                int h);
+EAPI int            ecore_x_window_argb_get(Ecore_X_Window win);
+EAPI Ecore_X_Window ecore_x_window_manager_argb_new(Ecore_X_Window parent,
+                                                    int x,
+                                                    int y,
+                                                    int w,
+                                                    int h);
+EAPI Ecore_X_Window ecore_x_window_argb_new(Ecore_X_Window parent,
+                                            int x,
+                                            int y,
+                                            int w,
+                                            int h);
+EAPI Ecore_X_Window ecore_x_window_override_argb_new(Ecore_X_Window parent,
+                                                     int x,
+                                                     int y,
+                                                     int w,
+                                                     int h);
+EAPI Ecore_X_Window ecore_x_window_input_new(Ecore_X_Window parent,
+                                             int x,
+                                             int y,
+                                             int w,
+                                             int h);
+EAPI void           ecore_x_window_configure(
+   Ecore_X_Window win,
+   Ecore_X_Window_Configure_Mask
+   mask,
+   int x,
+   int y,
+   int w,
+   int h,
+   int border_width,
+   Ecore_X_Window sibling,
+   int stack_mode);
+EAPI void            ecore_x_window_cursor_set(Ecore_X_Window win,
+                                               Ecore_X_Cursor c);
+EAPI void            ecore_x_window_free(Ecore_X_Window win);
+EAPI void            ecore_x_window_ignore_set(Ecore_X_Window win,
+                                               int ignore);
+EAPI Ecore_X_Window *ecore_x_window_ignore_list(int *num);
+
+EAPI void            ecore_x_window_delete_request_send(
+   Ecore_X_Window win);
+EAPI void            ecore_x_window_show(Ecore_X_Window win);
+EAPI void            ecore_x_window_hide(Ecore_X_Window win);
+EAPI void            ecore_x_window_move(Ecore_X_Window win,
+                                         int x,
+                                         int y);
+EAPI void            ecore_x_window_resize(Ecore_X_Window win,
+                                           int w,
+                                           int h);
+EAPI void            ecore_x_window_move_resize(Ecore_X_Window win,
+                                                int x,
+                                                int y,
+                                                int w,
+                                                int h);
+EAPI void            ecore_x_window_focus(Ecore_X_Window win);
+EAPI void            ecore_x_window_focus_at_time(Ecore_X_Window win,
+                                                  Ecore_X_Time t);
+EAPI void            ecore_x_get_input_focus_prefetch(void);
+EAPI void            ecore_x_get_input_focus_fetch(void);
+EAPI Ecore_X_Window  ecore_x_window_focus_get(void);
+EAPI void            ecore_x_window_raise(Ecore_X_Window win);
+EAPI void            ecore_x_window_lower(Ecore_X_Window win);
+EAPI void            ecore_x_window_reparent(Ecore_X_Window win,
+                                             Ecore_X_Window new_parent,
+                                             int x,
+                                             int y);
+EAPI void            ecore_x_window_size_get(Ecore_X_Window win,
+                                             int *w,
+                                             int *h);
+EAPI void            ecore_x_window_geometry_get(Ecore_X_Window win,
+                                                 int *x,
+                                                 int *y,
+                                                 int *w,
+                                                 int *h);
+EAPI int             ecore_x_window_border_width_get(
+   Ecore_X_Window win);
+EAPI void            ecore_x_window_border_width_set(
+   Ecore_X_Window win,
+   int width);
+EAPI int             ecore_x_window_depth_get(Ecore_X_Window win);
+EAPI void            ecore_x_window_cursor_show(Ecore_X_Window win,
+                                                int show);
+EAPI void            ecore_x_window_defaults_set(Ecore_X_Window win);
+EAPI int             ecore_x_window_visible_get(Ecore_X_Window win);
+EAPI Ecore_X_Window  ecore_x_window_shadow_tree_at_xy_with_skip_get(
+   Ecore_X_Window base,
+   int x,
+   int y,
+   Ecore_X_Window *skip,
+   int skip_num);
+EAPI Ecore_X_Window ecore_x_window_shadow_parent_get(
+   Ecore_X_Window root,
+   Ecore_X_Window win);
+EAPI void           ecore_x_window_shadow_tree_flush(void);
+EAPI Ecore_X_Window ecore_x_window_root_get(Ecore_X_Window win);
+EAPI Ecore_X_Window ecore_x_window_at_xy_get(int x, int y);
+EAPI Ecore_X_Window ecore_x_window_at_xy_with_skip_get(int x,
+                                                       int y,
+                                                       Ecore_X_Window *skip,
+                                                       int skip_num);
+EAPI Ecore_X_Window ecore_x_window_at_xy_begin_get(
+   Ecore_X_Window begin,
+   int x,
+   int y);
+EAPI void           ecore_x_query_tree_prefetch(
+   Ecore_X_Window window);
+EAPI void           ecore_x_query_tree_fetch(void);
+EAPI Ecore_X_Window ecore_x_window_parent_get(Ecore_X_Window win);
+
+EAPI void           ecore_x_window_background_color_set(
+   Ecore_X_Window win,
+   unsigned
+   short r,
+   unsigned
+   short g,
+   unsigned
+   short b);
+EAPI void ecore_x_window_gravity_set(Ecore_X_Window win,
+                                     Ecore_X_Gravity grav);
+EAPI void ecore_x_window_pixel_gravity_set(
+   Ecore_X_Window win,
+   Ecore_X_Gravity
+   grav);
+EAPI void ecore_x_window_pixmap_set(Ecore_X_Window win,
+                                    Ecore_X_Pixmap pmap);
+EAPI void ecore_x_window_area_clear(Ecore_X_Window win,
+                                    int x,
+                                    int y,
+                                    int w,
+                                    int h);
+EAPI void ecore_x_window_area_expose(Ecore_X_Window win,
+                                     int x,
+                                     int y,
+                                     int w,
+                                     int h);
+EAPI void ecore_x_window_override_set(Ecore_X_Window win,
+                                      int override);
+
+EAPI void ecore_x_window_prop_card32_set(
+   Ecore_X_Window win,
+   Ecore_X_Atom atom,
+   unsigned int *val,
+   unsigned int num);
+EAPI void ecore_x_window_prop_card32_get_prefetch(
+   Ecore_X_Window window,
+   Ecore_X_Atom
+   atom);
+EAPI void ecore_x_window_prop_card32_get_fetch(void);
+EAPI int  ecore_x_window_prop_card32_get(
+   Ecore_X_Window win,
+   Ecore_X_Atom atom,
+   unsigned int *val,
+   unsigned int len);
+EAPI int  ecore_x_window_prop_card32_list_get(
+   Ecore_X_Window win,
+   Ecore_X_Atom
+   atom,
+   unsigned int
+   **plst);
+
+EAPI void ecore_x_window_prop_xid_set(Ecore_X_Window win,
+                                      Ecore_X_Atom atom,
+                                      Ecore_X_Atom type,
+                                      Ecore_X_ID *lst,
+                                      unsigned int num);
+EAPI void ecore_x_window_prop_xid_get_prefetch(
+   Ecore_X_Window window,
+   Ecore_X_Atom
+   atom,
+   Ecore_X_Atom
+   type);
+EAPI void ecore_x_window_prop_xid_get_fetch(void);
+EAPI int  ecore_x_window_prop_xid_get(Ecore_X_Window win,
+                                      Ecore_X_Atom atom,
+                                      Ecore_X_Atom type,
+                                      Ecore_X_ID *lst,
+                                      unsigned int len);
+EAPI int  ecore_x_window_prop_xid_list_get(
+   Ecore_X_Window win,
+   Ecore_X_Atom
+   atom,
+   Ecore_X_Atom
+   type,
+   Ecore_X_ID **
+   plst);
+EAPI void ecore_x_window_prop_xid_list_change(
+   Ecore_X_Window win,
+   Ecore_X_Atom
+   atom,
+   Ecore_X_Atom
+   type,
+   Ecore_X_ID
+   item,
+   int op);
+EAPI void ecore_x_window_prop_atom_set(Ecore_X_Window win,
+                                       Ecore_X_Atom atom,
+                                       Ecore_X_Atom *val,
+                                       unsigned int num);
+EAPI void ecore_x_window_prop_atom_get_prefetch(
+   Ecore_X_Window window,
+   Ecore_X_Atom
+   atom);
+EAPI void ecore_x_window_prop_atom_get_fetch(void);
+EAPI int  ecore_x_window_prop_atom_get(Ecore_X_Window win,
+                                       Ecore_X_Atom atom,
+                                       Ecore_X_Atom *val,
+                                       unsigned int len);
+EAPI int  ecore_x_window_prop_atom_list_get(
+   Ecore_X_Window win,
+   Ecore_X_Atom
+   atom,
+   Ecore_X_Atom *
+   *plst);
+EAPI void ecore_x_window_prop_atom_list_change(
+   Ecore_X_Window win,
+   Ecore_X_Atom
+   atom,
+   Ecore_X_Atom
+   item,
+   int op);
+EAPI void ecore_x_window_prop_window_set(
+   Ecore_X_Window win,
+   Ecore_X_Atom atom,
+   Ecore_X_Window *
+   val,
+   unsigned int num);
+EAPI void ecore_x_window_prop_window_get_prefetch(
+   Ecore_X_Window window,
+   Ecore_X_Atom
+   atom);
+EAPI void ecore_x_window_prop_window_get_fetch(void);
+EAPI int  ecore_x_window_prop_window_get(
+   Ecore_X_Window win,
+   Ecore_X_Atom atom,
+   Ecore_X_Window *
+   val,
+   unsigned int len);
+EAPI int ecore_x_window_prop_window_list_get(
+   Ecore_X_Window win,
+   Ecore_X_Atom
+   atom,
+   Ecore_X_Window
+   **plst);
+
+EAPI Ecore_X_Atom ecore_x_window_prop_any_type(void);
+EAPI void         ecore_x_window_prop_property_set(
+   Ecore_X_Window win,
+   Ecore_X_Atom type,
+   Ecore_X_Atom format,
+   int size,
+   void *data,
+   int number);
+EAPI void ecore_x_window_prop_property_get_prefetch(
+   Ecore_X_Window window,
+   Ecore_X_Atom
+   property,
+   Ecore_X_Atom
+   type);
+EAPI void ecore_x_window_prop_property_get_fetch(void);
+EAPI int  ecore_x_window_prop_property_get(
+   Ecore_X_Window win,
+   Ecore_X_Atom property,
+   Ecore_X_Atom type,
+   int size,
+   unsigned char **data,
+   int *num);
+EAPI void                 ecore_x_window_prop_property_del(
+   Ecore_X_Window win,
+   Ecore_X_Atom property);
+EAPI void                 ecore_x_window_prop_list_prefetch(
+   Ecore_X_Window window);
+EAPI void                 ecore_x_window_prop_list_fetch(void);
+EAPI Ecore_X_Atom *       ecore_x_window_prop_list(Ecore_X_Window win,
+                                                   int *num_ret);
+EAPI void                 ecore_x_window_prop_string_set(
+   Ecore_X_Window win,
+   Ecore_X_Atom type,
+   const char *str);
+EAPI void                 ecore_x_window_prop_string_get_prefetch(
+   Ecore_X_Window window,
+   Ecore_X_Atom
+   type);
+EAPI void                 ecore_x_window_prop_string_get_fetch(void);
+EAPI char *               ecore_x_window_prop_string_get(
+   Ecore_X_Window win,
+   Ecore_X_Atom type);
+EAPI int                  ecore_x_window_prop_protocol_isset(
+   Ecore_X_Window win,
+   Ecore_X_WM_Protocol protocol);
+EAPI Ecore_X_WM_Protocol *ecore_x_window_prop_protocol_list_get(
+   Ecore_X_Window win,
+   int *num_ret);
+
+EAPI void                 ecore_x_window_shape_mask_set(Ecore_X_Window win,
+                                                        Ecore_X_Pixmap mask);
+EAPI void                 ecore_x_window_shape_window_set(
+   Ecore_X_Window win,
+   Ecore_X_Window shape_win);
+EAPI void                 ecore_x_window_shape_window_set_xy(
+   Ecore_X_Window win,
+   Ecore_X_Window shape_win,
+   int x,
+   int y);
+EAPI void                 ecore_x_window_shape_rectangle_set(
+   Ecore_X_Window win,
+   int x,
+   int y,
+   int w,
+   int h);
+EAPI void ecore_x_window_shape_rectangles_set(
+   Ecore_X_Window win,
+   Ecore_X_Rectangle *rects,
+   int num);
+EAPI void ecore_x_window_shape_window_add(
+   Ecore_X_Window win,
+   Ecore_X_Window shape_win);
+EAPI void ecore_x_window_shape_window_add_xy(
+   Ecore_X_Window win,
+   Ecore_X_Window shape_win,
+   int x,
+   int y);
+EAPI void ecore_x_window_shape_rectangle_add(
+   Ecore_X_Window win,
+   int x,
+   int y,
+   int w,
+   int h);
+EAPI void ecore_x_window_shape_rectangle_clip(
+   Ecore_X_Window win,
+   int x,
+   int y,
+   int w,
+   int h);
+EAPI void               ecore_x_window_shape_rectangles_add(
+   Ecore_X_Window win,
+   Ecore_X_Rectangle *rects,
+   int num);
+EAPI void               ecore_x_window_shape_rectangles_get_prefetch(
+   Ecore_X_Window window);
 EAPI void               ecore_x_window_shape_rectangles_get_fetch(void);
-EAPI Ecore_X_Rectangle *ecore_x_window_shape_rectangles_get(Ecore_X_Window win, int *num_ret);
-EAPI void               ecore_x_window_shape_events_select(Ecore_X_Window win, int on);
-EAPI void               ecore_x_window_shape_input_mask_set(Ecore_X_Window win, Ecore_X_Pixmap mask);
-
-EAPI Ecore_X_Pixmap   ecore_x_pixmap_new(Ecore_X_Window win, int w, int h, int dep);
-EAPI void             ecore_x_pixmap_free(Ecore_X_Pixmap pmap);
-EAPI void             ecore_x_pixmap_paste(Ecore_X_Pixmap pmap, Ecore_X_Drawable dest, Ecore_X_GC gc, int sx, int sy, int w, int h, int dx, int dy);
-EAPI void             ecore_x_pixmap_geometry_get(Ecore_X_Pixmap pmap, int *x, int *y, int *w, int *h);
-EAPI int              ecore_x_pixmap_depth_get(Ecore_X_Pixmap pmap);
-
-EAPI Ecore_X_GC       ecore_x_gc_new(Ecore_X_Drawable draw, Ecore_X_GC_Value_Mask value_mask, const unsigned int *value_list);
-EAPI void             ecore_x_gc_free(Ecore_X_GC gc);
-
-EAPI int              ecore_x_client_message32_send(Ecore_X_Window win, Ecore_X_Atom type, Ecore_X_Event_Mask mask, long d0, long d1, long d2, long d3, long d4);
-EAPI int              ecore_x_client_message8_send(Ecore_X_Window win, Ecore_X_Atom type, const void *data, int len);
-EAPI int              ecore_x_mouse_move_send(Ecore_X_Window win, int x, int y);
-EAPI int              ecore_x_mouse_down_send(Ecore_X_Window win, int x, int y, int b);
-EAPI int              ecore_x_mouse_up_send(Ecore_X_Window win, int x, int y, int b);
-
-EAPI void            ecore_x_drawable_geometry_get_prefetch(Ecore_X_Drawable drawable);
-EAPI void            ecore_x_drawable_geometry_get_fetch(void);
-EAPI void            ecore_x_drawable_geometry_get(Ecore_X_Drawable d, int *x, int *y, int *w, int *h);
-EAPI int             ecore_x_drawable_border_width_get(Ecore_X_Drawable d);
-EAPI int             ecore_x_drawable_depth_get(Ecore_X_Drawable d);
-EAPI void            ecore_x_drawable_rectangle_fill(Ecore_X_Drawable d, Ecore_X_GC gc, int x, int y, int width, int height);
-
-EAPI int  ecore_x_cursor_color_supported_get(void);
-EAPI Ecore_X_Cursor ecore_x_cursor_new(Ecore_X_Window win, int *pixels, int w, int h, int hot_x, int hot_y);
-EAPI void ecore_x_cursor_free(Ecore_X_Cursor c);
-EAPI Ecore_X_Cursor ecore_x_cursor_shape_get(int shape);
-EAPI void ecore_x_cursor_size_set(int size);
-EAPI int  ecore_x_cursor_size_get(void);
+EAPI Ecore_X_Rectangle *ecore_x_window_shape_rectangles_get(
+   Ecore_X_Window win,
+   int *num_ret);
+EAPI void               ecore_x_window_shape_events_select(
+   Ecore_X_Window win,
+   int on);
+EAPI void               ecore_x_window_shape_input_mask_set(
+   Ecore_X_Window win,
+   Ecore_X_Pixmap mask);
+
+EAPI Ecore_X_Pixmap     ecore_x_pixmap_new(Ecore_X_Window win,
+                                           int w,
+                                           int h,
+                                           int dep);
+EAPI void               ecore_x_pixmap_free(Ecore_X_Pixmap pmap);
+EAPI void               ecore_x_pixmap_paste(Ecore_X_Pixmap pmap,
+                                             Ecore_X_Drawable dest,
+                                             Ecore_X_GC gc,
+                                             int sx,
+                                             int sy,
+                                             int w,
+                                             int h,
+                                             int dx,
+                                             int dy);
+EAPI void       ecore_x_pixmap_geometry_get(Ecore_X_Pixmap pmap,
+                                            int *x,
+                                            int *y,
+                                            int *w,
+                                            int *h);
+EAPI int        ecore_x_pixmap_depth_get(Ecore_X_Pixmap pmap);
+
+EAPI Ecore_X_GC ecore_x_gc_new(Ecore_X_Drawable draw,
+                               Ecore_X_GC_Value_Mask value_mask,
+                               const unsigned int *value_list);
+EAPI void       ecore_x_gc_free(Ecore_X_GC gc);
+
+EAPI int        ecore_x_client_message32_send(Ecore_X_Window win,
+                                              Ecore_X_Atom type,
+                                              Ecore_X_Event_Mask mask,
+                                              long d0,
+                                              long d1,
+                                              long d2,
+                                              long d3,
+                                              long d4);
+EAPI int  ecore_x_client_message8_send(Ecore_X_Window win,
+                                       Ecore_X_Atom type,
+                                       const void *data,
+                                       int len);
+EAPI int  ecore_x_mouse_move_send(Ecore_X_Window win,
+                                  int x,
+                                  int y);
+EAPI int  ecore_x_mouse_down_send(Ecore_X_Window win,
+                                  int x,
+                                  int y,
+                                  int b);
+EAPI int  ecore_x_mouse_up_send(Ecore_X_Window win,
+                                int x,
+                                int y,
+                                int b);
+
+EAPI void ecore_x_drawable_geometry_get_prefetch(
+   Ecore_X_Drawable drawable);
+EAPI void ecore_x_drawable_geometry_get_fetch(void);
+EAPI void ecore_x_drawable_geometry_get(Ecore_X_Drawable d,
+                                        int *x,
+                                        int *y,
+                                        int *w,
+                                        int *h);
+EAPI int  ecore_x_drawable_border_width_get(
+   Ecore_X_Drawable d);
+EAPI int  ecore_x_drawable_depth_get(Ecore_X_Drawable d);
+EAPI void ecore_x_drawable_rectangle_fill(
+   Ecore_X_Drawable d,
+   Ecore_X_GC gc,
+   int x,
+   int y,
+   int width,
+   int height);
+
+EAPI int            ecore_x_cursor_color_supported_get(void);
+EAPI Ecore_X_Cursor ecore_x_cursor_new(Ecore_X_Window win,
+                                       int *pixels,
+                                       int w,
+                                       int h,
+                                       int hot_x,
+                                       int hot_y);
+EAPI void                      ecore_x_cursor_free(Ecore_X_Cursor c);
+EAPI Ecore_X_Cursor            ecore_x_cursor_shape_get(int shape);
+EAPI void                      ecore_x_cursor_size_set(int size);
+EAPI int                       ecore_x_cursor_size_get(void);
 
 
 /* FIXME: these funcs need categorising */
-EAPI Ecore_X_Window *ecore_x_window_root_list(int *num_ret);
-EAPI Ecore_X_Window  ecore_x_window_root_first_get(void);
-EAPI int             ecore_x_window_manage(Ecore_X_Window win);
-EAPI void            ecore_x_window_container_manage(Ecore_X_Window win);
-EAPI void            ecore_x_window_client_manage(Ecore_X_Window win);
-EAPI void            ecore_x_window_sniff(Ecore_X_Window win);
-EAPI void            ecore_x_window_client_sniff(Ecore_X_Window win);
-EAPI void            ecore_x_atom_get_prefetch(const char *name);
-EAPI void            ecore_x_atom_get_fetch(void);
-EAPI Ecore_X_Atom    ecore_x_atom_get(const char *name);
-EAPI void            ecore_x_atoms_get(const char **names, int num, Ecore_X_Atom *atoms);
-EAPI void            ecore_x_get_atom_name_prefetch(Ecore_X_Atom atom);
-EAPI void            ecore_x_get_atom_name_fetch(void);
-EAPI char           *ecore_x_atom_name_get(Ecore_X_Atom atom);
-
-
-EAPI void            ecore_x_icccm_init(void);
-EAPI void            ecore_x_icccm_state_set(Ecore_X_Window win, Ecore_X_Window_State_Hint state);
+EAPI Ecore_X_Window *          ecore_x_window_root_list(int *num_ret);
+EAPI Ecore_X_Window            ecore_x_window_root_first_get(void);
+EAPI int                       ecore_x_window_manage(Ecore_X_Window win);
+EAPI void                      ecore_x_window_container_manage(
+   Ecore_X_Window win);
+EAPI void                      ecore_x_window_client_manage(Ecore_X_Window win);
+EAPI void                      ecore_x_window_sniff(Ecore_X_Window win);
+EAPI void                      ecore_x_window_client_sniff(Ecore_X_Window win);
+EAPI void                      ecore_x_atom_get_prefetch(const char *name);
+EAPI void                      ecore_x_atom_get_fetch(void);
+EAPI Ecore_X_Atom              ecore_x_atom_get(const char *name);
+EAPI void                      ecore_x_atoms_get(const char **names,
+                                                 int num,
+                                                 Ecore_X_Atom *atoms);
+EAPI void                      ecore_x_get_atom_name_prefetch(Ecore_X_Atom atom);
+EAPI void                      ecore_x_get_atom_name_fetch(void);
+EAPI char *                    ecore_x_atom_name_get(Ecore_X_Atom atom);
+
+
+EAPI void                      ecore_x_icccm_init(void);
+EAPI void                      ecore_x_icccm_state_set(
+   Ecore_X_Window win,
+   Ecore_X_Window_State_Hint
+   state);
 EAPI Ecore_X_Window_State_Hint ecore_x_icccm_state_get(Ecore_X_Window win);
-EAPI void            ecore_x_icccm_delete_window_send(Ecore_X_Window win, Ecore_X_Time t);
-EAPI void            ecore_x_icccm_take_focus_send(Ecore_X_Window win, Ecore_X_Time t);
-EAPI void            ecore_x_icccm_save_yourself_send(Ecore_X_Window win, Ecore_X_Time t);
-EAPI void            ecore_x_icccm_move_resize_send(Ecore_X_Window win, int x, int y, int w, int h);
-EAPI void  ecore_x_icccm_hints_set(Ecore_X_Window win,
-                                  int accepts_focus,
-                                  Ecore_X_Window_State_Hint initial_state,
-                                  Ecore_X_Pixmap icon_pixmap,
-                                  Ecore_X_Pixmap icon_mask,
-                                  Ecore_X_Window icon_window,
-                                  Ecore_X_Window window_group,
-                                  int is_urgent);
-EAPI int  ecore_x_icccm_hints_get(Ecore_X_Window win,
-                                 int *accepts_focus,
-                                 Ecore_X_Window_State_Hint *initial_state,
-                                 Ecore_X_Pixmap *icon_pixmap,
-                                 Ecore_X_Pixmap *icon_mask,
-                                 Ecore_X_Window *icon_window,
-                                 Ecore_X_Window *window_group,
-                                 int *is_urgent);
-EAPI void  ecore_x_icccm_size_pos_hints_set(Ecore_X_Window win,
-                                           int request_pos,
-                                           Ecore_X_Gravity gravity,
-                                           int min_w, int min_h,
-                                           int max_w, int max_h,
-                                           int base_w, int base_h,
-                                           int step_x, int step_y,
-                                           double min_aspect,
-                                           double max_aspect);
-EAPI int   ecore_x_icccm_size_pos_hints_get(Ecore_X_Window win,
-                                           int *request_pos,
-                                           Ecore_X_Gravity *gravity,
-                                           int *min_w, int *min_h,
-                                           int *max_w, int *max_h,
-                                           int *base_w, int *base_h,
-                                           int *step_x, int *step_y,
-                                           double *min_aspect,
-                                           double *max_aspect);
-EAPI void  ecore_x_icccm_title_set(Ecore_X_Window win, const char *t);
-EAPI char *ecore_x_icccm_title_get(Ecore_X_Window win);
-EAPI void  ecore_x_icccm_protocol_atoms_set(Ecore_X_Window win,
-                                             Ecore_X_Atom *protos, int num);
-EAPI void  ecore_x_icccm_protocol_set(Ecore_X_Window win,
-                                     Ecore_X_WM_Protocol protocol,
-                                     int on);
-EAPI int   ecore_x_icccm_protocol_isset(Ecore_X_Window win,
-                                       Ecore_X_WM_Protocol protocol);
-EAPI void  ecore_x_icccm_name_class_set(Ecore_X_Window win,
-                                       const char *n,
-                                       const char *c);
-EAPI void  ecore_x_icccm_name_class_get(Ecore_X_Window win,
-                                       char **n,
-                                       char **c);
-EAPI char *ecore_x_icccm_client_machine_get(Ecore_X_Window win);
-EAPI void  ecore_x_icccm_command_set(Ecore_X_Window win, int argc, char **argv);
-EAPI void  ecore_x_icccm_command_get(Ecore_X_Window win, int *argc, char ***argv);
-EAPI char *ecore_x_icccm_icon_name_get(Ecore_X_Window win);
-EAPI void  ecore_x_icccm_icon_name_set(Ecore_X_Window win, const char *t);
-EAPI void  ecore_x_icccm_colormap_window_set(Ecore_X_Window win, Ecore_X_Window subwin);
-EAPI void  ecore_x_icccm_colormap_window_unset(Ecore_X_Window win, Ecore_X_Window subwin);
-EAPI void  ecore_x_icccm_transient_for_set(Ecore_X_Window win, Ecore_X_Window forwin);
-EAPI void  ecore_x_icccm_transient_for_unset(Ecore_X_Window win);
+EAPI void                      ecore_x_icccm_delete_window_send(
+   Ecore_X_Window win,
+   Ecore_X_Time t);
+EAPI void                      ecore_x_icccm_take_focus_send(Ecore_X_Window win,
+                                                             Ecore_X_Time t);
+EAPI void                      ecore_x_icccm_save_yourself_send(
+   Ecore_X_Window win,
+   Ecore_X_Time t);
+EAPI void                      ecore_x_icccm_move_resize_send(
+   Ecore_X_Window win,
+   int x,
+   int y,
+   int w,
+   int h);
+EAPI void ecore_x_icccm_hints_set(
+   Ecore_X_Window win,
+   int accepts_focus,
+   Ecore_X_Window_State_Hint
+   initial_state,
+   Ecore_X_Pixmap
+   icon_pixmap,
+   Ecore_X_Pixmap icon_mask,
+   Ecore_X_Window
+   icon_window,
+   Ecore_X_Window
+   window_group,
+   int is_urgent);
+EAPI int ecore_x_icccm_hints_get(Ecore_X_Window win,
+                                 int *accepts_focus,
+                                 Ecore_X_Window_State_Hint *initial_state,
+                                 Ecore_X_Pixmap *icon_pixmap,
+                                 Ecore_X_Pixmap *icon_mask,
+                                 Ecore_X_Window *icon_window,
+                                 Ecore_X_Window *window_group,
+                                 int *is_urgent);
+EAPI void ecore_x_icccm_size_pos_hints_set(Ecore_X_Window win,
+                                           int request_pos,
+                                           Ecore_X_Gravity gravity,
+                                           int min_w, int min_h,
+                                           int max_w, int max_h,
+                                           int base_w, int base_h,
+                                           int step_x, int step_y,
+                                           double min_aspect,
+                                           double max_aspect);
+EAPI int ecore_x_icccm_size_pos_hints_get(Ecore_X_Window win,
+                                          int *request_pos,
+                                          Ecore_X_Gravity *gravity,
+                                          int *min_w, int *min_h,
+                                          int *max_w, int *max_h,
+                                          int *base_w, int *base_h,
+                                          int *step_x, int *step_y,
+                                          double *min_aspect,
+                                          double *max_aspect);
+EAPI void           ecore_x_icccm_title_set(Ecore_X_Window win, const char *t);
+EAPI char *         ecore_x_icccm_title_get(Ecore_X_Window win);
+EAPI void           ecore_x_icccm_protocol_atoms_set(Ecore_X_Window win,
+                                                     Ecore_X_Atom *protos,
+                                                     int num);
+EAPI void           ecore_x_icccm_protocol_set(Ecore_X_Window win,
+                                               Ecore_X_WM_Protocol protocol,
+                                               int on);
+EAPI int            ecore_x_icccm_protocol_isset(Ecore_X_Window win,
+                                                 Ecore_X_WM_Protocol protocol);
+EAPI void           ecore_x_icccm_name_class_set(Ecore_X_Window win,
+                                                 const char *n,
+                                                 const char *c);
+EAPI void           ecore_x_icccm_name_class_get(Ecore_X_Window win,
+                                                 char **n,
+                                                 char **c);
+EAPI char *         ecore_x_icccm_client_machine_get(Ecore_X_Window win);
+EAPI void           ecore_x_icccm_command_set(Ecore_X_Window win,
+                                              int argc,
+                                              char **argv);
+EAPI void           ecore_x_icccm_command_get(Ecore_X_Window win,
+                                              int *argc,
+                                              char ***argv);
+EAPI char *         ecore_x_icccm_icon_name_get(Ecore_X_Window win);
+EAPI void           ecore_x_icccm_icon_name_set(Ecore_X_Window win,
+                                                const char *t);
+EAPI void           ecore_x_icccm_colormap_window_set(Ecore_X_Window win,
+                                                      Ecore_X_Window subwin);
+EAPI void           ecore_x_icccm_colormap_window_unset(Ecore_X_Window win,
+                                                        Ecore_X_Window subwin);
+EAPI void           ecore_x_icccm_transient_for_set(Ecore_X_Window win,
+                                                    Ecore_X_Window forwin);
+EAPI void           ecore_x_icccm_transient_for_unset(Ecore_X_Window win);
 EAPI Ecore_X_Window ecore_x_icccm_transient_for_get(Ecore_X_Window win);
-EAPI void  ecore_x_icccm_window_role_set(Ecore_X_Window win, const char *role);
-EAPI char *ecore_x_icccm_window_role_get(Ecore_X_Window win);
-EAPI void  ecore_x_icccm_client_leader_set(Ecore_X_Window win, Ecore_X_Window l);
+EAPI void           ecore_x_icccm_window_role_set(Ecore_X_Window win,
+                                                  const char *role);
+EAPI char *         ecore_x_icccm_window_role_get(Ecore_X_Window win);
+EAPI void           ecore_x_icccm_client_leader_set(Ecore_X_Window win,
+                                                    Ecore_X_Window l);
 EAPI Ecore_X_Window ecore_x_icccm_client_leader_get(Ecore_X_Window win);
-EAPI void ecore_x_icccm_iconic_request_send(Ecore_X_Window win, Ecore_X_Window root);
+EAPI void           ecore_x_icccm_iconic_request_send(Ecore_X_Window win,
+                                                      Ecore_X_Window root);
 
 
 typedef enum _Ecore_X_MWM_Hint_Func
@@ -1452,294 +1808,661 @@ typedef enum _Ecore_X_MWM_Hint_Input
    ECORE_X_MWM_HINT_INPUT_FULL_APPLICATION_MODAL = 3
 } Ecore_X_MWM_Hint_Input;
 
-EAPI void ecore_x_mwm_hints_get_prefetch(Ecore_X_Window window);
+EAPI void ecore_x_mwm_hints_get_prefetch(
+   Ecore_X_Window window);
 EAPI void ecore_x_mwm_hints_get_fetch(void);
-EAPI int  ecore_x_mwm_hints_get(Ecore_X_Window win,
-                                Ecore_X_MWM_Hint_Func *fhint,
-                                Ecore_X_MWM_Hint_Decor *dhint,
-                                Ecore_X_MWM_Hint_Input *ihint);
-EAPI void ecore_x_mwm_borderless_set(Ecore_X_Window win, int borderless);
+EAPI int  ecore_x_mwm_hints_get(
+   Ecore_X_Window win,
+   Ecore_X_MWM_Hint_Func
+   *fhint,
+   Ecore_X_MWM_Hint_Decor
+   *dhint,
+   Ecore_X_MWM_Hint_Input
+   *ihint);
+EAPI void ecore_x_mwm_borderless_set(
+   Ecore_X_Window win,
+   int borderless);
 
 /* netwm */
-EAPI void                ecore_x_netwm_init(void);
-EAPI void                ecore_x_netwm_shutdown(void);
-EAPI void                ecore_x_netwm_wm_identify(Ecore_X_Window root, Ecore_X_Window check, const char *wm_name);
-EAPI void                ecore_x_netwm_supported_set(Ecore_X_Window root, Ecore_X_Atom *supported, int num);
-EAPI void                ecore_x_netwm_supported_get_prefetch(Ecore_X_Window root);
-EAPI void                ecore_x_netwm_supported_get_fetch(void);
-EAPI int                 ecore_x_netwm_supported_get(Ecore_X_Window root, Ecore_X_Atom **supported, int *num);
-EAPI void                ecore_x_netwm_desk_count_set(Ecore_X_Window root, unsigned int n_desks);
-EAPI void                ecore_x_netwm_desk_roots_set(Ecore_X_Window root, Ecore_X_Window *vroots, unsigned int n_desks);
-EAPI void                ecore_x_netwm_desk_names_set(Ecore_X_Window root, const char **names, unsigned int n_desks);
-EAPI void                ecore_x_netwm_desk_size_set(Ecore_X_Window root, unsigned int width, unsigned int height);
-EAPI void                ecore_x_netwm_desk_workareas_set(Ecore_X_Window root, unsigned int *areas, unsigned int n_desks);
-EAPI void                ecore_x_netwm_desk_current_set(Ecore_X_Window root, unsigned int desk);
-EAPI void                ecore_x_netwm_desk_viewports_set(Ecore_X_Window root, unsigned int *origins, unsigned int n_desks);
-EAPI void                ecore_x_netwm_desk_layout_set(Ecore_X_Window root, int orientation, int columns, int rows, int starting_corner);
-EAPI void                ecore_x_netwm_showing_desktop_set(Ecore_X_Window root, int on);
-EAPI void                ecore_x_netwm_client_list_set(Ecore_X_Window root, Ecore_X_Window *p_clients, unsigned int n_clients);
-EAPI void                ecore_x_netwm_client_list_stacking_set(Ecore_X_Window root, Ecore_X_Window *p_clients, unsigned int n_clients);
-EAPI void                ecore_x_netwm_client_active_set(Ecore_X_Window root, Ecore_X_Window win);
-EAPI void                ecore_x_netwm_client_active_request(Ecore_X_Window root, Ecore_X_Window win, int type, Ecore_X_Window current_win);
-EAPI void                ecore_x_netwm_name_set(Ecore_X_Window win, const char *name);
-EAPI void                ecore_x_netwm_name_get_prefetch(Ecore_X_Window window);
-EAPI void                ecore_x_netwm_name_get_fetch(void);
-EAPI int                 ecore_x_netwm_name_get(Ecore_X_Window win, char **name);
-EAPI void                ecore_x_netwm_startup_id_set(Ecore_X_Window win, const char *id);
-EAPI void                ecore_x_netwm_startup_id_get_prefetch(Ecore_X_Window window);
-EAPI void                ecore_x_netwm_startup_id_get_fetch(void);
-EAPI int                 ecore_x_netwm_startup_id_get(Ecore_X_Window win, char **id);
-EAPI void                ecore_x_netwm_visible_name_set(Ecore_X_Window win, const char *name);
-EAPI void                ecore_x_netwm_visible_name_get_prefetch(Ecore_X_Window window);
-EAPI void                ecore_x_netwm_visible_name_get_fetch(void);
-EAPI int                 ecore_x_netwm_visible_name_get(Ecore_X_Window win, char **name);
-EAPI void                ecore_x_netwm_icon_name_set(Ecore_X_Window win, const char *name);
-EAPI void                ecore_x_netwm_icon_name_get_prefetch(Ecore_X_Window window);
-EAPI void                ecore_x_netwm_icon_name_get_fetch(void);
-EAPI int                 ecore_x_netwm_icon_name_get(Ecore_X_Window win, char **name);
-EAPI void                ecore_x_netwm_visible_icon_name_set(Ecore_X_Window win, const char *name);
-EAPI void                ecore_x_netwm_visible_icon_name_get_prefetch(Ecore_X_Window window);
-EAPI void                ecore_x_netwm_visible_icon_name_get_fetch(void);
-EAPI int                 ecore_x_netwm_visible_icon_name_get(Ecore_X_Window win, char **name);
-EAPI void                ecore_x_netwm_desktop_set(Ecore_X_Window win, unsigned int desk);
-EAPI void                ecore_x_netwm_desktop_get_prefetch(Ecore_X_Window window);
-EAPI void                ecore_x_netwm_desktop_get_fetch(void);
-EAPI int                 ecore_x_netwm_desktop_get(Ecore_X_Window win, unsigned int *desk);
-EAPI void                ecore_x_netwm_strut_set(Ecore_X_Window win, int left, int right, int top, int bottom);
-EAPI void                ecore_x_netwm_strut_get_prefetch(Ecore_X_Window window);
-EAPI void                ecore_x_netwm_strut_get_fetch(void);
-EAPI int                 ecore_x_netwm_strut_get(Ecore_X_Window win, int *left, int *right, int *top, int *bottom);
-EAPI void                ecore_x_netwm_strut_partial_set(Ecore_X_Window win, int left, int right, int top, int bottom, int left_start_y, int left_end_y, int right_start_y, int right_end_y, int top_start_x, int top_end_x, int bottom_start_x, int bottom_end_x);
-EAPI void                ecore_x_netwm_strut_partial_get_prefetch(Ecore_X_Window window);
-EAPI void                ecore_x_netwm_strut_partial_get_fetch(void);
-EAPI int                 ecore_x_netwm_strut_partial_get(Ecore_X_Window win, int *left, int *right, int *top, int *bottom, int *left_start_y, int *left_end_y, int *right_start_y, int *right_end_y, int *top_start_x, int *top_end_x, int *bottom_start_x, int *bottom_end_x);
-EAPI void                ecore_x_netwm_icons_get_prefetch(Ecore_X_Window window);
-EAPI void                ecore_x_netwm_icons_get_fetch(void);
-EAPI int                 ecore_x_netwm_icons_get(Ecore_X_Window win, Ecore_X_Icon **icon, int *num);
-EAPI void                ecore_x_netwm_icon_geometry_set(Ecore_X_Window win, int x, int y, int width, int height);
-EAPI void                ecore_x_netwm_icon_geometry_get_prefetch(Ecore_X_Window window);
-EAPI void                ecore_x_netwm_icon_geometry_get_fetch(void);
-EAPI int                 ecore_x_netwm_icon_geometry_get(Ecore_X_Window win, int *x, int *y, int *width, int *height);
-EAPI void                ecore_x_netwm_pid_set(Ecore_X_Window win, int pid);
-EAPI void                ecore_x_netwm_pid_get_prefetch(Ecore_X_Window window);
-EAPI void                ecore_x_netwm_pid_get_fetch(void);
-EAPI int                 ecore_x_netwm_pid_get(Ecore_X_Window win, int *pid);
-EAPI void                ecore_x_netwm_handled_icons_set(Ecore_X_Window win);
-EAPI void                ecore_x_netwm_handled_icons_get_prefetch(Ecore_X_Window window);
-EAPI void                ecore_x_netwm_handled_icons_get_fetch(void);
-EAPI int                 ecore_x_netwm_handled_icons_get(Ecore_X_Window win);
-EAPI void                ecore_x_netwm_user_time_set(Ecore_X_Window win, unsigned int time);
-EAPI void                ecore_x_netwm_user_time_get_prefetch(Ecore_X_Window window);
-EAPI void                ecore_x_netwm_user_time_get_fetch(void);
-EAPI int                 ecore_x_netwm_user_time_get(Ecore_X_Window win, unsigned int *time);
-EAPI void                ecore_x_netwm_window_state_set(Ecore_X_Window win, Ecore_X_Window_State *state, unsigned int num);
-EAPI void                ecore_x_netwm_window_state_get_prefetch(Ecore_X_Window window);
-EAPI void                ecore_x_netwm_window_state_get_fetch(void);
-EAPI int                 ecore_x_netwm_window_state_get(Ecore_X_Window win, Ecore_X_Window_State **state, unsigned int *num);
-EAPI void                ecore_x_netwm_window_type_set(Ecore_X_Window win, Ecore_X_Window_Type type);
-EAPI void                ecore_x_netwm_window_type_get_prefetch(Ecore_X_Window window);
-EAPI void                ecore_x_netwm_window_type_get_fetch(void);
-EAPI int                 ecore_x_netwm_window_type_get(Ecore_X_Window win, Ecore_X_Window_Type *type);
-EAPI int                 ecore_x_netwm_window_types_get(Ecore_X_Window win, Ecore_X_Window_Type **types);
-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, unsigned int num);
-EAPI void                ecore_x_netwm_allowed_action_get_prefetch(Ecore_X_Window window);
-EAPI void                ecore_x_netwm_allowed_action_get_fetch(void);
-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 void                ecore_x_netwm_opacity_get_prefetch(Ecore_X_Window window);
-EAPI void                ecore_x_netwm_opacity_get_fetch(void);
-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);
-EAPI void                ecore_x_netwm_frame_size_get_prefetch(Ecore_X_Window window);
-EAPI void                ecore_x_netwm_frame_size_get_fetch(void);
-EAPI int                 ecore_x_netwm_frame_size_get(Ecore_X_Window win, int *fl, int *fr, int *ft, int *fb);
-EAPI void                ecore_x_netwm_sync_counter_get_prefetch(Ecore_X_Window window);
-EAPI void                ecore_x_netwm_sync_counter_get_fetch(void);
-EAPI int                 ecore_x_netwm_sync_counter_get(Ecore_X_Window win, Ecore_X_Sync_Counter *counter);
-EAPI void                ecore_x_netwm_ping_send(Ecore_X_Window win);
-EAPI void                ecore_x_netwm_sync_request_send(Ecore_X_Window win, unsigned int serial);
-EAPI void                ecore_x_netwm_state_request_send(Ecore_X_Window win, Ecore_X_Window root, Ecore_X_Window_State s1, Ecore_X_Window_State s2, int set);
-EAPI void                ecore_x_netwm_desktop_request_send(Ecore_X_Window win, Ecore_X_Window root, unsigned int desktop);
-
-
-EAPI void                ecore_x_e_init(void);
-EAPI void                ecore_x_e_frame_size_set(Ecore_X_Window win, int fl, int fr, int ft, int fb);
-EAPI void                ecore_x_e_virtual_keyboard_set(Ecore_X_Window win, unsigned int is_keyboard);
-EAPI int                 ecore_x_e_virtual_keyboard_get(Ecore_X_Window win);
-EAPI void                ecore_x_e_virtual_keyboard_state_set(Ecore_X_Window win, Ecore_X_Virtual_Keyboard_State state);
-EAPI Ecore_X_Virtual_Keyboard_State ecore_x_e_virtual_keyboard_state_get(Ecore_X_Window win);
-EAPI void                ecore_x_e_virtual_keyboard_state_send(Ecore_X_Window win, Ecore_X_Virtual_Keyboard_State state);
+EAPI void ecore_x_netwm_init(void);
+EAPI void ecore_x_netwm_shutdown(void);
+EAPI void ecore_x_netwm_wm_identify(
+   Ecore_X_Window root,
+   Ecore_X_Window check,
+   const char *wm_name);
+EAPI void ecore_x_netwm_supported_set(
+   Ecore_X_Window root,
+   Ecore_X_Atom *supported,
+   int num);
+EAPI void ecore_x_netwm_supported_get_prefetch(
+   Ecore_X_Window root);
+EAPI void ecore_x_netwm_supported_get_fetch(void);
+EAPI int  ecore_x_netwm_supported_get(
+   Ecore_X_Window root,
+   Ecore_X_Atom **supported,
+   int *num);
+EAPI void ecore_x_netwm_desk_count_set(
+   Ecore_X_Window root,
+   unsigned int n_desks);
+EAPI void ecore_x_netwm_desk_roots_set(
+   Ecore_X_Window root,
+   Ecore_X_Window *vroots,
+   unsigned int n_desks);
+EAPI void ecore_x_netwm_desk_names_set(
+   Ecore_X_Window root,
+   const char **names,
+   unsigned int n_desks);
+EAPI void ecore_x_netwm_desk_size_set(
+   Ecore_X_Window root,
+   unsigned int width,
+   unsigned int height);
+EAPI void ecore_x_netwm_desk_workareas_set(
+   Ecore_X_Window root,
+   unsigned int *areas,
+   unsigned int n_desks);
+EAPI void ecore_x_netwm_desk_current_set(
+   Ecore_X_Window root,
+   unsigned int desk);
+EAPI void ecore_x_netwm_desk_viewports_set(
+   Ecore_X_Window root,
+   unsigned int *origins,
+   unsigned int n_desks);
+EAPI void ecore_x_netwm_desk_layout_set(
+   Ecore_X_Window root,
+   int orientation,
+   int columns,
+   int rows,
+   int starting_corner);
+EAPI void ecore_x_netwm_showing_desktop_set(
+   Ecore_X_Window root,
+   int on);
+EAPI void ecore_x_netwm_client_list_set(
+   Ecore_X_Window root,
+   Ecore_X_Window *p_clients,
+   unsigned int n_clients);
+EAPI void ecore_x_netwm_client_list_stacking_set(
+   Ecore_X_Window root,
+   Ecore_X_Window *p_clients,
+   unsigned int n_clients);
+EAPI void ecore_x_netwm_client_active_set(
+   Ecore_X_Window root,
+   Ecore_X_Window win);
+EAPI void ecore_x_netwm_client_active_request(
+   Ecore_X_Window root,
+   Ecore_X_Window win,
+   int type,
+   Ecore_X_Window current_win);
+EAPI void ecore_x_netwm_name_set(Ecore_X_Window win,
+                                 const char *name);
+EAPI void ecore_x_netwm_name_get_prefetch(
+   Ecore_X_Window window);
+EAPI void ecore_x_netwm_name_get_fetch(void);
+EAPI int  ecore_x_netwm_name_get(Ecore_X_Window win,
+                                 char **name);
+EAPI void ecore_x_netwm_startup_id_set(
+   Ecore_X_Window win,
+   const char *id);
+EAPI void ecore_x_netwm_startup_id_get_prefetch(
+   Ecore_X_Window window);
+EAPI void ecore_x_netwm_startup_id_get_fetch(void);
+EAPI int  ecore_x_netwm_startup_id_get(
+   Ecore_X_Window win,
+   char **id);
+EAPI void ecore_x_netwm_visible_name_set(
+   Ecore_X_Window win,
+   const char *name);
+EAPI void ecore_x_netwm_visible_name_get_prefetch(
+   Ecore_X_Window window);
+EAPI void ecore_x_netwm_visible_name_get_fetch(void);
+EAPI int  ecore_x_netwm_visible_name_get(
+   Ecore_X_Window win,
+   char **name);
+EAPI void ecore_x_netwm_icon_name_set(
+   Ecore_X_Window win,
+   const char *name);
+EAPI void ecore_x_netwm_icon_name_get_prefetch(
+   Ecore_X_Window window);
+EAPI void ecore_x_netwm_icon_name_get_fetch(void);
+EAPI int  ecore_x_netwm_icon_name_get(
+   Ecore_X_Window win,
+   char **name);
+EAPI void ecore_x_netwm_visible_icon_name_set(
+   Ecore_X_Window win,
+   const char *name);
+EAPI void
+          ecore_x_netwm_visible_icon_name_get_prefetch(Ecore_X_Window window);
+EAPI void ecore_x_netwm_visible_icon_name_get_fetch(
+   void);
+EAPI int  ecore_x_netwm_visible_icon_name_get(
+   Ecore_X_Window win,
+   char **name);
+EAPI void ecore_x_netwm_desktop_set(
+   Ecore_X_Window win,
+   unsigned int desk);
+EAPI void ecore_x_netwm_desktop_get_prefetch(
+   Ecore_X_Window window);
+EAPI void ecore_x_netwm_desktop_get_fetch(void);
+EAPI int  ecore_x_netwm_desktop_get(
+   Ecore_X_Window win,
+   unsigned int *desk);
+EAPI void ecore_x_netwm_strut_set(Ecore_X_Window win,
+                                  int left,
+                                  int right,
+                                  int top,
+                                  int bottom);
+EAPI void ecore_x_netwm_strut_get_prefetch(
+   Ecore_X_Window window);
+EAPI void ecore_x_netwm_strut_get_fetch(void);
+EAPI int  ecore_x_netwm_strut_get(Ecore_X_Window win,
+                                  int *left,
+                                  int *right,
+                                  int *top,
+                                  int *bottom);
+EAPI void ecore_x_netwm_strut_partial_set(
+   Ecore_X_Window win,
+   int left,
+   int right,
+   int top,
+   int bottom,
+   int left_start_y,
+   int left_end_y,
+   int right_start_y,
+   int right_end_y,
+   int top_start_x,
+   int top_end_x,
+   int bottom_start_x,
+   int bottom_end_x);
+EAPI void ecore_x_netwm_strut_partial_get_prefetch(
+   Ecore_X_Window window);
+EAPI void ecore_x_netwm_strut_partial_get_fetch(void);
+EAPI int  ecore_x_netwm_strut_partial_get(
+   Ecore_X_Window win,
+   int *left,
+   int *right,
+   int *top,
+   int *bottom,
+   int *left_start_y,
+   int *left_end_y,
+   int *right_start_y,
+   int *right_end_y,
+   int *top_start_x,
+   int *top_end_x,
+   int *bottom_start_x,
+   int *bottom_end_x);
+EAPI void ecore_x_netwm_icons_get_prefetch(
+   Ecore_X_Window window);
+EAPI void ecore_x_netwm_icons_get_fetch(void);
+EAPI int  ecore_x_netwm_icons_get(Ecore_X_Window win,
+                                  Ecore_X_Icon **icon,
+                                  int *num);
+EAPI void ecore_x_netwm_icon_geometry_set(
+   Ecore_X_Window win,
+   int x,
+   int y,
+   int width,
+   int height);
+EAPI void ecore_x_netwm_icon_geometry_get_prefetch(
+   Ecore_X_Window window);
+EAPI void ecore_x_netwm_icon_geometry_get_fetch(void);
+EAPI int  ecore_x_netwm_icon_geometry_get(
+   Ecore_X_Window win,
+   int *x,
+   int *y,
+   int *width,
+   int *height);
+EAPI void ecore_x_netwm_pid_set(Ecore_X_Window win,
+                                int pid);
+EAPI void ecore_x_netwm_pid_get_prefetch(
+   Ecore_X_Window window);
+EAPI void ecore_x_netwm_pid_get_fetch(void);
+EAPI int  ecore_x_netwm_pid_get(Ecore_X_Window win,
+                                int *pid);
+EAPI void ecore_x_netwm_handled_icons_set(
+   Ecore_X_Window win);
+EAPI void ecore_x_netwm_handled_icons_get_prefetch(
+   Ecore_X_Window window);
+EAPI void ecore_x_netwm_handled_icons_get_fetch(void);
+EAPI int  ecore_x_netwm_handled_icons_get(
+   Ecore_X_Window win);
+EAPI void ecore_x_netwm_user_time_set(
+   Ecore_X_Window win,
+   unsigned int time);
+EAPI void ecore_x_netwm_user_time_get_prefetch(
+   Ecore_X_Window window);
+EAPI void ecore_x_netwm_user_time_get_fetch(void);
+EAPI int  ecore_x_netwm_user_time_get(
+   Ecore_X_Window win,
+   unsigned int *time);
+EAPI void ecore_x_netwm_window_state_set(
+   Ecore_X_Window win,
+   Ecore_X_Window_State *state,
+   unsigned int num);
+EAPI void ecore_x_netwm_window_state_get_prefetch(
+   Ecore_X_Window window);
+EAPI void ecore_x_netwm_window_state_get_fetch(void);
+EAPI int  ecore_x_netwm_window_state_get(
+   Ecore_X_Window win,
+   Ecore_X_Window_State **state,
+   unsigned int *num);
+EAPI void ecore_x_netwm_window_type_set(
+   Ecore_X_Window win,
+   Ecore_X_Window_Type type);
+EAPI void ecore_x_netwm_window_type_get_prefetch(
+   Ecore_X_Window window);
+EAPI void ecore_x_netwm_window_type_get_fetch(void);
+EAPI int  ecore_x_netwm_window_type_get(
+   Ecore_X_Window win,
+   Ecore_X_Window_Type *type);
+EAPI int  ecore_x_netwm_window_types_get(
+   Ecore_X_Window win,
+   Ecore_X_Window_Type **types);
+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,
+   unsigned int num);
+EAPI void ecore_x_netwm_allowed_action_get_prefetch(
+   Ecore_X_Window window);
+EAPI void ecore_x_netwm_allowed_action_get_fetch(
+   void);
+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 void ecore_x_netwm_opacity_get_prefetch(
+   Ecore_X_Window window);
+EAPI void ecore_x_netwm_opacity_get_fetch(void);
+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);
+EAPI void ecore_x_netwm_frame_size_get_prefetch(
+   Ecore_X_Window window);
+EAPI void ecore_x_netwm_frame_size_get_fetch(void);
+EAPI int  ecore_x_netwm_frame_size_get(
+   Ecore_X_Window win,
+   int *fl,
+   int *fr,
+   int *ft,
+   int *fb);
+EAPI void ecore_x_netwm_sync_counter_get_prefetch(
+   Ecore_X_Window window);
+EAPI void ecore_x_netwm_sync_counter_get_fetch(void);
+EAPI int  ecore_x_netwm_sync_counter_get(
+   Ecore_X_Window win,
+   Ecore_X_Sync_Counter *counter);
+EAPI void ecore_x_netwm_ping_send(Ecore_X_Window win);
+EAPI void ecore_x_netwm_sync_request_send(
+   Ecore_X_Window win,
+   unsigned int serial);
+EAPI void ecore_x_netwm_state_request_send(
+   Ecore_X_Window win,
+   Ecore_X_Window root,
+   Ecore_X_Window_State s1,
+   Ecore_X_Window_State s2,
+   int set);
+EAPI void ecore_x_netwm_desktop_request_send(
+   Ecore_X_Window win,
+   Ecore_X_Window root,
+   unsigned int desktop);
+
+
+EAPI void ecore_x_e_init(void);
+EAPI void ecore_x_e_frame_size_set(
+   Ecore_X_Window win,
+   int fl,
+   int fr,
+   int ft,
+   int fb);
+EAPI void                           ecore_x_e_virtual_keyboard_set(
+   Ecore_X_Window win,
+   unsigned int is_keyboard);
+EAPI int                            ecore_x_e_virtual_keyboard_get(
+   Ecore_X_Window win);
+EAPI void                           ecore_x_e_virtual_keyboard_state_set(
+   Ecore_X_Window win,
+   Ecore_X_Virtual_Keyboard_State state);
+EAPI Ecore_X_Virtual_Keyboard_State ecore_x_e_virtual_keyboard_state_get(
+   Ecore_X_Window win);
+EAPI void                           ecore_x_e_virtual_keyboard_state_send(
+   Ecore_X_Window win,
+   Ecore_X_Virtual_Keyboard_State state);
 
 
 /* Illume functions */
-EAPI void ecore_x_e_illume_zone_set(Ecore_X_Window win, Ecore_X_Window zone);
-EAPI Ecore_X_Window ecore_x_e_illume_zone_get(Ecore_X_Window win);
-EAPI void ecore_x_e_illume_zone_list_set(Ecore_X_Window win, Ecore_X_Window *zones, unsigned int n_zones);
-EAPI void ecore_x_e_illume_conformant_set(Ecore_X_Window win, unsigned int is_conformant);
-EAPI int ecore_x_e_illume_conformant_get(Ecore_X_Window win);
-EAPI void ecore_x_e_illume_mode_set(Ecore_X_Window win, Ecore_X_Illume_Mode mode);
-EAPI Ecore_X_Illume_Mode ecore_x_e_illume_mode_get(Ecore_X_Window win);
-EAPI void ecore_x_e_illume_mode_send(Ecore_X_Window win, Ecore_X_Illume_Mode mode);
-EAPI void ecore_x_e_illume_focus_back_send(Ecore_X_Window win);
-EAPI void ecore_x_e_illume_focus_forward_send(Ecore_X_Window win);
-EAPI void ecore_x_e_illume_focus_home_send(Ecore_X_Window win);
-EAPI void ecore_x_e_illume_close_send(Ecore_X_Window win);
-EAPI void ecore_x_e_illume_home_new_send(Ecore_X_Window win);
-EAPI void ecore_x_e_illume_home_del_send(Ecore_X_Window win);
-EAPI void ecore_x_e_illume_drag_set(Ecore_X_Window win, unsigned int drag);
-EAPI int ecore_x_e_illume_drag_get(Ecore_X_Window win);
-EAPI void ecore_x_e_illume_drag_locked_set(Ecore_X_Window win, unsigned int is_locked);
-EAPI int ecore_x_e_illume_drag_locked_get(Ecore_X_Window win);
-EAPI void ecore_x_e_illume_drag_start_send(Ecore_X_Window win);
-EAPI void ecore_x_e_illume_drag_end_send(Ecore_X_Window win);
-EAPI void ecore_x_e_illume_indicator_geometry_set(Ecore_X_Window win, int x, int y, int w, int h);
-EAPI int ecore_x_e_illume_indicator_geometry_get(Ecore_X_Window win, int *x, int *y, int *w, int *h);
-EAPI void ecore_x_e_illume_softkey_geometry_set(Ecore_X_Window win, int x, int y, int w, int h);
-EAPI int ecore_x_e_illume_softkey_geometry_get(Ecore_X_Window win, int *x, int *y, int *w, int *h);
-EAPI void ecore_x_e_illume_keyboard_geometry_set(Ecore_X_Window win, int x, int y, int w, int h);
-EAPI int ecore_x_e_illume_keyboard_geometry_get(Ecore_X_Window win, int *x, int *y, int *w, int *h);
-EAPI void ecore_x_e_illume_quickpanel_set(Ecore_X_Window win, unsigned int is_quickpanel);
-EAPI int ecore_x_e_illume_quickpanel_get(Ecore_X_Window win);
-EAPI void ecore_x_e_illume_quickpanel_state_set(Ecore_X_Window win, Ecore_X_Illume_Quickpanel_State state);
-EAPI Ecore_X_Illume_Quickpanel_State ecore_x_e_illume_quickpanel_state_get(Ecore_X_Window win);
-EAPI void ecore_x_e_illume_quickpanel_state_send(Ecore_X_Window win, Ecore_X_Illume_Quickpanel_State state);
-EAPI void ecore_x_e_illume_quickpanel_state_toggle(Ecore_X_Window win);
-EAPI void ecore_x_e_illume_quickpanel_priority_major_set(Ecore_X_Window win, unsigned int priority);
-EAPI int ecore_x_e_illume_quickpanel_priority_major_get(Ecore_X_Window win);
-EAPI void ecore_x_e_illume_quickpanel_priority_minor_set(Ecore_X_Window win, unsigned int priority);
-EAPI int ecore_x_e_illume_quickpanel_priority_minor_get(Ecore_X_Window win);
-EAPI void ecore_x_e_illume_quickpanel_zone_set(Ecore_X_Window win, unsigned int zone);
-EAPI int ecore_x_e_illume_quickpanel_zone_get(Ecore_X_Window win);
-EAPI void ecore_x_e_illume_quickpanel_zone_request_send(Ecore_X_Window win);
-EAPI void ecore_x_e_illume_quickpanel_position_update_send(Ecore_X_Window win);
-
-EAPI void                 ecore_x_e_comp_sync_counter_set(Ecore_X_Window win, Ecore_X_Sync_Counter counter);
-EAPI Ecore_X_Sync_Counter ecore_x_e_comp_sync_counter_get(Ecore_X_Window win);
-EAPI void                 ecore_x_e_comp_sync_draw_done_send(Ecore_X_Window root, Ecore_X_Window win);
-EAPI void                 ecore_x_e_comp_sync_supported_set(Ecore_X_Window root, Eina_Bool enabled);
-EAPI Eina_Bool            ecore_x_e_comp_sync_supported_get(Ecore_X_Window root);
-EAPI void                 ecore_x_e_comp_sync_begin_send(Ecore_X_Window win);
-EAPI void                 ecore_x_e_comp_sync_end_send(Ecore_X_Window win);
-EAPI void                 ecore_x_e_comp_sync_cancel_send(Ecore_X_Window win);
-
-EAPI void                 ecore_x_e_comp_flush_send(Ecore_X_Window win);
-EAPI void                 ecore_x_e_comp_dump_send(Ecore_X_Window win);
-EAPI void                 ecore_x_e_comp_pixmap_set(Ecore_X_Window win, Ecore_X_Pixmap pixmap);
-EAPI Ecore_X_Pixmap       ecore_x_e_comp_pixmap_get(Ecore_X_Window win);
-       
-EAPI Ecore_X_Sync_Alarm   ecore_x_sync_alarm_new(Ecore_X_Sync_Counter counter);
-EAPI int                  ecore_x_sync_alarm_free(Ecore_X_Sync_Alarm alarm);
-EAPI int                  ecore_x_sync_counter_query(Ecore_X_Sync_Counter counter, unsigned int *val);
-EAPI Ecore_X_Sync_Counter ecore_x_sync_counter_new(int val);
-EAPI void                 ecore_x_sync_counter_free(Ecore_X_Sync_Counter counter);
-EAPI void                 ecore_x_sync_counter_inc(Ecore_X_Sync_Counter counter, int by);
-EAPI void                 ecore_x_sync_counter_val_wait(Ecore_X_Sync_Counter counter, int val);
-       
-EAPI void                ecore_x_xinerama_query_screens_prefetch(void);
-EAPI void                ecore_x_xinerama_query_screens_fetch(void);
-EAPI int                 ecore_x_xinerama_screen_count_get(void);
-EAPI int                 ecore_x_xinerama_screen_geometry_get(int screen, int *x, int *y, int *w, int *h);
-
-EAPI int                 ecore_x_screensaver_event_available_get(void);
-EAPI void                ecore_x_screensaver_idle_time_prefetch(void);
-EAPI void                ecore_x_screensaver_idle_time_fetch(void);
-EAPI int                 ecore_x_screensaver_idle_time_get(void);
-EAPI void                ecore_x_get_screensaver_prefetch(void);
-EAPI void                ecore_x_get_screensaver_fetch(void);
-EAPI void                ecore_x_screensaver_set(int timeout, int interval, int prefer_blanking, int allow_exposures);
-EAPI void                ecore_x_screensaver_timeout_set(int timeout);
-EAPI int                 ecore_x_screensaver_timeout_get(void);
-EAPI void                ecore_x_screensaver_blank_set(int timeout);
-EAPI int                 ecore_x_screensaver_blank_get(void);
-EAPI void                ecore_x_screensaver_expose_set(int timeout);
-EAPI int                 ecore_x_screensaver_expose_get(void);
-EAPI void                ecore_x_screensaver_interval_set(int timeout);
-EAPI int                 ecore_x_screensaver_interval_get(void);
-EAPI void                ecore_x_screensaver_event_listen_set(int on);
+EAPI void                ecore_x_e_illume_zone_set(
+   Ecore_X_Window win,
+   Ecore_X_Window zone);
+EAPI Ecore_X_Window      ecore_x_e_illume_zone_get(
+   Ecore_X_Window win);
+EAPI void                ecore_x_e_illume_zone_list_set(
+   Ecore_X_Window win,
+   Ecore_X_Window *zones,
+   unsigned int n_zones);
+EAPI void                ecore_x_e_illume_conformant_set(
+   Ecore_X_Window win,
+   unsigned int is_conformant);
+EAPI int                 ecore_x_e_illume_conformant_get(
+   Ecore_X_Window win);
+EAPI void                ecore_x_e_illume_mode_set(
+   Ecore_X_Window win,
+   Ecore_X_Illume_Mode mode);
+EAPI Ecore_X_Illume_Mode ecore_x_e_illume_mode_get(
+   Ecore_X_Window win);
+EAPI void                ecore_x_e_illume_mode_send(
+   Ecore_X_Window win,
+   Ecore_X_Illume_Mode mode);
+EAPI void                ecore_x_e_illume_focus_back_send(
+   Ecore_X_Window win);
+EAPI void                ecore_x_e_illume_focus_forward_send(
+   Ecore_X_Window win);
+EAPI void                ecore_x_e_illume_focus_home_send(
+   Ecore_X_Window win);
+EAPI void                ecore_x_e_illume_close_send(
+   Ecore_X_Window win);
+EAPI void                ecore_x_e_illume_home_new_send(
+   Ecore_X_Window win);
+EAPI void                ecore_x_e_illume_home_del_send(
+   Ecore_X_Window win);
+EAPI void                ecore_x_e_illume_drag_set(
+   Ecore_X_Window win,
+   unsigned int drag);
+EAPI int                 ecore_x_e_illume_drag_get(
+   Ecore_X_Window win);
+EAPI void                ecore_x_e_illume_drag_locked_set(
+   Ecore_X_Window win,
+   unsigned int is_locked);
+EAPI int                 ecore_x_e_illume_drag_locked_get(
+   Ecore_X_Window win);
+EAPI void                ecore_x_e_illume_drag_start_send(
+   Ecore_X_Window win);
+EAPI void                ecore_x_e_illume_drag_end_send(
+   Ecore_X_Window win);
+EAPI void                ecore_x_e_illume_indicator_geometry_set(
+   Ecore_X_Window win,
+   int x,
+   int y,
+   int w,
+   int h);
+EAPI int ecore_x_e_illume_indicator_geometry_get(
+   Ecore_X_Window win,
+   int *x,
+   int *y,
+   int *w,
+   int *h);
+EAPI void ecore_x_e_illume_softkey_geometry_set(
+   Ecore_X_Window win,
+   int x,
+   int y,
+   int w,
+   int h);
+EAPI int ecore_x_e_illume_softkey_geometry_get(
+   Ecore_X_Window win,
+   int *x,
+   int *y,
+   int *w,
+   int *h);
+EAPI void ecore_x_e_illume_keyboard_geometry_set(
+   Ecore_X_Window win,
+   int x,
+   int y,
+   int w,
+   int h);
+EAPI int ecore_x_e_illume_keyboard_geometry_get(
+   Ecore_X_Window win,
+   int *x,
+   int *y,
+   int *w,
+   int *h);
+EAPI void                            ecore_x_e_illume_quickpanel_set(
+   Ecore_X_Window win,
+   unsigned int is_quickpanel);
+EAPI int                             ecore_x_e_illume_quickpanel_get(
+   Ecore_X_Window win);
+EAPI void                            ecore_x_e_illume_quickpanel_state_set(
+   Ecore_X_Window win,
+   Ecore_X_Illume_Quickpanel_State state);
+EAPI Ecore_X_Illume_Quickpanel_State ecore_x_e_illume_quickpanel_state_get(
+   Ecore_X_Window win);
+EAPI void                            ecore_x_e_illume_quickpanel_state_send(
+   Ecore_X_Window win,
+   Ecore_X_Illume_Quickpanel_State state);
+EAPI void                            ecore_x_e_illume_quickpanel_state_toggle(
+   Ecore_X_Window win);
+EAPI void
+                                     ecore_x_e_illume_quickpanel_priority_major_set(
+   Ecore_X_Window win,
+   unsigned int priority);
+EAPI int
+                                     ecore_x_e_illume_quickpanel_priority_major_get(
+   Ecore_X_Window win);
+EAPI void
+                                     ecore_x_e_illume_quickpanel_priority_minor_set(
+   Ecore_X_Window win,
+   unsigned int priority);
+EAPI int
+                                     ecore_x_e_illume_quickpanel_priority_minor_get(
+   Ecore_X_Window win);
+EAPI void                            ecore_x_e_illume_quickpanel_zone_set(
+   Ecore_X_Window win,
+   unsigned int zone);
+EAPI int                             ecore_x_e_illume_quickpanel_zone_get(
+   Ecore_X_Window win);
+EAPI void
+                                     ecore_x_e_illume_quickpanel_zone_request_send(
+   Ecore_X_Window win);
+EAPI void
+                                     ecore_x_e_illume_quickpanel_position_update_send(
+   Ecore_X_Window win);
+
+EAPI void                            ecore_x_e_comp_sync_counter_set(
+   Ecore_X_Window win,
+   Ecore_X_Sync_Counter counter);
+EAPI Ecore_X_Sync_Counter            ecore_x_e_comp_sync_counter_get(
+   Ecore_X_Window win);
+EAPI void                            ecore_x_e_comp_sync_draw_done_send(
+   Ecore_X_Window root,
+   Ecore_X_Window win);
+EAPI void                            ecore_x_e_comp_sync_supported_set(
+   Ecore_X_Window root,
+   Eina_Bool enabled);
+EAPI Eina_Bool                       ecore_x_e_comp_sync_supported_get(
+   Ecore_X_Window root);
+EAPI void                            ecore_x_e_comp_sync_begin_send(
+   Ecore_X_Window win);
+EAPI void                            ecore_x_e_comp_sync_end_send(
+   Ecore_X_Window win);
+EAPI void                            ecore_x_e_comp_sync_cancel_send(
+   Ecore_X_Window win);
+
+EAPI void                            ecore_x_e_comp_flush_send(
+   Ecore_X_Window win);
+EAPI void                            ecore_x_e_comp_dump_send(
+   Ecore_X_Window win);
+EAPI void                            ecore_x_e_comp_pixmap_set(
+   Ecore_X_Window win,
+   Ecore_X_Pixmap pixmap);
+EAPI Ecore_X_Pixmap                  ecore_x_e_comp_pixmap_get(
+   Ecore_X_Window win);
+
+EAPI Ecore_X_Sync_Alarm              ecore_x_sync_alarm_new(
+   Ecore_X_Sync_Counter counter);
+EAPI int                             ecore_x_sync_alarm_free(
+   Ecore_X_Sync_Alarm alarm);
+EAPI int                             ecore_x_sync_counter_query(
+   Ecore_X_Sync_Counter counter,
+   unsigned int *val);
+EAPI Ecore_X_Sync_Counter            ecore_x_sync_counter_new(int val);
+EAPI void                            ecore_x_sync_counter_free(
+   Ecore_X_Sync_Counter counter);
+EAPI void                            ecore_x_sync_counter_inc(
+   Ecore_X_Sync_Counter counter,
+   int by);
+EAPI void                            ecore_x_sync_counter_val_wait(
+   Ecore_X_Sync_Counter counter,
+   int val);
+
+EAPI void                            ecore_x_xinerama_query_screens_prefetch(
+   void);
+EAPI void                            ecore_x_xinerama_query_screens_fetch(void);
+EAPI int                             ecore_x_xinerama_screen_count_get(void);
+EAPI int                             ecore_x_xinerama_screen_geometry_get(
+   int screen,
+   int *x,
+   int *y,
+   int *w,
+   int *h);
+
+EAPI int  ecore_x_screensaver_event_available_get(
+   void);
+EAPI void ecore_x_screensaver_idle_time_prefetch(
+   void);
+EAPI void ecore_x_screensaver_idle_time_fetch(void);
+EAPI int  ecore_x_screensaver_idle_time_get(void);
+EAPI void ecore_x_get_screensaver_prefetch(void);
+EAPI void ecore_x_get_screensaver_fetch(void);
+EAPI void ecore_x_screensaver_set(int timeout,
+                                  int interval,
+                                  int prefer_blanking,
+                                  int allow_exposures);
+EAPI void ecore_x_screensaver_timeout_set(
+   int timeout);
+EAPI int  ecore_x_screensaver_timeout_get(void);
+EAPI void ecore_x_screensaver_blank_set(int timeout);
+EAPI int  ecore_x_screensaver_blank_get(void);
+EAPI void ecore_x_screensaver_expose_set(int timeout);
+EAPI int  ecore_x_screensaver_expose_get(void);
+EAPI void ecore_x_screensaver_interval_set(
+   int timeout);
+EAPI int  ecore_x_screensaver_interval_get(void);
+EAPI void ecore_x_screensaver_event_listen_set(
+   int on);
 
 /* FIXME: these funcs need categorising */
 
 typedef struct _Ecore_X_Window_Attributes
 {
-   Ecore_X_Window     root;
-   int                x, y, w, h;
-   int                border;
-   int                depth;
-   unsigned char      visible : 1;
-   unsigned char      viewable : 1;
-   unsigned char      override : 1;
-   unsigned char      input_only : 1;
-   unsigned char      save_under : 1;
-   struct {
+   Ecore_X_Window root;
+   int x, y, w, h;
+   int border;
+   int depth;
+   unsigned char visible : 1;
+   unsigned char viewable : 1;
+   unsigned char override : 1;
+   unsigned char input_only : 1;
+   unsigned char save_under : 1;
+   struct
+   {
       Ecore_X_Event_Mask mine;
       Ecore_X_Event_Mask all;
       Ecore_X_Event_Mask no_propagate;
    } event_mask;
-   Ecore_X_Gravity    window_gravity;
-   Ecore_X_Gravity    pixel_gravity;
-   Ecore_X_Colormap   colormap;
-   Ecore_X_Visual     visual;
+   Ecore_X_Gravity window_gravity;
+   Ecore_X_Gravity pixel_gravity;
+   Ecore_X_Colormap colormap;
+   Ecore_X_Visual visual;
    /* FIXME: missing
     * int map_installed;
     * Screen *screen;
     */
 } Ecore_X_Window_Attributes;
-   
-EAPI void ecore_x_get_window_attributes_prefetch(Ecore_X_Window window);
-EAPI void ecore_x_get_window_attributes_fetch(void);
-EAPI int  ecore_x_window_attributes_get(Ecore_X_Window win, Ecore_X_Window_Attributes *att_ret);
-EAPI void ecore_x_window_save_set_add(Ecore_X_Window win);
-EAPI void ecore_x_window_save_set_del(Ecore_X_Window win);
-EAPI Ecore_X_Window *ecore_x_window_children_get(Ecore_X_Window win, int *num);
-
-EAPI int  ecore_x_pointer_control_set(int accel_num, int accel_denom, int threshold);
-EAPI void ecore_x_pointer_control_get_prefetch(void);
-EAPI void ecore_x_pointer_control_get_fetch(void);
-EAPI int  ecore_x_pointer_control_get(int *accel_num, int *accel_denom, int *threshold);
-EAPI int  ecore_x_pointer_mapping_set(unsigned char *map, int nmap);
-EAPI void ecore_x_pointer_mapping_get_prefetch(void);
-EAPI void ecore_x_pointer_mapping_get_fetch(void);
-EAPI int  ecore_x_pointer_mapping_get(unsigned char *map, int nmap);
-EAPI int  ecore_x_pointer_grab(Ecore_X_Window win);
-EAPI int  ecore_x_pointer_confine_grab(Ecore_X_Window win);
-EAPI void ecore_x_pointer_ungrab(void);
-EAPI int  ecore_x_pointer_warp(Ecore_X_Window win, int x, int y);
-EAPI int  ecore_x_keyboard_grab(Ecore_X_Window win);
-EAPI void ecore_x_keyboard_ungrab(void);
-EAPI void ecore_x_grab(void);
-EAPI void ecore_x_ungrab(void);
-EAPI void ecore_x_passive_grab_replay_func_set(Eina_Bool (*func) (void *data, int event_type, void *event), void *data);
-EAPI void ecore_x_window_button_grab(Ecore_X_Window win, int button,
-                                    Ecore_X_Event_Mask event_mask,
-                                    int mod, int any_mod);
-EAPI void ecore_x_window_button_ungrab(Ecore_X_Window win, int button,
-                                      int mod, int any_mod);
-EAPI void ecore_x_window_key_grab(Ecore_X_Window win, const char *key,
-                                 int mod, int any_mod);
-EAPI void ecore_x_window_key_ungrab(Ecore_X_Window win, const char *key,
-                                   int mod, int any_mod);
-
-EAPI void ecore_x_focus_reset(void);
-EAPI void ecore_x_events_allow_all(void);
-EAPI void ecore_x_pointer_last_xy_get(int *x, int *y);
-EAPI void ecore_x_pointer_xy_get_prefetch(Ecore_X_Window window);
-EAPI void ecore_x_pointer_xy_get_fetch(void);
-EAPI void ecore_x_pointer_xy_get(Ecore_X_Window win, int *x, int *y);
+
+EAPI void             ecore_x_get_window_attributes_prefetch(
+   Ecore_X_Window window);
+EAPI void             ecore_x_get_window_attributes_fetch(void);
+EAPI int              ecore_x_window_attributes_get(
+   Ecore_X_Window win,
+   Ecore_X_Window_Attributes *
+   att_ret);
+EAPI void             ecore_x_window_save_set_add(Ecore_X_Window win);
+EAPI void             ecore_x_window_save_set_del(Ecore_X_Window win);
+EAPI Ecore_X_Window * ecore_x_window_children_get(Ecore_X_Window win, int *num);
+
+EAPI int              ecore_x_pointer_control_set(int accel_num,
+                                                  int accel_denom,
+                                                  int threshold);
+EAPI void             ecore_x_pointer_control_get_prefetch(void);
+EAPI void             ecore_x_pointer_control_get_fetch(void);
+EAPI int              ecore_x_pointer_control_get(int *accel_num,
+                                                  int *accel_denom,
+                                                  int *threshold);
+EAPI int              ecore_x_pointer_mapping_set(unsigned char *map, int nmap);
+EAPI void             ecore_x_pointer_mapping_get_prefetch(void);
+EAPI void             ecore_x_pointer_mapping_get_fetch(void);
+EAPI int              ecore_x_pointer_mapping_get(unsigned char *map, int nmap);
+EAPI int              ecore_x_pointer_grab(Ecore_X_Window win);
+EAPI int              ecore_x_pointer_confine_grab(Ecore_X_Window win);
+EAPI void             ecore_x_pointer_ungrab(void);
+EAPI int              ecore_x_pointer_warp(Ecore_X_Window win, int x, int y);
+EAPI int              ecore_x_keyboard_grab(Ecore_X_Window win);
+EAPI void             ecore_x_keyboard_ungrab(void);
+EAPI void             ecore_x_grab(void);
+EAPI void             ecore_x_ungrab(void);
+EAPI void ecore_x_passive_grab_replay_func_set(Eina_Bool (*func)(void *data,
+                                                                 int event_type,
+                                                                 void *event),
+                                               void *data);
+EAPI void             ecore_x_window_button_grab(Ecore_X_Window win, int button,
+                                                 Ecore_X_Event_Mask event_mask,
+                                                 int mod, int any_mod);
+EAPI void             ecore_x_window_button_ungrab(Ecore_X_Window win,
+                                                   int button,
+                                                   int mod,
+                                                   int any_mod);
+EAPI void             ecore_x_window_key_grab(Ecore_X_Window win,
+                                              const char *key,
+                                              int mod,
+                                              int any_mod);
+EAPI void             ecore_x_window_key_ungrab(Ecore_X_Window win,
+                                                const char *key,
+                                                int mod,
+                                                int any_mod);
+
+EAPI void             ecore_x_focus_reset(void);
+EAPI void             ecore_x_events_allow_all(void);
+EAPI void             ecore_x_pointer_last_xy_get(int *x, int *y);
+EAPI void             ecore_x_pointer_xy_get_prefetch(Ecore_X_Window window);
+EAPI void             ecore_x_pointer_xy_get_fetch(void);
+EAPI void             ecore_x_pointer_xy_get(Ecore_X_Window win, int *x, int *y);
 
 /* ecore_x_region.c */
 EAPI Ecore_X_XRegion *ecore_x_xregion_new();
 EAPI void             ecore_x_xregion_free(Ecore_X_XRegion *region);
-EAPI int              ecore_x_xregion_set(Ecore_X_XRegion *region, Ecore_X_GC gc);
-EAPI void             ecore_x_xregion_translate(Ecore_X_XRegion *region, int x, int y);
-EAPI int              ecore_x_xregion_intersect(Ecore_X_XRegion *dst, Ecore_X_XRegion *r1, Ecore_X_XRegion *r2);
-EAPI int              ecore_x_xregion_union(Ecore_X_XRegion *dst, Ecore_X_XRegion *r1, Ecore_X_XRegion *r2);
-EAPI int              ecore_x_xregion_union_rect(Ecore_X_XRegion *dst, Ecore_X_XRegion *src, Ecore_X_Rectangle *rect);
-EAPI int              ecore_x_xregion_subtract(Ecore_X_XRegion *dst, Ecore_X_XRegion *r1, Ecore_X_XRegion *r2);
+EAPI int              ecore_x_xregion_set(Ecore_X_XRegion *region,
+                                          Ecore_X_GC gc);
+EAPI void             ecore_x_xregion_translate(Ecore_X_XRegion *region,
+                                                int x,
+                                                int y);
+EAPI int              ecore_x_xregion_intersect(Ecore_X_XRegion *dst,
+                                                Ecore_X_XRegion *r1,
+                                                Ecore_X_XRegion *r2);
+EAPI int              ecore_x_xregion_union(Ecore_X_XRegion *dst,
+                                            Ecore_X_XRegion *r1,
+                                            Ecore_X_XRegion *r2);
+EAPI int              ecore_x_xregion_union_rect(Ecore_X_XRegion *dst,
+                                                 Ecore_X_XRegion *src,
+                                                 Ecore_X_Rectangle *rect);
+EAPI int              ecore_x_xregion_subtract(Ecore_X_XRegion *dst,
+                                               Ecore_X_XRegion *r1,
+                                               Ecore_X_XRegion *r2);
 EAPI int              ecore_x_xregion_is_empty(Ecore_X_XRegion *region);
-EAPI int              ecore_x_xregion_is_equal(Ecore_X_XRegion *r1, Ecore_X_XRegion *r2);
-EAPI int              ecore_x_xregion_point_contain(Ecore_X_XRegion *region, int x, int y);
-EAPI int              ecore_x_xregion_rect_contain(Ecore_X_XRegion *region, Ecore_X_Rectangle *rect);
+EAPI int              ecore_x_xregion_is_equal(Ecore_X_XRegion *r1,
+                                               Ecore_X_XRegion *r2);
+EAPI int              ecore_x_xregion_point_contain(Ecore_X_XRegion *region,
+                                                    int x,
+                                                    int y);
+EAPI int              ecore_x_xregion_rect_contain(Ecore_X_XRegion *region,
+                                                   Ecore_X_Rectangle *rect);
 
 /* ecore_x_randr.c */
 typedef struct _Ecore_X_Screen_Size Ecore_X_Screen_Size;
@@ -1754,129 +2477,222 @@ struct _Ecore_X_Screen_Refresh_Rate
    int rate;
 };
 
-EAPI int                     ecore_x_randr_query(void);
-EAPI int                     ecore_x_randr_events_select(Ecore_X_Window win, int on);
-EAPI void                    ecore_x_randr_get_screen_info_prefetch(Ecore_X_Window window);
-EAPI void                    ecore_x_randr_get_screen_info_fetch(void);
-EAPI Ecore_X_Randr_Rotation  ecore_x_randr_screen_rotations_get(Ecore_X_Window root);
-EAPI Ecore_X_Randr_Rotation  ecore_x_randr_screen_rotation_get(Ecore_X_Window root);
-EAPI void                    ecore_x_randr_screen_rotation_set(Ecore_X_Window root, Ecore_X_Randr_Rotation rot);
-EAPI Ecore_X_Screen_Size    *ecore_x_randr_screen_sizes_get(Ecore_X_Window root, int *num);
-EAPI Ecore_X_Screen_Size     ecore_x_randr_current_screen_size_get(Ecore_X_Window root);
-EAPI int                     ecore_x_randr_screen_size_set(Ecore_X_Window root, Ecore_X_Screen_Size size);
-
-EAPI Ecore_X_Screen_Refresh_Rate *ecore_x_randr_screen_refresh_rates_get(Ecore_X_Window root, int size_id, int *num);
-EAPI Ecore_X_Screen_Refresh_Rate  ecore_x_randr_current_screen_refresh_rate_get(Ecore_X_Window root);
-
-EAPI int ecore_x_randr_screen_refresh_rate_set(Ecore_X_Window root, Ecore_X_Screen_Size size, Ecore_X_Screen_Refresh_Rate rate);
+EAPI int                          ecore_x_randr_query(void);
+EAPI int                          ecore_x_randr_events_select(
+   Ecore_X_Window win,
+   int on);
+EAPI void                         ecore_x_randr_get_screen_info_prefetch(
+   Ecore_X_Window window);
+EAPI void                         ecore_x_randr_get_screen_info_fetch(void);
+EAPI Ecore_X_Randr_Rotation       ecore_x_randr_screen_rotations_get(
+   Ecore_X_Window root);
+EAPI Ecore_X_Randr_Rotation       ecore_x_randr_screen_rotation_get(
+   Ecore_X_Window root);
+EAPI void                         ecore_x_randr_screen_rotation_set(
+   Ecore_X_Window root,
+   Ecore_X_Randr_Rotation rot);
+EAPI Ecore_X_Screen_Size *        ecore_x_randr_screen_sizes_get(
+   Ecore_X_Window root,
+   int *num);
+EAPI Ecore_X_Screen_Size          ecore_x_randr_current_screen_size_get(
+   Ecore_X_Window root);
+EAPI int                          ecore_x_randr_screen_size_set(
+   Ecore_X_Window root,
+   Ecore_X_Screen_Size size);
+
+EAPI Ecore_X_Screen_Refresh_Rate *ecore_x_randr_screen_refresh_rates_get(
+   Ecore_X_Window root,
+   int size_id,
+   int *num);
+EAPI Ecore_X_Screen_Refresh_Rate  ecore_x_randr_current_screen_refresh_rate_get(
+   Ecore_X_Window root);
+
+EAPI int                          ecore_x_randr_screen_refresh_rate_set(
+   Ecore_X_Window root,
+   Ecore_X_Screen_Size size,
+   Ecore_X_Screen_Refresh_Rate rate);
 
 /* XRender Support (horrendously incomplete) */
-typedef Ecore_X_ID  Ecore_X_Picture;
+typedef Ecore_X_ID Ecore_X_Picture;
 
 /* XFixes Extension Support */
-typedef Ecore_X_ID  Ecore_X_Region;
+typedef Ecore_X_ID Ecore_X_Region;
 
 typedef enum _Ecore_X_Region_Type {
-     ECORE_X_REGION_BOUNDING,
-     ECORE_X_REGION_CLIP
+   ECORE_X_REGION_BOUNDING,
+   ECORE_X_REGION_CLIP
 } Ecore_X_Region_Type;
 
-EAPI Ecore_X_Region ecore_x_region_new(Ecore_X_Rectangle *rects, int num);
-EAPI Ecore_X_Region ecore_x_region_new_from_bitmap(Ecore_X_Pixmap bitmap);
-EAPI Ecore_X_Region ecore_x_region_new_from_window(Ecore_X_Window win, Ecore_X_Region_Type type);
-EAPI Ecore_X_Region ecore_x_region_new_from_gc(Ecore_X_GC gc);
-EAPI Ecore_X_Region ecore_x_region_new_from_picture(Ecore_X_Picture picture);
-EAPI void           ecore_x_region_free(Ecore_X_Region region);
-EAPI void           ecore_x_region_set(Ecore_X_Region region, Ecore_X_Rectangle *rects, int num);
-EAPI void           ecore_x_region_copy(Ecore_X_Region dest, Ecore_X_Region source);
-EAPI void           ecore_x_region_combine(Ecore_X_Region dest, Ecore_X_Region source1, Ecore_X_Region source2);
-EAPI void           ecore_x_region_intersect(Ecore_X_Region dest, Ecore_X_Region source1, Ecore_X_Region source2);
-EAPI void           ecore_x_region_subtract(Ecore_X_Region dest, Ecore_X_Region source1, Ecore_X_Region source2);
-EAPI void           ecore_x_region_invert(Ecore_X_Region dest, Ecore_X_Rectangle *bounds, Ecore_X_Region source);
-EAPI void           ecore_x_region_translate(Ecore_X_Region region, int dx, int dy);
-EAPI void           ecore_x_region_extents(Ecore_X_Region dest, Ecore_X_Region source);
-EAPI void           ecore_x_region_fetch_prefetch(Ecore_X_Region region);
-EAPI void           ecore_x_region_fetch_fetch(void);
-EAPI Ecore_X_Rectangle *ecore_x_region_fetch(Ecore_X_Region region, int *num, Ecore_X_Rectangle *bounds);
-EAPI void           ecore_x_region_expand(Ecore_X_Region dest, Ecore_X_Region source, unsigned int left, unsigned int right, unsigned int top, unsigned int bottom);
-EAPI void           ecore_x_region_gc_clip_set(Ecore_X_Region region, Ecore_X_GC gc, int x_origin, int y_origin);
-EAPI void           ecore_x_region_window_shape_set(Ecore_X_Region region, Ecore_X_Window win, Ecore_X_Shape_Type type, int x_offset, int y_offset);
-EAPI void           ecore_x_region_picture_clip_set(Ecore_X_Region region, Ecore_X_Picture picture, int x_origin, int y_origin);
+EAPI Ecore_X_Region     ecore_x_region_new(Ecore_X_Rectangle *rects, int num);
+EAPI Ecore_X_Region     ecore_x_region_new_from_bitmap(Ecore_X_Pixmap bitmap);
+EAPI Ecore_X_Region     ecore_x_region_new_from_window(Ecore_X_Window win,
+                                                       Ecore_X_Region_Type type);
+EAPI Ecore_X_Region     ecore_x_region_new_from_gc(Ecore_X_GC gc);
+EAPI Ecore_X_Region     ecore_x_region_new_from_picture(Ecore_X_Picture picture);
+EAPI void               ecore_x_region_free(Ecore_X_Region region);
+EAPI void               ecore_x_region_set(Ecore_X_Region region,
+                                           Ecore_X_Rectangle *rects,
+                                           int num);
+EAPI void               ecore_x_region_copy(Ecore_X_Region dest,
+                                            Ecore_X_Region source);
+EAPI void               ecore_x_region_combine(Ecore_X_Region dest,
+                                               Ecore_X_Region source1,
+                                               Ecore_X_Region source2);
+EAPI void               ecore_x_region_intersect(Ecore_X_Region dest,
+                                                 Ecore_X_Region source1,
+                                                 Ecore_X_Region source2);
+EAPI void               ecore_x_region_subtract(Ecore_X_Region dest,
+                                                Ecore_X_Region source1,
+                                                Ecore_X_Region source2);
+EAPI void               ecore_x_region_invert(Ecore_X_Region dest,
+                                              Ecore_X_Rectangle *bounds,
+                                              Ecore_X_Region source);
+EAPI void               ecore_x_region_translate(Ecore_X_Region region,
+                                                 int dx,
+                                                 int dy);
+EAPI void               ecore_x_region_extents(Ecore_X_Region dest,
+                                               Ecore_X_Region source);
+EAPI void               ecore_x_region_fetch_prefetch(Ecore_X_Region region);
+EAPI void               ecore_x_region_fetch_fetch(void);
+EAPI Ecore_X_Rectangle *ecore_x_region_fetch(Ecore_X_Region region,
+                                             int *num,
+                                             Ecore_X_Rectangle *bounds);
+EAPI void               ecore_x_region_expand(Ecore_X_Region dest,
+                                              Ecore_X_Region source,
+                                              unsigned int left,
+                                              unsigned int right,
+                                              unsigned int top,
+                                              unsigned int bottom);
+EAPI void ecore_x_region_gc_clip_set(Ecore_X_Region region,
+                                     Ecore_X_GC gc,
+                                     int x_origin,
+                                     int y_origin);
+EAPI void ecore_x_region_window_shape_set(Ecore_X_Region region,
+                                          Ecore_X_Window win,
+                                          Ecore_X_Shape_Type type,
+                                          int x_offset,
+                                          int y_offset);
+EAPI void ecore_x_region_picture_clip_set(Ecore_X_Region region,
+                                          Ecore_X_Picture picture,
+                                          int x_origin,
+                                          int y_origin);
 
 /* XComposite Extension Support */
-EAPI int               ecore_x_composite_query(void);
-EAPI void              ecore_x_composite_redirect_window(Ecore_X_Window win, Ecore_X_Composite_Update_Type type);
-EAPI void              ecore_x_composite_redirect_subwindows(Ecore_X_Window win, Ecore_X_Composite_Update_Type type);
-EAPI void              ecore_x_composite_unredirect_window(Ecore_X_Window win, Ecore_X_Composite_Update_Type type);
-EAPI void              ecore_x_composite_unredirect_subwindows(Ecore_X_Window win, Ecore_X_Composite_Update_Type type);
-EAPI Ecore_X_Pixmap    ecore_x_composite_name_window_pixmap_get(Ecore_X_Window win);
-EAPI Ecore_X_Window    ecore_x_composite_render_window_enable(Ecore_X_Window root);
-EAPI void              ecore_x_composite_render_window_disable(Ecore_X_Window root);
-       
+EAPI int            ecore_x_composite_query(void);
+EAPI void           ecore_x_composite_redirect_window(
+   Ecore_X_Window win,
+   Ecore_X_Composite_Update_Type
+   type);
+EAPI void           ecore_x_composite_redirect_subwindows(
+   Ecore_X_Window win,
+   Ecore_X_Composite_Update_Type type);
+EAPI void           ecore_x_composite_unredirect_window(
+   Ecore_X_Window win,
+   Ecore_X_Composite_Update_Type
+   type);
+EAPI void           ecore_x_composite_unredirect_subwindows(
+   Ecore_X_Window win,
+   Ecore_X_Composite_Update_Type type);
+EAPI Ecore_X_Pixmap ecore_x_composite_name_window_pixmap_get(
+   Ecore_X_Window win);
+EAPI Ecore_X_Window ecore_x_composite_render_window_enable(
+   Ecore_X_Window root);
+EAPI void           ecore_x_composite_render_window_disable(
+   Ecore_X_Window root);
+
 /* XDamage Extension Support */
-typedef Ecore_X_ID  Ecore_X_Damage;
+typedef Ecore_X_ID Ecore_X_Damage;
 
 typedef enum _Ecore_X_Damage_Report_Level {
-     ECORE_X_DAMAGE_REPORT_RAW_RECTANGLES,
-     ECORE_X_DAMAGE_REPORT_DELTA_RECTANGLES,
-     ECORE_X_DAMAGE_REPORT_BOUNDING_BOX,
-     ECORE_X_DAMAGE_REPORT_NON_EMPTY
+   ECORE_X_DAMAGE_REPORT_RAW_RECTANGLES,
+   ECORE_X_DAMAGE_REPORT_DELTA_RECTANGLES,
+   ECORE_X_DAMAGE_REPORT_BOUNDING_BOX,
+   ECORE_X_DAMAGE_REPORT_NON_EMPTY
 } Ecore_X_Damage_Report_Level;
 
-struct _Ecore_X_Event_Damage {
-     Ecore_X_Damage_Report_Level level;
-     Ecore_X_Drawable drawable;
-     Ecore_X_Damage   damage;
-     int              more;
-     Ecore_X_Time     time;
-     Ecore_X_Rectangle area;
-     Ecore_X_Rectangle  geometry;
+struct _Ecore_X_Event_Damage
+{
+   Ecore_X_Damage_Report_Level level;
+   Ecore_X_Drawable drawable;
+   Ecore_X_Damage damage;
+   int more;
+   Ecore_X_Time time;
+   Ecore_X_Rectangle area;
+   Ecore_X_Rectangle geometry;
 };
 
-typedef struct _Ecore_X_Event_Damage  Ecore_X_Event_Damage;
-
-EAPI int               ecore_x_damage_query(void);
-EAPI Ecore_X_Damage    ecore_x_damage_new(Ecore_X_Drawable d, Ecore_X_Damage_Report_Level level);
-EAPI void              ecore_x_damage_free(Ecore_X_Damage damage);
-EAPI void              ecore_x_damage_subtract(Ecore_X_Damage damage, Ecore_X_Region repair, Ecore_X_Region parts);
-
-EAPI int               ecore_x_screen_is_composited(int screen);
-EAPI void              ecore_x_screen_is_composited_set(int screen, Ecore_X_Window win);
-       
-EAPI int               ecore_x_dpms_query(void);
-EAPI void              ecore_x_dpms_capable_get_prefetch(void);
-EAPI void              ecore_x_dpms_capable_get_fetch(void);
-EAPI int               ecore_x_dpms_capable_get(void);
-EAPI void              ecore_x_dpms_enable_get_prefetch(void);
-EAPI void              ecore_x_dpms_enable_get_fetch(void);
-EAPI int               ecore_x_dpms_enabled_get(void);
-EAPI void              ecore_x_dpms_enabled_set(int enabled);
-EAPI void              ecore_x_dpms_timeouts_get_prefetch(void);
-EAPI void              ecore_x_dpms_timeouts_get_fetch(void);
-EAPI void              ecore_x_dpms_timeouts_get(unsigned int *standby, unsigned int *suspend, unsigned int *off);
-EAPI int               ecore_x_dpms_timeouts_set(unsigned int standby, unsigned int suspend, unsigned int off);
-EAPI unsigned int      ecore_x_dpms_timeout_standby_get(void);
-EAPI unsigned int      ecore_x_dpms_timeout_suspend_get(void);
-EAPI unsigned int      ecore_x_dpms_timeout_off_get(void);
-EAPI void              ecore_x_dpms_timeout_standby_set(unsigned int new_timeout);
-EAPI void              ecore_x_dpms_timeout_suspend_set(unsigned int new_timeout);
-EAPI void              ecore_x_dpms_timeout_off_set(unsigned int new_timeout);
-
-EAPI int ecore_x_test_fake_key_down(const char *key);
-EAPI int ecore_x_test_fake_key_up(const char *key);
-EAPI int ecore_x_test_fake_key_press(const char *key);
-EAPI const char *ecore_x_keysym_string_get(int keysym);
+typedef struct _Ecore_X_Event_Damage Ecore_X_Event_Damage;
+
+EAPI int            ecore_x_damage_query(void);
+EAPI Ecore_X_Damage ecore_x_damage_new(Ecore_X_Drawable d,
+                                       Ecore_X_Damage_Report_Level level);
+EAPI void           ecore_x_damage_free(Ecore_X_Damage damage);
+EAPI void           ecore_x_damage_subtract(Ecore_X_Damage damage,
+                                            Ecore_X_Region repair,
+                                            Ecore_X_Region parts);
+
+EAPI int            ecore_x_screen_is_composited(int screen);
+EAPI void           ecore_x_screen_is_composited_set(int screen,
+                                                     Ecore_X_Window win);
+
+EAPI int            ecore_x_dpms_query(void);
+EAPI void           ecore_x_dpms_capable_get_prefetch(void);
+EAPI void           ecore_x_dpms_capable_get_fetch(void);
+EAPI int            ecore_x_dpms_capable_get(void);
+EAPI void           ecore_x_dpms_enable_get_prefetch(void);
+EAPI void           ecore_x_dpms_enable_get_fetch(void);
+EAPI int            ecore_x_dpms_enabled_get(void);
+EAPI void           ecore_x_dpms_enabled_set(int enabled);
+EAPI void           ecore_x_dpms_timeouts_get_prefetch(void);
+EAPI void           ecore_x_dpms_timeouts_get_fetch(void);
+EAPI void           ecore_x_dpms_timeouts_get(unsigned int *standby,
+                                              unsigned int *suspend,
+                                              unsigned int *off);
+EAPI int            ecore_x_dpms_timeouts_set(unsigned int standby,
+                                              unsigned int suspend,
+                                              unsigned int off);
+EAPI unsigned int   ecore_x_dpms_timeout_standby_get(void);
+EAPI unsigned int   ecore_x_dpms_timeout_suspend_get(void);
+EAPI unsigned int   ecore_x_dpms_timeout_off_get(void);
+EAPI void           ecore_x_dpms_timeout_standby_set(unsigned int new_timeout);
+EAPI void           ecore_x_dpms_timeout_suspend_set(unsigned int new_timeout);
+EAPI void           ecore_x_dpms_timeout_off_set(unsigned int new_timeout);
+
+EAPI int            ecore_x_test_fake_key_down(const char *key);
+EAPI int            ecore_x_test_fake_key_up(const char *key);
+EAPI int            ecore_x_test_fake_key_press(const char *key);
+EAPI const char *   ecore_x_keysym_string_get(int keysym);
 
 typedef struct _Ecore_X_Image Ecore_X_Image;
 
-EAPI Ecore_X_Image    *ecore_x_image_new(int w, int h, Ecore_X_Visual vis, int depth);
-EAPI void              ecore_x_image_free(Ecore_X_Image *im);
-EAPI Eina_Bool         ecore_x_image_get(Ecore_X_Image *im, Ecore_X_Drawable draw, int x, int y, int sx, int sy, int w, int h);
-EAPI void              ecore_x_image_put(Ecore_X_Image *im, Ecore_X_Drawable draw, int x, int y, int sx, int sy, int w, int h);
-EAPI void             *ecore_x_image_data_get(Ecore_X_Image *im, int *bpl, int *rows, int *bpp);
+EAPI Ecore_X_Image *ecore_x_image_new(int w,
+                                      int h,
+                                      Ecore_X_Visual vis,
+                                      int depth);
+EAPI void           ecore_x_image_free(Ecore_X_Image *im);
+EAPI Eina_Bool      ecore_x_image_get(Ecore_X_Image *im,
+                                      Ecore_X_Drawable draw,
+                                      int x,
+                                      int y,
+                                      int sx,
+                                      int sy,
+                                      int w,
+                                      int h);
+EAPI void ecore_x_image_put(Ecore_X_Image *im,
+                            Ecore_X_Drawable draw,
+                            int x,
+                            int y,
+                            int sx,
+                            int sy,
+                            int w,
+                            int h);
+EAPI void *    ecore_x_image_data_get(Ecore_X_Image *im,
+                                      int *bpl,
+                                      int *rows,
+                                      int *bpp);
+
+EAPI Eina_Bool ecore_x_input_multi_select(Ecore_X_Window win);
 
-EAPI Eina_Bool         ecore_x_input_multi_select(Ecore_X_Window win);
-       
 #ifdef __cplusplus
 }
 #endif
index 8508a68..b86c6da 100644 (file)
@@ -46,7 +46,7 @@ EAPI extern Ecore_X_Atom ECORE_X_DND_ACTION_MOVE;
 EAPI extern Ecore_X_Atom ECORE_X_DND_ACTION_LINK;
 EAPI extern Ecore_X_Atom ECORE_X_DND_ACTION_ASK;
 EAPI extern Ecore_X_Atom ECORE_X_DND_ACTION_PRIVATE;
+
 /* old E atom */
 EAPI extern Ecore_X_Atom ECORE_X_ATOM_E_FRAME_SIZE;
 
@@ -192,23 +192,23 @@ EAPI extern Ecore_X_Atom ECORE_X_ATOM_SELECTION_PROP_CLIPBOARD;
 /* currenly E specific virtual keyboard extension, aim to submit to netwm spec
  * later */
 
-EAPI extern Ecore_X_Atom  ECORE_X_ATOM_E_VIRTUAL_KEYBOARD;
-EAPI extern Ecore_X_Atom  ECORE_X_ATOM_E_VIRTUAL_KEYBOARD_STATE;
-EAPI extern Ecore_X_Atom  ECORE_X_ATOM_E_VIRTUAL_KEYBOARD_ON;
-EAPI extern Ecore_X_Atom  ECORE_X_ATOM_E_VIRTUAL_KEYBOARD_OFF;
-EAPI extern Ecore_X_Atom  ECORE_X_ATOM_E_VIRTUAL_KEYBOARD_ALPHA;
-EAPI extern Ecore_X_Atom  ECORE_X_ATOM_E_VIRTUAL_KEYBOARD_NUMERIC;
-EAPI extern Ecore_X_Atom  ECORE_X_ATOM_E_VIRTUAL_KEYBOARD_PIN;
-EAPI extern Ecore_X_Atom  ECORE_X_ATOM_E_VIRTUAL_KEYBOARD_PHONE_NUMBER;
-EAPI extern Ecore_X_Atom  ECORE_X_ATOM_E_VIRTUAL_KEYBOARD_HEX;
-EAPI extern Ecore_X_Atom  ECORE_X_ATOM_E_VIRTUAL_KEYBOARD_TERMINAL;
-EAPI extern Ecore_X_Atom  ECORE_X_ATOM_E_VIRTUAL_KEYBOARD_PASSWORD;
-EAPI extern Ecore_X_Atom  ECORE_X_ATOM_E_VIRTUAL_KEYBOARD_IP;
-EAPI extern Ecore_X_Atom  ECORE_X_ATOM_E_VIRTUAL_KEYBOARD_HOST;
-EAPI extern Ecore_X_Atom  ECORE_X_ATOM_E_VIRTUAL_KEYBOARD_FILE;
-EAPI extern Ecore_X_Atom  ECORE_X_ATOM_E_VIRTUAL_KEYBOARD_URL;
-EAPI extern Ecore_X_Atom  ECORE_X_ATOM_E_VIRTUAL_KEYBOARD_KEYPAD;
-EAPI extern Ecore_X_Atom  ECORE_X_ATOM_E_VIRTUAL_KEYBOARD_J2ME;
+EAPI extern Ecore_X_Atom ECORE_X_ATOM_E_VIRTUAL_KEYBOARD;
+EAPI extern Ecore_X_Atom ECORE_X_ATOM_E_VIRTUAL_KEYBOARD_STATE;
+EAPI extern Ecore_X_Atom ECORE_X_ATOM_E_VIRTUAL_KEYBOARD_ON;
+EAPI extern Ecore_X_Atom ECORE_X_ATOM_E_VIRTUAL_KEYBOARD_OFF;
+EAPI extern Ecore_X_Atom ECORE_X_ATOM_E_VIRTUAL_KEYBOARD_ALPHA;
+EAPI extern Ecore_X_Atom ECORE_X_ATOM_E_VIRTUAL_KEYBOARD_NUMERIC;
+EAPI extern Ecore_X_Atom ECORE_X_ATOM_E_VIRTUAL_KEYBOARD_PIN;
+EAPI extern Ecore_X_Atom ECORE_X_ATOM_E_VIRTUAL_KEYBOARD_PHONE_NUMBER;
+EAPI extern Ecore_X_Atom ECORE_X_ATOM_E_VIRTUAL_KEYBOARD_HEX;
+EAPI extern Ecore_X_Atom ECORE_X_ATOM_E_VIRTUAL_KEYBOARD_TERMINAL;
+EAPI extern Ecore_X_Atom ECORE_X_ATOM_E_VIRTUAL_KEYBOARD_PASSWORD;
+EAPI extern Ecore_X_Atom ECORE_X_ATOM_E_VIRTUAL_KEYBOARD_IP;
+EAPI extern Ecore_X_Atom ECORE_X_ATOM_E_VIRTUAL_KEYBOARD_HOST;
+EAPI extern Ecore_X_Atom ECORE_X_ATOM_E_VIRTUAL_KEYBOARD_FILE;
+EAPI extern Ecore_X_Atom ECORE_X_ATOM_E_VIRTUAL_KEYBOARD_URL;
+EAPI extern Ecore_X_Atom ECORE_X_ATOM_E_VIRTUAL_KEYBOARD_KEYPAD;
+EAPI extern Ecore_X_Atom ECORE_X_ATOM_E_VIRTUAL_KEYBOARD_J2ME;
 
 
 /* Illume specific atoms */
index 1933ecc..6d4bb27 100644 (file)
@@ -1,84 +1,84 @@
 /* generic atoms */
-EAPI Ecore_X_Atom ECORE_X_ATOM_ATOM                     = 0;
-EAPI Ecore_X_Atom ECORE_X_ATOM_CARDINAL                 = 0;
-EAPI Ecore_X_Atom ECORE_X_ATOM_COMPOUND_TEXT            = 0;
-EAPI Ecore_X_Atom ECORE_X_ATOM_FILE_NAME                = 0;
-EAPI Ecore_X_Atom ECORE_X_ATOM_STRING                   = 0;
-EAPI Ecore_X_Atom ECORE_X_ATOM_TEXT                     = 0;
-EAPI Ecore_X_Atom ECORE_X_ATOM_UTF8_STRING              = 0;
-EAPI Ecore_X_Atom ECORE_X_ATOM_WINDOW                   = 0;
-EAPI Ecore_X_Atom ECORE_X_ATOM_PIXMAP                   = 0;
+EAPI Ecore_X_Atom ECORE_X_ATOM_ATOM = 0;
+EAPI Ecore_X_Atom ECORE_X_ATOM_CARDINAL = 0;
+EAPI Ecore_X_Atom ECORE_X_ATOM_COMPOUND_TEXT = 0;
+EAPI Ecore_X_Atom ECORE_X_ATOM_FILE_NAME = 0;
+EAPI Ecore_X_Atom ECORE_X_ATOM_STRING = 0;
+EAPI Ecore_X_Atom ECORE_X_ATOM_TEXT = 0;
+EAPI Ecore_X_Atom ECORE_X_ATOM_UTF8_STRING = 0;
+EAPI Ecore_X_Atom ECORE_X_ATOM_WINDOW = 0;
+EAPI Ecore_X_Atom ECORE_X_ATOM_PIXMAP = 0;
 
 /* dnd atoms */
-EAPI Ecore_X_Atom  ECORE_X_ATOM_SELECTION_PROP_XDND     = 0;
-EAPI Ecore_X_Atom  ECORE_X_ATOM_SELECTION_XDND          = 0;
-EAPI Ecore_X_Atom  ECORE_X_ATOM_XDND_AWARE              = 0;
-EAPI Ecore_X_Atom  ECORE_X_ATOM_XDND_ENTER              = 0;
-EAPI Ecore_X_Atom  ECORE_X_ATOM_XDND_TYPE_LIST          = 0;
-EAPI Ecore_X_Atom  ECORE_X_ATOM_XDND_POSITION           = 0;
-EAPI Ecore_X_Atom  ECORE_X_ATOM_XDND_ACTION_COPY        = 0;
-EAPI Ecore_X_Atom  ECORE_X_ATOM_XDND_ACTION_MOVE        = 0;
-EAPI Ecore_X_Atom  ECORE_X_ATOM_XDND_ACTION_PRIVATE     = 0;
-EAPI Ecore_X_Atom  ECORE_X_ATOM_XDND_ACTION_ASK         = 0;
-EAPI Ecore_X_Atom  ECORE_X_ATOM_XDND_ACTION_LIST        = 0;
-EAPI Ecore_X_Atom  ECORE_X_ATOM_XDND_ACTION_LINK        = 0;
-EAPI Ecore_X_Atom  ECORE_X_ATOM_XDND_ACTION_DESCRIPTION = 0;
-EAPI Ecore_X_Atom  ECORE_X_ATOM_XDND_PROXY              = 0;
-EAPI Ecore_X_Atom  ECORE_X_ATOM_XDND_STATUS             = 0;
-EAPI Ecore_X_Atom  ECORE_X_ATOM_XDND_LEAVE              = 0;
-EAPI Ecore_X_Atom  ECORE_X_ATOM_XDND_DROP               = 0;
-EAPI Ecore_X_Atom  ECORE_X_ATOM_XDND_FINISHED           = 0;
+EAPI Ecore_X_Atom ECORE_X_ATOM_SELECTION_PROP_XDND = 0;
+EAPI Ecore_X_Atom ECORE_X_ATOM_SELECTION_XDND = 0;
+EAPI Ecore_X_Atom ECORE_X_ATOM_XDND_AWARE = 0;
+EAPI Ecore_X_Atom ECORE_X_ATOM_XDND_ENTER = 0;
+EAPI Ecore_X_Atom ECORE_X_ATOM_XDND_TYPE_LIST = 0;
+EAPI Ecore_X_Atom ECORE_X_ATOM_XDND_POSITION = 0;
+EAPI Ecore_X_Atom ECORE_X_ATOM_XDND_ACTION_COPY = 0;
+EAPI Ecore_X_Atom ECORE_X_ATOM_XDND_ACTION_MOVE = 0;
+EAPI Ecore_X_Atom ECORE_X_ATOM_XDND_ACTION_PRIVATE = 0;
+EAPI Ecore_X_Atom ECORE_X_ATOM_XDND_ACTION_ASK = 0;
+EAPI Ecore_X_Atom ECORE_X_ATOM_XDND_ACTION_LIST = 0;
+EAPI Ecore_X_Atom ECORE_X_ATOM_XDND_ACTION_LINK = 0;
+EAPI Ecore_X_Atom ECORE_X_ATOM_XDND_ACTION_DESCRIPTION = 0;
+EAPI Ecore_X_Atom ECORE_X_ATOM_XDND_PROXY = 0;
+EAPI Ecore_X_Atom ECORE_X_ATOM_XDND_STATUS = 0;
+EAPI Ecore_X_Atom ECORE_X_ATOM_XDND_LEAVE = 0;
+EAPI Ecore_X_Atom ECORE_X_ATOM_XDND_DROP = 0;
+EAPI Ecore_X_Atom ECORE_X_ATOM_XDND_FINISHED = 0;
 
 /* dnd atoms that need to be exposed to the application interface */
-EAPI Ecore_X_Atom  ECORE_X_DND_ACTION_COPY              = 0;
-EAPI Ecore_X_Atom  ECORE_X_DND_ACTION_MOVE              = 0;
-EAPI Ecore_X_Atom  ECORE_X_DND_ACTION_LINK              = 0;
-EAPI Ecore_X_Atom  ECORE_X_DND_ACTION_ASK               = 0;
-EAPI Ecore_X_Atom  ECORE_X_DND_ACTION_PRIVATE           = 0;
+EAPI Ecore_X_Atom ECORE_X_DND_ACTION_COPY = 0;
+EAPI Ecore_X_Atom ECORE_X_DND_ACTION_MOVE = 0;
+EAPI Ecore_X_Atom ECORE_X_DND_ACTION_LINK = 0;
+EAPI Ecore_X_Atom ECORE_X_DND_ACTION_ASK = 0;
+EAPI Ecore_X_Atom ECORE_X_DND_ACTION_PRIVATE = 0;
 
 /* old E atom */
-EAPI Ecore_X_Atom  ECORE_X_ATOM_E_FRAME_SIZE            = 0;
+EAPI Ecore_X_Atom ECORE_X_ATOM_E_FRAME_SIZE = 0;
 
 /* old Gnome atom */
-EAPI Ecore_X_Atom  ECORE_X_ATOM_WIN_LAYER               = 0;
+EAPI Ecore_X_Atom ECORE_X_ATOM_WIN_LAYER = 0;
 
 /* ICCCM atoms */
 
 /* ICCCM: client properties */
-EAPI Ecore_X_Atom  ECORE_X_ATOM_WM_NAME                 = 0;
-EAPI Ecore_X_Atom  ECORE_X_ATOM_WM_ICON_NAME            = 0;
-EAPI Ecore_X_Atom  ECORE_X_ATOM_WM_NORMAL_HINTS         = 0;
-EAPI Ecore_X_Atom  ECORE_X_ATOM_WM_SIZE_HINTS           = 0;
-EAPI Ecore_X_Atom  ECORE_X_ATOM_WM_HINTS                = 0;
-EAPI Ecore_X_Atom  ECORE_X_ATOM_WM_CLASS                = 0;
-EAPI Ecore_X_Atom  ECORE_X_ATOM_WM_TRANSIENT_FOR        = 0;
-EAPI Ecore_X_Atom  ECORE_X_ATOM_WM_PROTOCOLS            = 0;
-EAPI Ecore_X_Atom  ECORE_X_ATOM_WM_COLORMAP_WINDOWS     = 0;
-EAPI Ecore_X_Atom  ECORE_X_ATOM_WM_COMMAND              = 0; /* obsolete */
-EAPI Ecore_X_Atom  ECORE_X_ATOM_WM_CLIENT_MACHINE       = 0; /* obsolete */
+EAPI Ecore_X_Atom ECORE_X_ATOM_WM_NAME = 0;
+EAPI Ecore_X_Atom ECORE_X_ATOM_WM_ICON_NAME = 0;
+EAPI Ecore_X_Atom ECORE_X_ATOM_WM_NORMAL_HINTS = 0;
+EAPI Ecore_X_Atom ECORE_X_ATOM_WM_SIZE_HINTS = 0;
+EAPI Ecore_X_Atom ECORE_X_ATOM_WM_HINTS = 0;
+EAPI Ecore_X_Atom ECORE_X_ATOM_WM_CLASS = 0;
+EAPI Ecore_X_Atom ECORE_X_ATOM_WM_TRANSIENT_FOR = 0;
+EAPI Ecore_X_Atom ECORE_X_ATOM_WM_PROTOCOLS = 0;
+EAPI Ecore_X_Atom ECORE_X_ATOM_WM_COLORMAP_WINDOWS = 0;
+EAPI Ecore_X_Atom ECORE_X_ATOM_WM_COMMAND = 0; /* obsolete */
+EAPI Ecore_X_Atom ECORE_X_ATOM_WM_CLIENT_MACHINE = 0; /* obsolete */
 
 /* ICCCM: window manager properties */
-EAPI Ecore_X_Atom  ECORE_X_ATOM_WM_STATE                = 0;
-EAPI Ecore_X_Atom  ECORE_X_ATOM_WM_ICON_SIZE            = 0;
+EAPI Ecore_X_Atom ECORE_X_ATOM_WM_STATE = 0;
+EAPI Ecore_X_Atom ECORE_X_ATOM_WM_ICON_SIZE = 0;
 
 /* ICCCM: WM_STATE  property */
-EAPI Ecore_X_Atom  ECORE_X_ATOM_WM_CHANGE_STATE         = 0;
+EAPI Ecore_X_Atom ECORE_X_ATOM_WM_CHANGE_STATE = 0;
 
 /* ICCCM: WM_PROTOCOLS properties */
-EAPI Ecore_X_Atom  ECORE_X_ATOM_WM_TAKE_FOCUS           = 0;
-EAPI Ecore_X_Atom  ECORE_X_ATOM_WM_SAVE_YOURSELF        = 0;
-EAPI Ecore_X_Atom  ECORE_X_ATOM_WM_DELETE_WINDOW        = 0;
+EAPI Ecore_X_Atom ECORE_X_ATOM_WM_TAKE_FOCUS = 0;
+EAPI Ecore_X_Atom ECORE_X_ATOM_WM_SAVE_YOURSELF = 0;
+EAPI Ecore_X_Atom ECORE_X_ATOM_WM_DELETE_WINDOW = 0;
 
 /* ICCCM: WM_COLORMAP properties */
-EAPI Ecore_X_Atom  ECORE_X_ATOM_WM_COLORMAP_NOTIFY      = 0;
+EAPI Ecore_X_Atom ECORE_X_ATOM_WM_COLORMAP_NOTIFY = 0;
 
 /* ICCCM: session management properties */
-EAPI Ecore_X_Atom  ECORE_X_ATOM_SM_CLIENT_ID            = 0;
-EAPI Ecore_X_Atom  ECORE_X_ATOM_WM_CLIENT_LEADER        = 0;
-EAPI Ecore_X_Atom  ECORE_X_ATOM_WM_WINDOW_ROLE          = 0;
+EAPI Ecore_X_Atom ECORE_X_ATOM_SM_CLIENT_ID = 0;
+EAPI Ecore_X_Atom ECORE_X_ATOM_WM_CLIENT_LEADER = 0;
+EAPI Ecore_X_Atom ECORE_X_ATOM_WM_WINDOW_ROLE = 0;
 
 /* Motif WM atom */
-EAPI Ecore_X_Atom  ECORE_X_ATOM_MOTIF_WM_HINTS          = 0;
+EAPI Ecore_X_Atom ECORE_X_ATOM_MOTIF_WM_HINTS = 0;
 
 /* NetWM 1.3 atoms (http://standards.freedesktop.org/wm-spec/wm-spec-1.3.html) */
 
@@ -86,183 +86,183 @@ EAPI Ecore_X_Atom  ECORE_X_ATOM_MOTIF_WM_HINTS          = 0;
  * NetWM: Root Window Properties and related messages (complete)
  */
 
-EAPI Ecore_X_Atom  ECORE_X_ATOM_NET_SUPPORTED                  = 0;
-EAPI Ecore_X_Atom  ECORE_X_ATOM_NET_CLIENT_LIST                = 0;
-EAPI Ecore_X_Atom  ECORE_X_ATOM_NET_CLIENT_LIST_STACKING       = 0;
-EAPI Ecore_X_Atom  ECORE_X_ATOM_NET_NUMBER_OF_DESKTOPS         = 0;
-EAPI Ecore_X_Atom  ECORE_X_ATOM_NET_DESKTOP_GEOMETRY           = 0;
-EAPI Ecore_X_Atom  ECORE_X_ATOM_NET_DESKTOP_VIEWPORT           = 0;
-EAPI Ecore_X_Atom  ECORE_X_ATOM_NET_CURRENT_DESKTOP            = 0;
-EAPI Ecore_X_Atom  ECORE_X_ATOM_NET_DESKTOP_NAMES              = 0;
-EAPI Ecore_X_Atom  ECORE_X_ATOM_NET_ACTIVE_WINDOW              = 0;
-EAPI Ecore_X_Atom  ECORE_X_ATOM_NET_WORKAREA                   = 0;
-EAPI Ecore_X_Atom  ECORE_X_ATOM_NET_SUPPORTING_WM_CHECK        = 0;
-EAPI Ecore_X_Atom  ECORE_X_ATOM_NET_VIRTUAL_ROOTS              = 0;
-EAPI Ecore_X_Atom  ECORE_X_ATOM_NET_DESKTOP_LAYOUT             = 0;
-EAPI Ecore_X_Atom  ECORE_X_ATOM_NET_SHOWING_DESKTOP            = 0;
+EAPI Ecore_X_Atom ECORE_X_ATOM_NET_SUPPORTED = 0;
+EAPI Ecore_X_Atom ECORE_X_ATOM_NET_CLIENT_LIST = 0;
+EAPI Ecore_X_Atom ECORE_X_ATOM_NET_CLIENT_LIST_STACKING = 0;
+EAPI Ecore_X_Atom ECORE_X_ATOM_NET_NUMBER_OF_DESKTOPS = 0;
+EAPI Ecore_X_Atom ECORE_X_ATOM_NET_DESKTOP_GEOMETRY = 0;
+EAPI Ecore_X_Atom ECORE_X_ATOM_NET_DESKTOP_VIEWPORT = 0;
+EAPI Ecore_X_Atom ECORE_X_ATOM_NET_CURRENT_DESKTOP = 0;
+EAPI Ecore_X_Atom ECORE_X_ATOM_NET_DESKTOP_NAMES = 0;
+EAPI Ecore_X_Atom ECORE_X_ATOM_NET_ACTIVE_WINDOW = 0;
+EAPI Ecore_X_Atom ECORE_X_ATOM_NET_WORKAREA = 0;
+EAPI Ecore_X_Atom ECORE_X_ATOM_NET_SUPPORTING_WM_CHECK = 0;
+EAPI Ecore_X_Atom ECORE_X_ATOM_NET_VIRTUAL_ROOTS = 0;
+EAPI Ecore_X_Atom ECORE_X_ATOM_NET_DESKTOP_LAYOUT = 0;
+EAPI Ecore_X_Atom ECORE_X_ATOM_NET_SHOWING_DESKTOP = 0;
 
 /*
  * NetWM: Other Root Window Messages (complete)
  */
 
 /* pager */
-EAPI Ecore_X_Atom  ECORE_X_ATOM_NET_CLOSE_WINDOW               = 0;
-EAPI Ecore_X_Atom  ECORE_X_ATOM_NET_MOVERESIZE_WINDOW          = 0;
-EAPI Ecore_X_Atom  ECORE_X_ATOM_NET_WM_MOVERESIZE              = 0;
-EAPI Ecore_X_Atom  ECORE_X_ATOM_NET_RESTACK_WINDOW             = 0;
+EAPI Ecore_X_Atom ECORE_X_ATOM_NET_CLOSE_WINDOW = 0;
+EAPI Ecore_X_Atom ECORE_X_ATOM_NET_MOVERESIZE_WINDOW = 0;
+EAPI Ecore_X_Atom ECORE_X_ATOM_NET_WM_MOVERESIZE = 0;
+EAPI Ecore_X_Atom ECORE_X_ATOM_NET_RESTACK_WINDOW = 0;
 
-EAPI Ecore_X_Atom  ECORE_X_ATOM_NET_REQUEST_FRAME_EXTENTS      = 0;
+EAPI Ecore_X_Atom ECORE_X_ATOM_NET_REQUEST_FRAME_EXTENTS = 0;
 
 /*
  * NetWM: Application Window Properties (complete)
  */
 
-EAPI Ecore_X_Atom  ECORE_X_ATOM_NET_WM_NAME                    = 0;
-EAPI Ecore_X_Atom  ECORE_X_ATOM_NET_WM_VISIBLE_NAME            = 0;
-EAPI Ecore_X_Atom  ECORE_X_ATOM_NET_WM_ICON_NAME               = 0;
-EAPI Ecore_X_Atom  ECORE_X_ATOM_NET_WM_VISIBLE_ICON_NAME       = 0;
-EAPI Ecore_X_Atom  ECORE_X_ATOM_NET_WM_DESKTOP                 = 0;
+EAPI Ecore_X_Atom ECORE_X_ATOM_NET_WM_NAME = 0;
+EAPI Ecore_X_Atom ECORE_X_ATOM_NET_WM_VISIBLE_NAME = 0;
+EAPI Ecore_X_Atom ECORE_X_ATOM_NET_WM_ICON_NAME = 0;
+EAPI Ecore_X_Atom ECORE_X_ATOM_NET_WM_VISIBLE_ICON_NAME = 0;
+EAPI Ecore_X_Atom ECORE_X_ATOM_NET_WM_DESKTOP = 0;
 
 /* window type */
-EAPI Ecore_X_Atom  ECORE_X_ATOM_NET_WM_WINDOW_TYPE               = 0;
-EAPI Ecore_X_Atom  ECORE_X_ATOM_NET_WM_WINDOW_TYPE_DESKTOP       = 0;
-EAPI Ecore_X_Atom  ECORE_X_ATOM_NET_WM_WINDOW_TYPE_DOCK          = 0;
-EAPI Ecore_X_Atom  ECORE_X_ATOM_NET_WM_WINDOW_TYPE_TOOLBAR       = 0;
-EAPI Ecore_X_Atom  ECORE_X_ATOM_NET_WM_WINDOW_TYPE_MENU          = 0;
-EAPI Ecore_X_Atom  ECORE_X_ATOM_NET_WM_WINDOW_TYPE_UTILITY       = 0;
-EAPI Ecore_X_Atom  ECORE_X_ATOM_NET_WM_WINDOW_TYPE_SPLASH        = 0;
-EAPI Ecore_X_Atom  ECORE_X_ATOM_NET_WM_WINDOW_TYPE_DIALOG        = 0;
-EAPI Ecore_X_Atom  ECORE_X_ATOM_NET_WM_WINDOW_TYPE_NORMAL        = 0;
-EAPI Ecore_X_Atom  ECORE_X_ATOM_NET_WM_WINDOW_TYPE_DROPDOWN_MENU = 0;
-EAPI Ecore_X_Atom  ECORE_X_ATOM_NET_WM_WINDOW_TYPE_POPUP_MENU    = 0;
-EAPI Ecore_X_Atom  ECORE_X_ATOM_NET_WM_WINDOW_TYPE_TOOLTIP       = 0;
-EAPI Ecore_X_Atom  ECORE_X_ATOM_NET_WM_WINDOW_TYPE_NOTIFICATION  = 0;
-EAPI Ecore_X_Atom  ECORE_X_ATOM_NET_WM_WINDOW_TYPE_COMBO         = 0;
-EAPI Ecore_X_Atom  ECORE_X_ATOM_NET_WM_WINDOW_TYPE_DND           = 0;
+EAPI Ecore_X_Atom ECORE_X_ATOM_NET_WM_WINDOW_TYPE = 0;
+EAPI Ecore_X_Atom ECORE_X_ATOM_NET_WM_WINDOW_TYPE_DESKTOP = 0;
+EAPI Ecore_X_Atom ECORE_X_ATOM_NET_WM_WINDOW_TYPE_DOCK = 0;
+EAPI Ecore_X_Atom ECORE_X_ATOM_NET_WM_WINDOW_TYPE_TOOLBAR = 0;
+EAPI Ecore_X_Atom ECORE_X_ATOM_NET_WM_WINDOW_TYPE_MENU = 0;
+EAPI Ecore_X_Atom ECORE_X_ATOM_NET_WM_WINDOW_TYPE_UTILITY = 0;
+EAPI Ecore_X_Atom ECORE_X_ATOM_NET_WM_WINDOW_TYPE_SPLASH = 0;
+EAPI Ecore_X_Atom ECORE_X_ATOM_NET_WM_WINDOW_TYPE_DIALOG = 0;
+EAPI Ecore_X_Atom ECORE_X_ATOM_NET_WM_WINDOW_TYPE_NORMAL = 0;
+EAPI Ecore_X_Atom ECORE_X_ATOM_NET_WM_WINDOW_TYPE_DROPDOWN_MENU = 0;
+EAPI Ecore_X_Atom ECORE_X_ATOM_NET_WM_WINDOW_TYPE_POPUP_MENU = 0;
+EAPI Ecore_X_Atom ECORE_X_ATOM_NET_WM_WINDOW_TYPE_TOOLTIP = 0;
+EAPI Ecore_X_Atom ECORE_X_ATOM_NET_WM_WINDOW_TYPE_NOTIFICATION = 0;
+EAPI Ecore_X_Atom ECORE_X_ATOM_NET_WM_WINDOW_TYPE_COMBO = 0;
+EAPI Ecore_X_Atom ECORE_X_ATOM_NET_WM_WINDOW_TYPE_DND = 0;
 
 /* state */
-EAPI Ecore_X_Atom  ECORE_X_ATOM_NET_WM_STATE                   = 0;
-EAPI Ecore_X_Atom  ECORE_X_ATOM_NET_WM_STATE_MODAL             = 0;
-EAPI Ecore_X_Atom  ECORE_X_ATOM_NET_WM_STATE_STICKY            = 0;
-EAPI Ecore_X_Atom  ECORE_X_ATOM_NET_WM_STATE_MAXIMIZED_VERT    = 0;
-EAPI Ecore_X_Atom  ECORE_X_ATOM_NET_WM_STATE_MAXIMIZED_HORZ    = 0;
-EAPI Ecore_X_Atom  ECORE_X_ATOM_NET_WM_STATE_SHADED            = 0;
-EAPI Ecore_X_Atom  ECORE_X_ATOM_NET_WM_STATE_SKIP_TASKBAR      = 0;
-EAPI Ecore_X_Atom  ECORE_X_ATOM_NET_WM_STATE_SKIP_PAGER        = 0;
-EAPI Ecore_X_Atom  ECORE_X_ATOM_NET_WM_STATE_HIDDEN            = 0;
-EAPI Ecore_X_Atom  ECORE_X_ATOM_NET_WM_STATE_FULLSCREEN        = 0;
-EAPI Ecore_X_Atom  ECORE_X_ATOM_NET_WM_STATE_ABOVE             = 0;
-EAPI Ecore_X_Atom  ECORE_X_ATOM_NET_WM_STATE_BELOW             = 0;
-EAPI Ecore_X_Atom  ECORE_X_ATOM_NET_WM_STATE_DEMANDS_ATTENTION = 0;
+EAPI Ecore_X_Atom ECORE_X_ATOM_NET_WM_STATE = 0;
+EAPI Ecore_X_Atom ECORE_X_ATOM_NET_WM_STATE_MODAL = 0;
+EAPI Ecore_X_Atom ECORE_X_ATOM_NET_WM_STATE_STICKY = 0;
+EAPI Ecore_X_Atom ECORE_X_ATOM_NET_WM_STATE_MAXIMIZED_VERT = 0;
+EAPI Ecore_X_Atom ECORE_X_ATOM_NET_WM_STATE_MAXIMIZED_HORZ = 0;
+EAPI Ecore_X_Atom ECORE_X_ATOM_NET_WM_STATE_SHADED = 0;
+EAPI Ecore_X_Atom ECORE_X_ATOM_NET_WM_STATE_SKIP_TASKBAR = 0;
+EAPI Ecore_X_Atom ECORE_X_ATOM_NET_WM_STATE_SKIP_PAGER = 0;
+EAPI Ecore_X_Atom ECORE_X_ATOM_NET_WM_STATE_HIDDEN = 0;
+EAPI Ecore_X_Atom ECORE_X_ATOM_NET_WM_STATE_FULLSCREEN = 0;
+EAPI Ecore_X_Atom ECORE_X_ATOM_NET_WM_STATE_ABOVE = 0;
+EAPI Ecore_X_Atom ECORE_X_ATOM_NET_WM_STATE_BELOW = 0;
+EAPI Ecore_X_Atom ECORE_X_ATOM_NET_WM_STATE_DEMANDS_ATTENTION = 0;
 
 /* allowed actions */
-EAPI Ecore_X_Atom  ECORE_X_ATOM_NET_WM_ALLOWED_ACTIONS         = 0;
-EAPI Ecore_X_Atom  ECORE_X_ATOM_NET_WM_ACTION_MOVE             = 0;
-EAPI Ecore_X_Atom  ECORE_X_ATOM_NET_WM_ACTION_RESIZE           = 0;
-EAPI Ecore_X_Atom  ECORE_X_ATOM_NET_WM_ACTION_MINIMIZE         = 0;
-EAPI Ecore_X_Atom  ECORE_X_ATOM_NET_WM_ACTION_SHADE            = 0;
-EAPI Ecore_X_Atom  ECORE_X_ATOM_NET_WM_ACTION_STICK            = 0;
-EAPI Ecore_X_Atom  ECORE_X_ATOM_NET_WM_ACTION_MAXIMIZE_HORZ    = 0;
-EAPI Ecore_X_Atom  ECORE_X_ATOM_NET_WM_ACTION_MAXIMIZE_VERT    = 0;
-EAPI Ecore_X_Atom  ECORE_X_ATOM_NET_WM_ACTION_FULLSCREEN       = 0;
-EAPI Ecore_X_Atom  ECORE_X_ATOM_NET_WM_ACTION_CHANGE_DESKTOP   = 0;
-EAPI Ecore_X_Atom  ECORE_X_ATOM_NET_WM_ACTION_CLOSE            = 0;
-EAPI Ecore_X_Atom  ECORE_X_ATOM_NET_WM_ACTION_ABOVE            = 0;
-EAPI Ecore_X_Atom  ECORE_X_ATOM_NET_WM_ACTION_BELOW            = 0;
-
-EAPI Ecore_X_Atom  ECORE_X_ATOM_NET_WM_STRUT                   = 0;
-EAPI Ecore_X_Atom  ECORE_X_ATOM_NET_WM_STRUT_PARTIAL           = 0;
-EAPI Ecore_X_Atom  ECORE_X_ATOM_NET_WM_ICON_GEOMETRY           = 0;
-EAPI Ecore_X_Atom  ECORE_X_ATOM_NET_WM_ICON                    = 0;
-EAPI Ecore_X_Atom  ECORE_X_ATOM_NET_WM_PID                     = 0;
-EAPI Ecore_X_Atom  ECORE_X_ATOM_NET_WM_HANDLED_ICONS           = 0;
-EAPI Ecore_X_Atom  ECORE_X_ATOM_NET_WM_USER_TIME               = 0;
-EAPI Ecore_X_Atom  ECORE_X_ATOM_NET_STARTUP_ID                 = 0;
-EAPI Ecore_X_Atom  ECORE_X_ATOM_NET_FRAME_EXTENTS              = 0;
+EAPI Ecore_X_Atom ECORE_X_ATOM_NET_WM_ALLOWED_ACTIONS = 0;
+EAPI Ecore_X_Atom ECORE_X_ATOM_NET_WM_ACTION_MOVE = 0;
+EAPI Ecore_X_Atom ECORE_X_ATOM_NET_WM_ACTION_RESIZE = 0;
+EAPI Ecore_X_Atom ECORE_X_ATOM_NET_WM_ACTION_MINIMIZE = 0;
+EAPI Ecore_X_Atom ECORE_X_ATOM_NET_WM_ACTION_SHADE = 0;
+EAPI Ecore_X_Atom ECORE_X_ATOM_NET_WM_ACTION_STICK = 0;
+EAPI Ecore_X_Atom ECORE_X_ATOM_NET_WM_ACTION_MAXIMIZE_HORZ = 0;
+EAPI Ecore_X_Atom ECORE_X_ATOM_NET_WM_ACTION_MAXIMIZE_VERT = 0;
+EAPI Ecore_X_Atom ECORE_X_ATOM_NET_WM_ACTION_FULLSCREEN = 0;
+EAPI Ecore_X_Atom ECORE_X_ATOM_NET_WM_ACTION_CHANGE_DESKTOP = 0;
+EAPI Ecore_X_Atom ECORE_X_ATOM_NET_WM_ACTION_CLOSE = 0;
+EAPI Ecore_X_Atom ECORE_X_ATOM_NET_WM_ACTION_ABOVE = 0;
+EAPI Ecore_X_Atom ECORE_X_ATOM_NET_WM_ACTION_BELOW = 0;
+
+EAPI Ecore_X_Atom ECORE_X_ATOM_NET_WM_STRUT = 0;
+EAPI Ecore_X_Atom ECORE_X_ATOM_NET_WM_STRUT_PARTIAL = 0;
+EAPI Ecore_X_Atom ECORE_X_ATOM_NET_WM_ICON_GEOMETRY = 0;
+EAPI Ecore_X_Atom ECORE_X_ATOM_NET_WM_ICON = 0;
+EAPI Ecore_X_Atom ECORE_X_ATOM_NET_WM_PID = 0;
+EAPI Ecore_X_Atom ECORE_X_ATOM_NET_WM_HANDLED_ICONS = 0;
+EAPI Ecore_X_Atom ECORE_X_ATOM_NET_WM_USER_TIME = 0;
+EAPI Ecore_X_Atom ECORE_X_ATOM_NET_STARTUP_ID = 0;
+EAPI Ecore_X_Atom ECORE_X_ATOM_NET_FRAME_EXTENTS = 0;
 
 /*
  * NetWM: Window Manager Protocols (complete)
  */
 
-EAPI Ecore_X_Atom  ECORE_X_ATOM_NET_WM_PING                    = 0;
-EAPI Ecore_X_Atom  ECORE_X_ATOM_NET_WM_SYNC_REQUEST            = 0;
-EAPI Ecore_X_Atom  ECORE_X_ATOM_NET_WM_SYNC_REQUEST_COUNTER    = 0;
+EAPI Ecore_X_Atom ECORE_X_ATOM_NET_WM_PING = 0;
+EAPI Ecore_X_Atom ECORE_X_ATOM_NET_WM_SYNC_REQUEST = 0;
+EAPI Ecore_X_Atom ECORE_X_ATOM_NET_WM_SYNC_REQUEST_COUNTER = 0;
 
 /*
  * NetWM: Not in the spec
  */
 
-EAPI Ecore_X_Atom  ECORE_X_ATOM_NET_WM_WINDOW_OPACITY          = 0;
-EAPI Ecore_X_Atom  ECORE_X_ATOM_NET_WM_WINDOW_SHADOW           = 0;
-EAPI Ecore_X_Atom  ECORE_X_ATOM_NET_WM_WINDOW_SHADE            = 0;
+EAPI Ecore_X_Atom ECORE_X_ATOM_NET_WM_WINDOW_OPACITY = 0;
+EAPI Ecore_X_Atom ECORE_X_ATOM_NET_WM_WINDOW_SHADOW = 0;
+EAPI Ecore_X_Atom ECORE_X_ATOM_NET_WM_WINDOW_SHADE = 0;
 
 /*
  * Startup Notification (http://standards.freedesktop.org/startup-notification-spec/startup-notification-0.1.txt)
  */
 
-EAPI Ecore_X_Atom  ECORE_X_ATOM_NET_STARTUP_INFO_BEGIN         = 0;
-EAPI Ecore_X_Atom  ECORE_X_ATOM_NET_STARTUP_INFO               = 0;
+EAPI Ecore_X_Atom ECORE_X_ATOM_NET_STARTUP_INFO_BEGIN = 0;
+EAPI Ecore_X_Atom ECORE_X_ATOM_NET_STARTUP_INFO = 0;
 
 /* selection atoms */
-EAPI Ecore_X_Atom  ECORE_X_ATOM_SELECTION_TARGETS              = 0;
-EAPI Ecore_X_Atom  ECORE_X_ATOM_SELECTION_PRIMARY              = 0;
-EAPI Ecore_X_Atom  ECORE_X_ATOM_SELECTION_SECONDARY            = 0;
-EAPI Ecore_X_Atom  ECORE_X_ATOM_SELECTION_CLIPBOARD            = 0;
-EAPI Ecore_X_Atom  ECORE_X_ATOM_SELECTION_PROP_PRIMARY         = 0;
-EAPI Ecore_X_Atom  ECORE_X_ATOM_SELECTION_PROP_SECONDARY       = 0;
-EAPI Ecore_X_Atom  ECORE_X_ATOM_SELECTION_PROP_CLIPBOARD       = 0;
+EAPI Ecore_X_Atom ECORE_X_ATOM_SELECTION_TARGETS = 0;
+EAPI Ecore_X_Atom ECORE_X_ATOM_SELECTION_PRIMARY = 0;
+EAPI Ecore_X_Atom ECORE_X_ATOM_SELECTION_SECONDARY = 0;
+EAPI Ecore_X_Atom ECORE_X_ATOM_SELECTION_CLIPBOARD = 0;
+EAPI Ecore_X_Atom ECORE_X_ATOM_SELECTION_PROP_PRIMARY = 0;
+EAPI Ecore_X_Atom ECORE_X_ATOM_SELECTION_PROP_SECONDARY = 0;
+EAPI Ecore_X_Atom ECORE_X_ATOM_SELECTION_PROP_CLIPBOARD = 0;
 
 /* currently E specific virtual keyboard extension, aim to submit to netwm spec
  * later */
 
-EAPI Ecore_X_Atom  ECORE_X_ATOM_E_VIRTUAL_KEYBOARD             = 0;
-EAPI Ecore_X_Atom  ECORE_X_ATOM_E_VIRTUAL_KEYBOARD_STATE       = 0;
-EAPI Ecore_X_Atom  ECORE_X_ATOM_E_VIRTUAL_KEYBOARD_ON          = 0;
-EAPI Ecore_X_Atom  ECORE_X_ATOM_E_VIRTUAL_KEYBOARD_OFF         = 0;
-EAPI Ecore_X_Atom  ECORE_X_ATOM_E_VIRTUAL_KEYBOARD_ALPHA       = 0;
-EAPI Ecore_X_Atom  ECORE_X_ATOM_E_VIRTUAL_KEYBOARD_NUMERIC     = 0;
-EAPI Ecore_X_Atom  ECORE_X_ATOM_E_VIRTUAL_KEYBOARD_PIN         = 0;
-EAPI Ecore_X_Atom  ECORE_X_ATOM_E_VIRTUAL_KEYBOARD_PHONE_NUMBER= 0;
-EAPI Ecore_X_Atom  ECORE_X_ATOM_E_VIRTUAL_KEYBOARD_HEX         = 0;
-EAPI Ecore_X_Atom  ECORE_X_ATOM_E_VIRTUAL_KEYBOARD_TERMINAL    = 0;
-EAPI Ecore_X_Atom  ECORE_X_ATOM_E_VIRTUAL_KEYBOARD_PASSWORD    = 0;
-EAPI Ecore_X_Atom  ECORE_X_ATOM_E_VIRTUAL_KEYBOARD_IP          = 0;
-EAPI Ecore_X_Atom  ECORE_X_ATOM_E_VIRTUAL_KEYBOARD_HOST        = 0;
-EAPI Ecore_X_Atom  ECORE_X_ATOM_E_VIRTUAL_KEYBOARD_FILE        = 0;
-EAPI Ecore_X_Atom  ECORE_X_ATOM_E_VIRTUAL_KEYBOARD_URL         = 0;
-EAPI Ecore_X_Atom  ECORE_X_ATOM_E_VIRTUAL_KEYBOARD_KEYPAD      = 0;
-EAPI Ecore_X_Atom  ECORE_X_ATOM_E_VIRTUAL_KEYBOARD_J2ME        = 0;
+EAPI Ecore_X_Atom ECORE_X_ATOM_E_VIRTUAL_KEYBOARD = 0;
+EAPI Ecore_X_Atom ECORE_X_ATOM_E_VIRTUAL_KEYBOARD_STATE = 0;
+EAPI Ecore_X_Atom ECORE_X_ATOM_E_VIRTUAL_KEYBOARD_ON = 0;
+EAPI Ecore_X_Atom ECORE_X_ATOM_E_VIRTUAL_KEYBOARD_OFF = 0;
+EAPI Ecore_X_Atom ECORE_X_ATOM_E_VIRTUAL_KEYBOARD_ALPHA = 0;
+EAPI Ecore_X_Atom ECORE_X_ATOM_E_VIRTUAL_KEYBOARD_NUMERIC = 0;
+EAPI Ecore_X_Atom ECORE_X_ATOM_E_VIRTUAL_KEYBOARD_PIN = 0;
+EAPI Ecore_X_Atom ECORE_X_ATOM_E_VIRTUAL_KEYBOARD_PHONE_NUMBER = 0;
+EAPI Ecore_X_Atom ECORE_X_ATOM_E_VIRTUAL_KEYBOARD_HEX = 0;
+EAPI Ecore_X_Atom ECORE_X_ATOM_E_VIRTUAL_KEYBOARD_TERMINAL = 0;
+EAPI Ecore_X_Atom ECORE_X_ATOM_E_VIRTUAL_KEYBOARD_PASSWORD = 0;
+EAPI Ecore_X_Atom ECORE_X_ATOM_E_VIRTUAL_KEYBOARD_IP = 0;
+EAPI Ecore_X_Atom ECORE_X_ATOM_E_VIRTUAL_KEYBOARD_HOST = 0;
+EAPI Ecore_X_Atom ECORE_X_ATOM_E_VIRTUAL_KEYBOARD_FILE = 0;
+EAPI Ecore_X_Atom ECORE_X_ATOM_E_VIRTUAL_KEYBOARD_URL = 0;
+EAPI Ecore_X_Atom ECORE_X_ATOM_E_VIRTUAL_KEYBOARD_KEYPAD = 0;
+EAPI Ecore_X_Atom ECORE_X_ATOM_E_VIRTUAL_KEYBOARD_J2ME = 0;
 
 /* currently E specific illume extension */
-EAPI Ecore_X_Atom  ECORE_X_ATOM_E_ILLUME_ZONE                  = 0;
-EAPI Ecore_X_Atom  ECORE_X_ATOM_E_ILLUME_ZONE_LIST             = 0;
-EAPI Ecore_X_Atom  ECORE_X_ATOM_E_ILLUME_CONFORMANT            = 0;
-EAPI Ecore_X_Atom  ECORE_X_ATOM_E_ILLUME_MODE                  = 0;
-EAPI Ecore_X_Atom  ECORE_X_ATOM_E_ILLUME_MODE_SINGLE           = 0;
-EAPI Ecore_X_Atom  ECORE_X_ATOM_E_ILLUME_MODE_DUAL_TOP         = 0;
-EAPI Ecore_X_Atom  ECORE_X_ATOM_E_ILLUME_MODE_DUAL_LEFT        = 0;
-EAPI Ecore_X_Atom  ECORE_X_ATOM_E_ILLUME_FOCUS_BACK            = 0;
-EAPI Ecore_X_Atom  ECORE_X_ATOM_E_ILLUME_FOCUS_FORWARD         = 0;
-EAPI Ecore_X_Atom  ECORE_X_ATOM_E_ILLUME_FOCUS_HOME            = 0;
-EAPI Ecore_X_Atom  ECORE_X_ATOM_E_ILLUME_CLOSE                 = 0;
-EAPI Ecore_X_Atom  ECORE_X_ATOM_E_ILLUME_HOME_NEW              = 0;
-EAPI Ecore_X_Atom  ECORE_X_ATOM_E_ILLUME_HOME_DEL              = 0;
-EAPI Ecore_X_Atom  ECORE_X_ATOM_E_ILLUME_DRAG                  = 0;
-EAPI Ecore_X_Atom  ECORE_X_ATOM_E_ILLUME_DRAG_LOCKED           = 0;
-EAPI Ecore_X_Atom  ECORE_X_ATOM_E_ILLUME_DRAG_START            = 0;
-EAPI Ecore_X_Atom  ECORE_X_ATOM_E_ILLUME_DRAG_END              = 0;
-EAPI Ecore_X_Atom  ECORE_X_ATOM_E_ILLUME_INDICATOR_GEOMETRY    = 0;
-EAPI Ecore_X_Atom  ECORE_X_ATOM_E_ILLUME_SOFTKEY_GEOMETRY      = 0;
-EAPI Ecore_X_Atom  ECORE_X_ATOM_E_ILLUME_KEYBOARD_GEOMETRY     = 0;
-EAPI Ecore_X_Atom  ECORE_X_ATOM_E_ILLUME_QUICKPANEL            = 0;
-EAPI Ecore_X_Atom  ECORE_X_ATOM_E_ILLUME_QUICKPANEL_STATE      = 0;
-EAPI Ecore_X_Atom  ECORE_X_ATOM_E_ILLUME_QUICKPANEL_STATE_TOGGLE    = 0;
-EAPI Ecore_X_Atom  ECORE_X_ATOM_E_ILLUME_QUICKPANEL_ON         = 0;
-EAPI Ecore_X_Atom  ECORE_X_ATOM_E_ILLUME_QUICKPANEL_OFF        = 0;
-EAPI Ecore_X_Atom  ECORE_X_ATOM_E_ILLUME_QUICKPANEL_PRIORITY_MAJOR  = 0;
-EAPI Ecore_X_Atom  ECORE_X_ATOM_E_ILLUME_QUICKPANEL_PRIORITY_MINOR  = 0;
-EAPI Ecore_X_Atom  ECORE_X_ATOM_E_ILLUME_QUICKPANEL_ZONE       = 0;
-EAPI Ecore_X_Atom  ECORE_X_ATOM_E_ILLUME_QUICKPANEL_POSITION_UPDATE = 0;
+EAPI Ecore_X_Atom ECORE_X_ATOM_E_ILLUME_ZONE = 0;
+EAPI Ecore_X_Atom ECORE_X_ATOM_E_ILLUME_ZONE_LIST = 0;
+EAPI Ecore_X_Atom ECORE_X_ATOM_E_ILLUME_CONFORMANT = 0;
+EAPI Ecore_X_Atom ECORE_X_ATOM_E_ILLUME_MODE = 0;
+EAPI Ecore_X_Atom ECORE_X_ATOM_E_ILLUME_MODE_SINGLE = 0;
+EAPI Ecore_X_Atom ECORE_X_ATOM_E_ILLUME_MODE_DUAL_TOP = 0;
+EAPI Ecore_X_Atom ECORE_X_ATOM_E_ILLUME_MODE_DUAL_LEFT = 0;
+EAPI Ecore_X_Atom ECORE_X_ATOM_E_ILLUME_FOCUS_BACK = 0;
+EAPI Ecore_X_Atom ECORE_X_ATOM_E_ILLUME_FOCUS_FORWARD = 0;
+EAPI Ecore_X_Atom ECORE_X_ATOM_E_ILLUME_FOCUS_HOME = 0;
+EAPI Ecore_X_Atom ECORE_X_ATOM_E_ILLUME_CLOSE = 0;
+EAPI Ecore_X_Atom ECORE_X_ATOM_E_ILLUME_HOME_NEW = 0;
+EAPI Ecore_X_Atom ECORE_X_ATOM_E_ILLUME_HOME_DEL = 0;
+EAPI Ecore_X_Atom ECORE_X_ATOM_E_ILLUME_DRAG = 0;
+EAPI Ecore_X_Atom ECORE_X_ATOM_E_ILLUME_DRAG_LOCKED = 0;
+EAPI Ecore_X_Atom ECORE_X_ATOM_E_ILLUME_DRAG_START = 0;
+EAPI Ecore_X_Atom ECORE_X_ATOM_E_ILLUME_DRAG_END = 0;
+EAPI Ecore_X_Atom ECORE_X_ATOM_E_ILLUME_INDICATOR_GEOMETRY = 0;
+EAPI Ecore_X_Atom ECORE_X_ATOM_E_ILLUME_SOFTKEY_GEOMETRY = 0;
+EAPI Ecore_X_Atom ECORE_X_ATOM_E_ILLUME_KEYBOARD_GEOMETRY = 0;
+EAPI Ecore_X_Atom ECORE_X_ATOM_E_ILLUME_QUICKPANEL = 0;
+EAPI Ecore_X_Atom ECORE_X_ATOM_E_ILLUME_QUICKPANEL_STATE = 0;
+EAPI Ecore_X_Atom ECORE_X_ATOM_E_ILLUME_QUICKPANEL_STATE_TOGGLE = 0;
+EAPI Ecore_X_Atom ECORE_X_ATOM_E_ILLUME_QUICKPANEL_ON = 0;
+EAPI Ecore_X_Atom ECORE_X_ATOM_E_ILLUME_QUICKPANEL_OFF = 0;
+EAPI Ecore_X_Atom ECORE_X_ATOM_E_ILLUME_QUICKPANEL_PRIORITY_MAJOR = 0;
+EAPI Ecore_X_Atom ECORE_X_ATOM_E_ILLUME_QUICKPANEL_PRIORITY_MINOR = 0;
+EAPI Ecore_X_Atom ECORE_X_ATOM_E_ILLUME_QUICKPANEL_ZONE = 0;
+EAPI Ecore_X_Atom ECORE_X_ATOM_E_ILLUME_QUICKPANEL_POSITION_UPDATE = 0;
 
 
 EAPI Ecore_X_Atom ECORE_X_ATOM_E_COMP_SYNC_COUNTER = 0;
index e3ccfe4..486f64d 100644 (file)
 #include "Ecore_Input.h"
 
 static Eina_Bool _ecore_x_fd_handler(void *data, Ecore_Fd_Handler *fd_handler);
-static Eina_Bool _ecore_x_fd_handler_buf(void *data, Ecore_Fd_Handler *fd_handler);
-static int _ecore_x_key_mask_get(KeySym sym);
-static int _ecore_x_event_modifier(unsigned int state);
+static Eina_Bool _ecore_x_fd_handler_buf(void *data,
+                                         Ecore_Fd_Handler *fd_handler);
+static int       _ecore_x_key_mask_get(KeySym sym);
+static int       _ecore_x_event_modifier(unsigned int state);
 
 static Ecore_Fd_Handler *_ecore_x_fd_handler_handle = NULL;
 
 static const int AnyXEvent = 0; /* 0 can be used as there are no event types
-                                * with index 0 and 1 as they are used for
-                                * errors
-                                */
+                                 * with index 0 and 1 as they are used for
+                                 * errors
+                                 */
 
 static int _ecore_x_event_shape_id = 0;
 static int _ecore_x_event_screensaver_id = 0;
@@ -56,14 +57,14 @@ static int _ecore_x_init_count = 0;
 static int _ecore_x_grab_count = 0;
 
 Display *_ecore_x_disp = NULL;
-double   _ecore_x_double_click_time = 0.25;
-Time     _ecore_x_event_last_time = 0;
-Window   _ecore_x_event_last_win = 0;
-int      _ecore_x_event_last_root_x = 0;
-int      _ecore_x_event_last_root_y = 0;
-int      _ecore_x_xcursor = 0;
-XIC      _ecore_x_ic = NULL; /* Input context for composed characters */
-XIM      _ecore_x_im = NULL;
+double _ecore_x_double_click_time = 0.25;
+Time _ecore_x_event_last_time = 0;
+Window _ecore_x_event_last_win = 0;
+int _ecore_x_event_last_root_x = 0;
+int _ecore_x_event_last_root_y = 0;
+int _ecore_x_xcursor = 0;
+XIC _ecore_x_ic = NULL; /* Input context for composed characters */
+XIM _ecore_x_im = NULL;
 
 Ecore_X_Window _ecore_x_private_win = 0;
 
@@ -107,15 +108,15 @@ EAPI int ECORE_X_EVENT_RANDR_OUTPUT_CHANGE = 0;
 EAPI int ECORE_X_EVENT_RANDR_OUTPUT_PROPERTY_NOTIFY = 0;
 EAPI int ECORE_X_EVENT_WINDOW_DELETE_REQUEST = 0;
 /*
-EAPI int ECORE_X_EVENT_WINDOW_PROP_TITLE_CHANGE = 0;
-EAPI int ECORE_X_EVENT_WINDOW_PROP_VISIBLE_TITLE_CHANGE = 0;
-EAPI int ECORE_X_EVENT_WINDOW_PROP_NAME_CLASS_CHANGE = 0;
-EAPI int ECORE_X_EVENT_WINDOW_PROP_ICON_NAME_CHANGE = 0;
-EAPI int ECORE_X_EVENT_WINDOW_PROP_VISIBLE_ICON_NAME_CHANGE = 0;
-EAPI int ECORE_X_EVENT_WINDOW_PROP_CLIENT_MACHINE_CHANGE = 0;
-EAPI int ECORE_X_EVENT_WINDOW_PROP_PID_CHANGE = 0;
-EAPI int ECORE_X_EVENT_WINDOW_PROP_DESKTOP_CHANGE = 0;
-*/
+   EAPI int ECORE_X_EVENT_WINDOW_PROP_TITLE_CHANGE = 0;
+   EAPI int ECORE_X_EVENT_WINDOW_PROP_VISIBLE_TITLE_CHANGE = 0;
+   EAPI int ECORE_X_EVENT_WINDOW_PROP_NAME_CLASS_CHANGE = 0;
+   EAPI int ECORE_X_EVENT_WINDOW_PROP_ICON_NAME_CHANGE = 0;
+   EAPI int ECORE_X_EVENT_WINDOW_PROP_VISIBLE_ICON_NAME_CHANGE = 0;
+   EAPI int ECORE_X_EVENT_WINDOW_PROP_CLIENT_MACHINE_CHANGE = 0;
+   EAPI int ECORE_X_EVENT_WINDOW_PROP_PID_CHANGE = 0;
+   EAPI int ECORE_X_EVENT_WINDOW_PROP_DESKTOP_CHANGE = 0;
+ */
 
 EAPI int ECORE_X_EVENT_WINDOW_MOVE_RESIZE_REQUEST = 0;
 EAPI int ECORE_X_EVENT_WINDOW_STATE_REQUEST = 0;
@@ -140,16 +141,23 @@ EAPI int ECORE_X_LOCK_CAPS = 0;
 
 #ifdef LOGRT
 static double t0 = 0.0;
-static Status (*_logrt_real_reply) (Display *disp, void *rep, int extra, Bool discard) = NULL;
+static Status (*_logrt_real_reply)(Display *disp, void *rep, int extra,
+                                   Bool discard) = NULL;
 static void
 _logrt_init(void)
 {
    void *lib;
-   
+
    lib = dlopen("libX11.so", RTLD_GLOBAL | RTLD_LAZY);
-   if (!lib) lib = dlopen("libX11.so.6", RTLD_GLOBAL | RTLD_LAZY);
-   if (!lib) lib = dlopen("libX11.so.6.3", RTLD_GLOBAL | RTLD_LAZY);
-   if (!lib) lib = dlopen("libX11.so.6.3.0", RTLD_GLOBAL | RTLD_LAZY);
+   if (!lib)
+      lib = dlopen("libX11.so.6", RTLD_GLOBAL | RTLD_LAZY);
+
+   if (!lib)
+      lib = dlopen("libX11.so.6.3", RTLD_GLOBAL | RTLD_LAZY);
+
+   if (!lib)
+      lib = dlopen("libX11.so.6.3.0", RTLD_GLOBAL | RTLD_LAZY);
+
    _logrt_real_reply = dlsym(lib, "_XReply");
    t0 = ecore_time_get();
 }
@@ -159,7 +167,7 @@ _XReply(Display *disp, void *rep, int extra, Bool discard)
    void *bt[128];
    int i, n;
    char **sym;
-   
+
    n = backtrace(bt, 128);
    if (n > 0)
      {
@@ -182,15 +190,18 @@ _XReply(Display *disp, void *rep, int extra, Bool discard)
                             printf("%s", tsym);
                          }
                        else
-                         printf("???");
+                            printf("???");
                     }
                   else
-                    printf("???");
-                  if (i > 1) printf(" > ");
+                            printf("???");
+
+                  if (i > 1)
+                            printf(" > ");
                }
-             printf("\n");
+                            printf("\n");
           }
      }
+
    // fixme: logme
    return _logrt_real_reply(disp, rep, extra, discard);
 }
@@ -234,150 +245,192 @@ ecore_x_init(const char *name)
    int damage_base = 0;
    int damage_err_base = 0;
 #endif
-   
-   if (++_ecore_x_init_count != 1) 
-     return _ecore_x_init_count;
+
+   if (++_ecore_x_init_count != 1)
+      return _ecore_x_init_count;
 
    LOGFN(__FILE__, __LINE__, __FUNCTION__);
 #ifdef LOGRT
    _logrt_init();
-#endif   
-   
-   _ecore_xlib_log_dom = eina_log_domain_register("EcoreX11", ECORE_XLIB_DEFAULT_LOG_COLOR);
+#endif
+
+   _ecore_xlib_log_dom = eina_log_domain_register("EcoreX11",
+                                                  ECORE_XLIB_DEFAULT_LOG_COLOR);
    if(_ecore_xlib_log_dom < 0)
      {
-       EINA_LOG_ERR("Impossible to create a log domain for the Ecore Xlib module.");
-       return --_ecore_x_init_count;
+        EINA_LOG_ERR(
+           "Impossible to create a log domain for the Ecore Xlib module.");
+        return --_ecore_x_init_count;
      }
+
    if (!ecore_event_init())
      {
-       eina_log_domain_unregister(_ecore_xlib_log_dom);
-       _ecore_xlib_log_dom = -1;
-       return --_ecore_x_init_count;
+        eina_log_domain_unregister(_ecore_xlib_log_dom);
+        _ecore_xlib_log_dom = -1;
+        return --_ecore_x_init_count;
      }
+
 #ifdef EVAS_FRAME_QUEUING
    XInitThreads();
 #endif
    _ecore_x_disp = XOpenDisplay((char *)name);
    if (!_ecore_x_disp)
-     goto shutdown_ecore_event;
+      goto shutdown_ecore_event;
 
    _ecore_x_error_handler_init();
    _ecore_x_event_handlers_num = LASTEvent;
 
-#define ECORE_X_EVENT_HANDLERS_GROW(ext_base, ext_num_events)          \
-   do {                                                                        \
-     if (_ecore_x_event_handlers_num < (ext_base + ext_num_events))    \
-       _ecore_x_event_handlers_num = (ext_base + ext_num_events);      \
-   } while (0)
+#define ECORE_X_EVENT_HANDLERS_GROW(ext_base, ext_num_events)           \
+   do {                                                                 \
+        if (_ecore_x_event_handlers_num < (ext_base + ext_num_events)) {     \
+             _ecore_x_event_handlers_num = (ext_base + ext_num_events); }       \
+     } while (0)
 
    if (XShapeQueryExtension(_ecore_x_disp, &shape_base, &shape_err_base))
-     _ecore_x_event_shape_id = shape_base;
+      _ecore_x_event_shape_id = shape_base;
+
    ECORE_X_EVENT_HANDLERS_GROW(shape_base, ShapeNumberEvents);
 
 #ifdef ECORE_XSS
-   if (XScreenSaverQueryExtension(_ecore_x_disp, &screensaver_base, &screensaver_err_base))
-     _ecore_x_event_screensaver_id = screensaver_base;
+   if (XScreenSaverQueryExtension(_ecore_x_disp, &screensaver_base,
+                                  &screensaver_err_base))
+      _ecore_x_event_screensaver_id = screensaver_base;
+
    ECORE_X_EVENT_HANDLERS_GROW(screensaver_base, ScreenSaverNumberEvents);
 #endif
 
    if (XSyncQueryExtension(_ecore_x_disp, &sync_base, &sync_err_base))
      {
-       int major, minor;
+        int major, minor;
 
-       _ecore_x_event_sync_id = sync_base;
-       if (!XSyncInitialize(_ecore_x_disp, &major, &minor))
-         _ecore_x_event_sync_id = 0;
+        _ecore_x_event_sync_id = sync_base;
+        if (!XSyncInitialize(_ecore_x_disp, &major, &minor))
+           _ecore_x_event_sync_id = 0;
      }
+
    ECORE_X_EVENT_HANDLERS_GROW(sync_base, XSyncNumberEvents);
 
 #ifdef ECORE_XRANDR
    if (XRRQueryExtension(_ecore_x_disp, &randr_base, &randr_err_base))
-     _ecore_x_event_randr_id = randr_base;
+      _ecore_x_event_randr_id = randr_base;
+
    ECORE_X_EVENT_HANDLERS_GROW(randr_base, RRNumberEvents);
 #endif
 
 #ifdef ECORE_XFIXES
    if (XFixesQueryExtension(_ecore_x_disp, &fixes_base, &fixes_err_base))
-     _ecore_x_event_fixes_selection_id = fixes_base;
+      _ecore_x_event_fixes_selection_id = fixes_base;
+
    ECORE_X_EVENT_HANDLERS_GROW(fixes_base, XFixesNumberEvents);
 #endif
 
 #ifdef ECORE_XDAMAGE
    if (XDamageQueryExtension(_ecore_x_disp, &damage_base, &damage_err_base))
-     _ecore_x_event_damage_id = damage_base;
+      _ecore_x_event_damage_id = damage_base;
+
    ECORE_X_EVENT_HANDLERS_GROW(damage_base, XDamageNumberEvents);
 #endif
 
    _ecore_x_event_handlers = calloc(_ecore_x_event_handlers_num, sizeof(void *));
    if (!_ecore_x_event_handlers)
-     goto close_display;
+      goto close_display;
 
-#ifdef ECORE_XCURSOR   
+#ifdef ECORE_XCURSOR
    _ecore_x_xcursor = XcursorSupportsARGB(_ecore_x_disp);
 #endif
-   _ecore_x_event_handlers[AnyXEvent]        = _ecore_x_event_handle_any_event;
-   _ecore_x_event_handlers[KeyPress]         = _ecore_x_event_handle_key_press;
-   _ecore_x_event_handlers[KeyRelease]       = _ecore_x_event_handle_key_release;
-   _ecore_x_event_handlers[ButtonPress]      = _ecore_x_event_handle_button_press;
-   _ecore_x_event_handlers[ButtonRelease]    = _ecore_x_event_handle_button_release;
-   _ecore_x_event_handlers[MotionNotify]     = _ecore_x_event_handle_motion_notify;
-   _ecore_x_event_handlers[EnterNotify]      = _ecore_x_event_handle_enter_notify;
-   _ecore_x_event_handlers[LeaveNotify]      = _ecore_x_event_handle_leave_notify;
-   _ecore_x_event_handlers[FocusIn]          = _ecore_x_event_handle_focus_in;
-   _ecore_x_event_handlers[FocusOut]         = _ecore_x_event_handle_focus_out;
-   _ecore_x_event_handlers[KeymapNotify]     = _ecore_x_event_handle_keymap_notify;
-   _ecore_x_event_handlers[Expose]           = _ecore_x_event_handle_expose;
-   _ecore_x_event_handlers[GraphicsExpose]   = _ecore_x_event_handle_graphics_expose;
-   _ecore_x_event_handlers[VisibilityNotify] = _ecore_x_event_handle_visibility_notify;
-   _ecore_x_event_handlers[CreateNotify]     = _ecore_x_event_handle_create_notify;
-   _ecore_x_event_handlers[DestroyNotify]    = _ecore_x_event_handle_destroy_notify;
-   _ecore_x_event_handlers[UnmapNotify]      = _ecore_x_event_handle_unmap_notify;
-   _ecore_x_event_handlers[MapNotify]        = _ecore_x_event_handle_map_notify;
-   _ecore_x_event_handlers[MapRequest]       = _ecore_x_event_handle_map_request;
-   _ecore_x_event_handlers[ReparentNotify]   = _ecore_x_event_handle_reparent_notify;
-   _ecore_x_event_handlers[ConfigureNotify]  = _ecore_x_event_handle_configure_notify;
-   _ecore_x_event_handlers[ConfigureRequest] = _ecore_x_event_handle_configure_request;
-   _ecore_x_event_handlers[GravityNotify]    = _ecore_x_event_handle_gravity_notify;
-   _ecore_x_event_handlers[ResizeRequest]    = _ecore_x_event_handle_resize_request;
-   _ecore_x_event_handlers[CirculateNotify]  = _ecore_x_event_handle_circulate_notify;
-   _ecore_x_event_handlers[CirculateRequest] = _ecore_x_event_handle_circulate_request;
-   _ecore_x_event_handlers[PropertyNotify]   = _ecore_x_event_handle_property_notify;
-   _ecore_x_event_handlers[SelectionClear]   = _ecore_x_event_handle_selection_clear;
-   _ecore_x_event_handlers[SelectionRequest] = _ecore_x_event_handle_selection_request;
-   _ecore_x_event_handlers[SelectionNotify]  = _ecore_x_event_handle_selection_notify;
-   _ecore_x_event_handlers[ColormapNotify]   = _ecore_x_event_handle_colormap_notify;
-   _ecore_x_event_handlers[ClientMessage]    = _ecore_x_event_handle_client_message;
-   _ecore_x_event_handlers[MappingNotify]    = _ecore_x_event_handle_mapping_notify;
+   _ecore_x_event_handlers[AnyXEvent] = _ecore_x_event_handle_any_event;
+   _ecore_x_event_handlers[KeyPress] = _ecore_x_event_handle_key_press;
+   _ecore_x_event_handlers[KeyRelease] = _ecore_x_event_handle_key_release;
+   _ecore_x_event_handlers[ButtonPress] = _ecore_x_event_handle_button_press;
+   _ecore_x_event_handlers[ButtonRelease] =
+      _ecore_x_event_handle_button_release;
+   _ecore_x_event_handlers[MotionNotify] = _ecore_x_event_handle_motion_notify;
+   _ecore_x_event_handlers[EnterNotify] = _ecore_x_event_handle_enter_notify;
+   _ecore_x_event_handlers[LeaveNotify] = _ecore_x_event_handle_leave_notify;
+   _ecore_x_event_handlers[FocusIn] = _ecore_x_event_handle_focus_in;
+   _ecore_x_event_handlers[FocusOut] = _ecore_x_event_handle_focus_out;
+   _ecore_x_event_handlers[KeymapNotify] = _ecore_x_event_handle_keymap_notify;
+   _ecore_x_event_handlers[Expose] = _ecore_x_event_handle_expose;
+   _ecore_x_event_handlers[GraphicsExpose] =
+      _ecore_x_event_handle_graphics_expose;
+   _ecore_x_event_handlers[VisibilityNotify] =
+      _ecore_x_event_handle_visibility_notify;
+   _ecore_x_event_handlers[CreateNotify] = _ecore_x_event_handle_create_notify;
+   _ecore_x_event_handlers[DestroyNotify] =
+      _ecore_x_event_handle_destroy_notify;
+   _ecore_x_event_handlers[UnmapNotify] = _ecore_x_event_handle_unmap_notify;
+   _ecore_x_event_handlers[MapNotify] = _ecore_x_event_handle_map_notify;
+   _ecore_x_event_handlers[MapRequest] = _ecore_x_event_handle_map_request;
+   _ecore_x_event_handlers[ReparentNotify] =
+      _ecore_x_event_handle_reparent_notify;
+   _ecore_x_event_handlers[ConfigureNotify] =
+      _ecore_x_event_handle_configure_notify;
+   _ecore_x_event_handlers[ConfigureRequest] =
+      _ecore_x_event_handle_configure_request;
+   _ecore_x_event_handlers[GravityNotify] =
+      _ecore_x_event_handle_gravity_notify;
+   _ecore_x_event_handlers[ResizeRequest] =
+      _ecore_x_event_handle_resize_request;
+   _ecore_x_event_handlers[CirculateNotify] =
+      _ecore_x_event_handle_circulate_notify;
+   _ecore_x_event_handlers[CirculateRequest] =
+      _ecore_x_event_handle_circulate_request;
+   _ecore_x_event_handlers[PropertyNotify] =
+      _ecore_x_event_handle_property_notify;
+   _ecore_x_event_handlers[SelectionClear] =
+      _ecore_x_event_handle_selection_clear;
+   _ecore_x_event_handlers[SelectionRequest] =
+      _ecore_x_event_handle_selection_request;
+   _ecore_x_event_handlers[SelectionNotify] =
+      _ecore_x_event_handle_selection_notify;
+   _ecore_x_event_handlers[ColormapNotify] =
+      _ecore_x_event_handle_colormap_notify;
+   _ecore_x_event_handlers[ClientMessage] =
+      _ecore_x_event_handle_client_message;
+   _ecore_x_event_handlers[MappingNotify] =
+      _ecore_x_event_handle_mapping_notify;
 #ifdef GenericEvent
-  _ecore_x_event_handlers[GenericEvent]    = _ecore_x_event_handle_generic_event;      
+   _ecore_x_event_handlers[GenericEvent] = _ecore_x_event_handle_generic_event;
 #endif
-   
+
    if (_ecore_x_event_shape_id)
-     _ecore_x_event_handlers[_ecore_x_event_shape_id] = _ecore_x_event_handle_shape_change;
+      _ecore_x_event_handlers[_ecore_x_event_shape_id] =
+         _ecore_x_event_handle_shape_change;
+
    if (_ecore_x_event_screensaver_id)
-     _ecore_x_event_handlers[_ecore_x_event_screensaver_id] = _ecore_x_event_handle_screensaver_notify;
+      _ecore_x_event_handlers[_ecore_x_event_screensaver_id] =
+         _ecore_x_event_handle_screensaver_notify;
+
    if (_ecore_x_event_sync_id)
      {
-       _ecore_x_event_handlers[_ecore_x_event_sync_id + XSyncCounterNotify] =
-          _ecore_x_event_handle_sync_counter;
-       _ecore_x_event_handlers[_ecore_x_event_sync_id + XSyncAlarmNotify] =
-          _ecore_x_event_handle_sync_alarm;
+        _ecore_x_event_handlers[_ecore_x_event_sync_id + XSyncCounterNotify] =
+           _ecore_x_event_handle_sync_counter;
+        _ecore_x_event_handlers[_ecore_x_event_sync_id + XSyncAlarmNotify] =
+           _ecore_x_event_handle_sync_alarm;
      }
+
 #ifdef ECORE_XRANDR
    if (_ecore_x_event_randr_id)
      {
-       _ecore_x_event_handlers[_ecore_x_event_randr_id + RRScreenChangeNotify] = _ecore_x_event_handle_randr_change;
-       _ecore_x_event_handlers[_ecore_x_event_randr_id + RRNotify] = _ecore_x_event_handle_randr_notify;
+        _ecore_x_event_handlers[_ecore_x_event_randr_id +
+                                RRScreenChangeNotify] =
+           _ecore_x_event_handle_randr_change;
+        _ecore_x_event_handlers[_ecore_x_event_randr_id +
+                                RRNotify] = _ecore_x_event_handle_randr_notify;
      }
+
 #endif
 #ifdef ECORE_XFIXES
    if (_ecore_x_event_fixes_selection_id)
-     _ecore_x_event_handlers[_ecore_x_event_fixes_selection_id] = _ecore_x_event_handle_fixes_selection_notify;
+      _ecore_x_event_handlers[_ecore_x_event_fixes_selection_id] =
+         _ecore_x_event_handle_fixes_selection_notify;
+
 #endif
 #ifdef ECORE_XDAMAGE
    if (_ecore_x_event_damage_id)
-     _ecore_x_event_handlers[_ecore_x_event_damage_id] = _ecore_x_event_handle_damage_notify;
+      _ecore_x_event_handlers[_ecore_x_event_damage_id] =
+         _ecore_x_event_handle_damage_notify;
+
 #endif
 #ifdef ECORE_XKB
    // set x autorepeat detection to on. that means instead of
@@ -391,105 +444,108 @@ ecore_x_init(const char *name)
      }
    while (0);
 #endif
-   
+
    if (!ECORE_X_EVENT_ANY)
      {
-       ECORE_X_EVENT_ANY                      = ecore_event_type_new();
-       ECORE_X_EVENT_MOUSE_IN                 = ecore_event_type_new();
-       ECORE_X_EVENT_MOUSE_OUT                = ecore_event_type_new();
-       ECORE_X_EVENT_WINDOW_FOCUS_IN          = ecore_event_type_new();
-       ECORE_X_EVENT_WINDOW_FOCUS_OUT         = ecore_event_type_new();
-       ECORE_X_EVENT_WINDOW_KEYMAP            = ecore_event_type_new();
-       ECORE_X_EVENT_WINDOW_DAMAGE            = ecore_event_type_new();
-       ECORE_X_EVENT_WINDOW_VISIBILITY_CHANGE = ecore_event_type_new();
-       ECORE_X_EVENT_WINDOW_CREATE            = ecore_event_type_new();
-       ECORE_X_EVENT_WINDOW_DESTROY           = ecore_event_type_new();
-       ECORE_X_EVENT_WINDOW_HIDE              = ecore_event_type_new();
-       ECORE_X_EVENT_WINDOW_SHOW              = ecore_event_type_new();
-       ECORE_X_EVENT_WINDOW_SHOW_REQUEST      = ecore_event_type_new();
-       ECORE_X_EVENT_WINDOW_REPARENT          = ecore_event_type_new();
-       ECORE_X_EVENT_WINDOW_CONFIGURE         = ecore_event_type_new();
-       ECORE_X_EVENT_WINDOW_CONFIGURE_REQUEST = ecore_event_type_new();
-       ECORE_X_EVENT_WINDOW_GRAVITY           = ecore_event_type_new();
-       ECORE_X_EVENT_WINDOW_RESIZE_REQUEST    = ecore_event_type_new();
-       ECORE_X_EVENT_WINDOW_STACK             = ecore_event_type_new();
-       ECORE_X_EVENT_WINDOW_STACK_REQUEST     = ecore_event_type_new();
-       ECORE_X_EVENT_WINDOW_PROPERTY          = ecore_event_type_new();
-       ECORE_X_EVENT_WINDOW_COLORMAP          = ecore_event_type_new();
-       ECORE_X_EVENT_WINDOW_MAPPING           = ecore_event_type_new();
-       ECORE_X_EVENT_SELECTION_CLEAR          = ecore_event_type_new();
-       ECORE_X_EVENT_SELECTION_REQUEST        = ecore_event_type_new();
-       ECORE_X_EVENT_SELECTION_NOTIFY         = ecore_event_type_new();
-       ECORE_X_EVENT_CLIENT_MESSAGE           = ecore_event_type_new();
-       ECORE_X_EVENT_WINDOW_SHAPE             = ecore_event_type_new();
-       ECORE_X_EVENT_SCREENSAVER_NOTIFY       = ecore_event_type_new();
-       ECORE_X_EVENT_SYNC_COUNTER             = ecore_event_type_new();
-       ECORE_X_EVENT_SYNC_ALARM               = ecore_event_type_new();
-       ECORE_X_EVENT_SCREEN_CHANGE            = ecore_event_type_new();
-       ECORE_X_EVENT_RANDR_CRTC_CHANGE        = ecore_event_type_new();
-       ECORE_X_EVENT_RANDR_OUTPUT_CHANGE      = ecore_event_type_new();
-       ECORE_X_EVENT_RANDR_OUTPUT_PROPERTY_NOTIFY = ecore_event_type_new();
-       ECORE_X_EVENT_DAMAGE_NOTIFY            = ecore_event_type_new();
-       
-       ECORE_X_EVENT_WINDOW_DELETE_REQUEST                = ecore_event_type_new();
-       /*
-       ECORE_X_EVENT_WINDOW_PROP_TITLE_CHANGE             = ecore_event_type_new();
-       ECORE_X_EVENT_WINDOW_PROP_VISIBLE_TITLE_CHANGE     = ecore_event_type_new();
-        ECORE_X_EVENT_WINDOW_PROP_NAME_CLASS_CHANGE        = ecore_event_type_new();
-       ECORE_X_EVENT_WINDOW_PROP_ICON_NAME_CHANGE         = ecore_event_type_new();
-       ECORE_X_EVENT_WINDOW_PROP_VISIBLE_ICON_NAME_CHANGE = ecore_event_type_new();
-       ECORE_X_EVENT_WINDOW_PROP_CLIENT_MACHINE_CHANGE    = ecore_event_type_new();
-       ECORE_X_EVENT_WINDOW_PROP_PID_CHANGE               = ecore_event_type_new();
-       ECORE_X_EVENT_WINDOW_PROP_DESKTOP_CHANGE           = ecore_event_type_new();
-       */
-
-       ECORE_X_EVENT_DESKTOP_CHANGE           = ecore_event_type_new();
-       ECORE_X_EVENT_WINDOW_MOVE_RESIZE_REQUEST = ecore_event_type_new();
-       ECORE_X_EVENT_WINDOW_STATE_REQUEST     = ecore_event_type_new();
-       ECORE_X_EVENT_FRAME_EXTENTS_REQUEST    = ecore_event_type_new();
-       ECORE_X_EVENT_PING                     = ecore_event_type_new();
-
-       ECORE_X_EVENT_STARTUP_SEQUENCE_NEW     = ecore_event_type_new();
-       ECORE_X_EVENT_STARTUP_SEQUENCE_CHANGE  = ecore_event_type_new();
-       ECORE_X_EVENT_STARTUP_SEQUENCE_REMOVE  = ecore_event_type_new();
-
-       ECORE_X_EVENT_GENERIC                  = ecore_event_type_new();
+        ECORE_X_EVENT_ANY = ecore_event_type_new();
+        ECORE_X_EVENT_MOUSE_IN = ecore_event_type_new();
+        ECORE_X_EVENT_MOUSE_OUT = ecore_event_type_new();
+        ECORE_X_EVENT_WINDOW_FOCUS_IN = ecore_event_type_new();
+        ECORE_X_EVENT_WINDOW_FOCUS_OUT = ecore_event_type_new();
+        ECORE_X_EVENT_WINDOW_KEYMAP = ecore_event_type_new();
+        ECORE_X_EVENT_WINDOW_DAMAGE = ecore_event_type_new();
+        ECORE_X_EVENT_WINDOW_VISIBILITY_CHANGE = ecore_event_type_new();
+        ECORE_X_EVENT_WINDOW_CREATE = ecore_event_type_new();
+        ECORE_X_EVENT_WINDOW_DESTROY = ecore_event_type_new();
+        ECORE_X_EVENT_WINDOW_HIDE = ecore_event_type_new();
+        ECORE_X_EVENT_WINDOW_SHOW = ecore_event_type_new();
+        ECORE_X_EVENT_WINDOW_SHOW_REQUEST = ecore_event_type_new();
+        ECORE_X_EVENT_WINDOW_REPARENT = ecore_event_type_new();
+        ECORE_X_EVENT_WINDOW_CONFIGURE = ecore_event_type_new();
+        ECORE_X_EVENT_WINDOW_CONFIGURE_REQUEST = ecore_event_type_new();
+        ECORE_X_EVENT_WINDOW_GRAVITY = ecore_event_type_new();
+        ECORE_X_EVENT_WINDOW_RESIZE_REQUEST = ecore_event_type_new();
+        ECORE_X_EVENT_WINDOW_STACK = ecore_event_type_new();
+        ECORE_X_EVENT_WINDOW_STACK_REQUEST = ecore_event_type_new();
+        ECORE_X_EVENT_WINDOW_PROPERTY = ecore_event_type_new();
+        ECORE_X_EVENT_WINDOW_COLORMAP = ecore_event_type_new();
+        ECORE_X_EVENT_WINDOW_MAPPING = ecore_event_type_new();
+        ECORE_X_EVENT_SELECTION_CLEAR = ecore_event_type_new();
+        ECORE_X_EVENT_SELECTION_REQUEST = ecore_event_type_new();
+        ECORE_X_EVENT_SELECTION_NOTIFY = ecore_event_type_new();
+        ECORE_X_EVENT_CLIENT_MESSAGE = ecore_event_type_new();
+        ECORE_X_EVENT_WINDOW_SHAPE = ecore_event_type_new();
+        ECORE_X_EVENT_SCREENSAVER_NOTIFY = ecore_event_type_new();
+        ECORE_X_EVENT_SYNC_COUNTER = ecore_event_type_new();
+        ECORE_X_EVENT_SYNC_ALARM = ecore_event_type_new();
+        ECORE_X_EVENT_SCREEN_CHANGE = ecore_event_type_new();
+        ECORE_X_EVENT_RANDR_CRTC_CHANGE = ecore_event_type_new();
+        ECORE_X_EVENT_RANDR_OUTPUT_CHANGE = ecore_event_type_new();
+        ECORE_X_EVENT_RANDR_OUTPUT_PROPERTY_NOTIFY = ecore_event_type_new();
+        ECORE_X_EVENT_DAMAGE_NOTIFY = ecore_event_type_new();
+
+        ECORE_X_EVENT_WINDOW_DELETE_REQUEST = ecore_event_type_new();
+        /*
+           ECORE_X_EVENT_WINDOW_PROP_TITLE_CHANGE             = ecore_event_type_new();
+           ECORE_X_EVENT_WINDOW_PROP_VISIBLE_TITLE_CHANGE     = ecore_event_type_new();
+           ECORE_X_EVENT_WINDOW_PROP_NAME_CLASS_CHANGE        = ecore_event_type_new();
+           ECORE_X_EVENT_WINDOW_PROP_ICON_NAME_CHANGE         = ecore_event_type_new();
+           ECORE_X_EVENT_WINDOW_PROP_VISIBLE_ICON_NAME_CHANGE = ecore_event_type_new();
+           ECORE_X_EVENT_WINDOW_PROP_CLIENT_MACHINE_CHANGE    = ecore_event_type_new();
+           ECORE_X_EVENT_WINDOW_PROP_PID_CHANGE               = ecore_event_type_new();
+           ECORE_X_EVENT_WINDOW_PROP_DESKTOP_CHANGE           = ecore_event_type_new();
+         */
+
+        ECORE_X_EVENT_DESKTOP_CHANGE = ecore_event_type_new();
+        ECORE_X_EVENT_WINDOW_MOVE_RESIZE_REQUEST = ecore_event_type_new();
+        ECORE_X_EVENT_WINDOW_STATE_REQUEST = ecore_event_type_new();
+        ECORE_X_EVENT_FRAME_EXTENTS_REQUEST = ecore_event_type_new();
+        ECORE_X_EVENT_PING = ecore_event_type_new();
+
+        ECORE_X_EVENT_STARTUP_SEQUENCE_NEW = ecore_event_type_new();
+        ECORE_X_EVENT_STARTUP_SEQUENCE_CHANGE = ecore_event_type_new();
+        ECORE_X_EVENT_STARTUP_SEQUENCE_REMOVE = ecore_event_type_new();
+
+        ECORE_X_EVENT_GENERIC = ecore_event_type_new();
      }
-   
+
    /* everything has these... unless its like a pda... :) */
    ECORE_X_MODIFIER_SHIFT = _ecore_x_key_mask_get(XK_Shift_L);
-   ECORE_X_MODIFIER_CTRL  = _ecore_x_key_mask_get(XK_Control_L);
-   
+   ECORE_X_MODIFIER_CTRL = _ecore_x_key_mask_get(XK_Control_L);
+
    /* apple's xdarwin has no alt!!!! */
-   ECORE_X_MODIFIER_ALT   = _ecore_x_key_mask_get(XK_Alt_L);
-   if (!ECORE_X_MODIFIER_ALT) 
-     ECORE_X_MODIFIER_ALT = _ecore_x_key_mask_get(XK_Meta_L);
-   if (!ECORE_X_MODIFIER_ALT) 
-     ECORE_X_MODIFIER_ALT = _ecore_x_key_mask_get(XK_Super_L);   
-   
+   ECORE_X_MODIFIER_ALT = _ecore_x_key_mask_get(XK_Alt_L);
+   if (!ECORE_X_MODIFIER_ALT)
+      ECORE_X_MODIFIER_ALT = _ecore_x_key_mask_get(XK_Meta_L);
+
+   if (!ECORE_X_MODIFIER_ALT)
+      ECORE_X_MODIFIER_ALT = _ecore_x_key_mask_get(XK_Super_L);
+
    /* the windows key... a valid modifier :) */
-   ECORE_X_MODIFIER_WIN   = _ecore_x_key_mask_get(XK_Super_L);
-   if (!ECORE_X_MODIFIER_WIN) 
-     ECORE_X_MODIFIER_WIN = _ecore_x_key_mask_get(XK_Mode_switch);
-   if (!ECORE_X_MODIFIER_WIN) 
-     ECORE_X_MODIFIER_WIN = _ecore_x_key_mask_get(XK_Meta_L);
-   
+   ECORE_X_MODIFIER_WIN = _ecore_x_key_mask_get(XK_Super_L);
+   if (!ECORE_X_MODIFIER_WIN)
+      ECORE_X_MODIFIER_WIN = _ecore_x_key_mask_get(XK_Mode_switch);
+
+   if (!ECORE_X_MODIFIER_WIN)
+      ECORE_X_MODIFIER_WIN = _ecore_x_key_mask_get(XK_Meta_L);
+
    if (ECORE_X_MODIFIER_WIN == ECORE_X_MODIFIER_ALT)
-     ECORE_X_MODIFIER_WIN = 0;
+      ECORE_X_MODIFIER_WIN = 0;
+
    if (ECORE_X_MODIFIER_ALT == ECORE_X_MODIFIER_CTRL)
-     ECORE_X_MODIFIER_ALT = 0;
-   
-   ECORE_X_LOCK_SCROLL    = _ecore_x_key_mask_get(XK_Scroll_Lock);
-   ECORE_X_LOCK_NUM       = _ecore_x_key_mask_get(XK_Num_Lock);
-   ECORE_X_LOCK_CAPS      = _ecore_x_key_mask_get(XK_Caps_Lock);
-   
-   _ecore_x_fd_handler_handle = 
-     ecore_main_fd_handler_add(ConnectionNumber(_ecore_x_disp),
-                              ECORE_FD_READ,
-                              _ecore_x_fd_handler, _ecore_x_disp,
-                              _ecore_x_fd_handler_buf, _ecore_x_disp);
+      ECORE_X_MODIFIER_ALT = 0;
+
+   ECORE_X_LOCK_SCROLL = _ecore_x_key_mask_get(XK_Scroll_Lock);
+   ECORE_X_LOCK_NUM = _ecore_x_key_mask_get(XK_Num_Lock);
+   ECORE_X_LOCK_CAPS = _ecore_x_key_mask_get(XK_Caps_Lock);
+
+   _ecore_x_fd_handler_handle =
+      ecore_main_fd_handler_add(ConnectionNumber(_ecore_x_disp),
+                                ECORE_FD_READ,
+                                _ecore_x_fd_handler, _ecore_x_disp,
+                                _ecore_x_fd_handler_buf, _ecore_x_disp);
    if (!_ecore_x_fd_handler_handle)
-     goto free_event_handlers;
+      goto free_event_handlers;
 
    _ecore_x_atoms_init();
 
@@ -501,13 +557,17 @@ ecore_x_init(const char *name)
 
    /* old e hints init */
    ecore_x_e_init();
-   
+
    /* This is just to be anal about naming conventions */
 
-   _ecore_x_atoms_wm_protocols[ECORE_X_WM_PROTOCOL_DELETE_REQUEST] = ECORE_X_ATOM_WM_DELETE_WINDOW;
-   _ecore_x_atoms_wm_protocols[ECORE_X_WM_PROTOCOL_TAKE_FOCUS] = ECORE_X_ATOM_WM_TAKE_FOCUS;
-   _ecore_x_atoms_wm_protocols[ECORE_X_NET_WM_PROTOCOL_PING] = ECORE_X_ATOM_NET_WM_PING;
-   _ecore_x_atoms_wm_protocols[ECORE_X_NET_WM_PROTOCOL_SYNC_REQUEST] = ECORE_X_ATOM_NET_WM_SYNC_REQUEST;
+   _ecore_x_atoms_wm_protocols[ECORE_X_WM_PROTOCOL_DELETE_REQUEST] =
+      ECORE_X_ATOM_WM_DELETE_WINDOW;
+   _ecore_x_atoms_wm_protocols[ECORE_X_WM_PROTOCOL_TAKE_FOCUS] =
+      ECORE_X_ATOM_WM_TAKE_FOCUS;
+   _ecore_x_atoms_wm_protocols[ECORE_X_NET_WM_PROTOCOL_PING] =
+      ECORE_X_ATOM_NET_WM_PING;
+   _ecore_x_atoms_wm_protocols[ECORE_X_NET_WM_PROTOCOL_SYNC_REQUEST] =
+      ECORE_X_ATOM_NET_WM_SYNC_REQUEST;
 
    _ecore_x_selection_data_init();
    _ecore_x_dnd_init();
@@ -517,46 +577,57 @@ ecore_x_init(const char *name)
    _ecore_x_dpms_init();
    _ecore_x_randr_init();
    _ecore_x_input_init();
-   
+
    _ecore_x_private_win = ecore_x_window_override_new(0, -77, -777, 123, 456);
 
 #ifdef ENABLE_XIM
    /* Setup XIM */
    if (!_ecore_x_ic && XSupportsLocale())
      {
-       XIM im;
-       XIC ic;
-       XIMStyles *supported_styles;
-       XIMStyle chosen_style = 0;
-       Ecore_X_Window client_window = ecore_x_window_root_get(_ecore_x_private_win);
-       char *ret;
-       int i;
-
-       XSetLocaleModifiers("@im=none");
-       if ((im = XOpenIM(_ecore_x_disp, NULL, NULL, NULL)) == NULL)
-         goto _im_create_end;
-       ret = XGetIMValues(im, XNQueryInputStyle, &supported_styles, NULL);
-       if (ret || !supported_styles)
-         goto _im_create_error;
-       for (i = 0; i < supported_styles->count_styles; i++)
+        XIM im;
+        XIC ic;
+        XIMStyles *supported_styles;
+        XIMStyle chosen_style = 0;
+        Ecore_X_Window client_window = ecore_x_window_root_get(
+              _ecore_x_private_win);
+        char *ret;
+        int i;
+
+        XSetLocaleModifiers("@im=none");
+        if ((im = XOpenIM(_ecore_x_disp, NULL, NULL, NULL)) == NULL)
+           goto _im_create_end;
+
+        ret = XGetIMValues(im, XNQueryInputStyle, &supported_styles, NULL);
+        if (ret || !supported_styles)
+           goto _im_create_error;
+
+        for (i = 0; i < supported_styles->count_styles; i++)
           {
-             if (supported_styles->supported_styles[i] == 
+             if (supported_styles->supported_styles[i] ==
                  (XIMPreeditNothing | XIMStatusNothing))
-               chosen_style = supported_styles->supported_styles[i];
+                chosen_style = supported_styles->supported_styles[i];
           }
-       XFree(supported_styles);
-       if (!chosen_style)
-         goto _im_create_error;
-       ic = XCreateIC(im, XNInputStyle, chosen_style, XNClientWindow, client_window, NULL);
-       if (ic)
-         {
-            _ecore_x_ic = ic;
+        XFree(supported_styles);
+        if (!chosen_style)
+           goto _im_create_error;
+
+        ic = XCreateIC(im,
+                       XNInputStyle,
+                       chosen_style,
+                       XNClientWindow,
+                       client_window,
+                       NULL);
+        if (ic)
+          {
+             _ecore_x_ic = ic;
              _ecore_x_im = im;
-            goto _im_create_end;
-         }
+             goto _im_create_end;
+          }
+
 _im_create_error:
-       XCloseIM(im);
+        XCloseIM(im);
      }
+
 _im_create_end:
 #endif
    return _ecore_x_init_count;
@@ -577,27 +648,32 @@ static int
 _ecore_x_shutdown(int close_display)
 {
    if (--_ecore_x_init_count != 0)
-     return _ecore_x_init_count;
+      return _ecore_x_init_count;
+
+   if (!_ecore_x_disp)
+      return _ecore_x_init_count;
 
-   if (!_ecore_x_disp) return _ecore_x_init_count;
    LOGFN(__FILE__, __LINE__, __FUNCTION__);
 
 #ifdef ENABLE_XIM
    if (_ecore_x_ic)
      {
-       XDestroyIC(_ecore_x_ic);
-       _ecore_x_ic = NULL;
+        XDestroyIC(_ecore_x_ic);
+        _ecore_x_ic = NULL;
      }
+
    if (_ecore_x_im)
      {
-       XCloseIM(_ecore_x_im);
+        XCloseIM(_ecore_x_im);
         _ecore_x_im = NULL;
      }
+
 #endif
    if (close_display)
       XCloseDisplay(_ecore_x_disp);
    else
       close(ConnectionNumber(_ecore_x_disp));
+
    free(_ecore_x_event_handlers);
    ecore_main_fd_handler_del(_ecore_x_fd_handler_handle);
    _ecore_x_fd_handler_handle = NULL;
@@ -676,16 +752,16 @@ ecore_x_fd_get(void)
  * @return  The current default screen.
  * @ingroup Ecore_Xcb_Display_Attr_Group
  */
-EAPI Ecore_X_Screen*
+EAPI Ecore_X_Screen *
 ecore_x_default_screen_get(void)
 {
    LOGFN(__FILE__, __LINE__, __FUNCTION__);
-   return (Ecore_X_Screen*) DefaultScreenOfDisplay(_ecore_x_disp);
+   return (Ecore_X_Screen *)DefaultScreenOfDisplay(_ecore_x_disp);
 }
 
 /**
  * Sets the timeout for a double and triple clicks to be flagged.
- * 
+ *
  * This sets the time between clicks before the double_click flag is
  * set in a button down event. If 3 clicks occur within double this
  * time, the triple_click flag is also set.
@@ -696,7 +772,9 @@ ecore_x_default_screen_get(void)
 EAPI void
 ecore_x_double_click_time_set(double t)
 {
-   if (t < 0.0) t = 0.0;
+   if (t < 0.0)
+      t = 0.0;
+
    _ecore_x_double_click_time = t;
 }
 
@@ -761,20 +839,20 @@ ecore_x_killall(Ecore_X_Window root)
    Window parent_r;
    Window *children_r = NULL;
    unsigned int num_children = 0;
-   
+
    LOGFN(__FILE__, __LINE__, __FUNCTION__);
    XGrabServer(_ecore_x_disp);
    /* Tranverse window tree starting from root, and drag each
     * before the firing squad */
    while (XQueryTree(_ecore_x_disp, root, &root_r, &parent_r,
-                    &children_r, &num_children) && (num_children > 0))
+                     &children_r, &num_children) && (num_children > 0))
      {
-       for (j = 0; j < num_children; ++j)
-         {
-            XKillClient(_ecore_x_disp, children_r[j]);
-         }
-       
-       XFree(children_r);
+        for (j = 0; j < num_children; ++j)
+          {
+             XKillClient(_ecore_x_disp, children_r[j]);
+          }
+
+        XFree(children_r);
      }
    XUngrabServer(_ecore_x_disp);
    XSync(_ecore_x_disp, False);
@@ -816,10 +894,12 @@ EAPI int
 ecore_x_dpi_get(void)
 {
    Screen *s;
-   
+
    LOGFN(__FILE__, __LINE__, __FUNCTION__);
    s = DefaultScreenOfDisplay(_ecore_x_disp);
-   if (s->mwidth <= 0) return 75;
+   if (s->mwidth <= 0)
+      return 75;
+
    return (((s->width * 254) / s->mwidth) + 5) / 10;
 }
 
@@ -842,7 +922,7 @@ ecore_x_bell(int percent)
 
    ret = XBell(_ecore_x_disp, percent);
    if (ret == BadValue)
-     return EINA_FALSE;
+      return EINA_FALSE;
 
    return EINA_TRUE;
 }
@@ -851,27 +931,29 @@ static Eina_Bool
 _ecore_x_fd_handler(void *data, Ecore_Fd_Handler *fd_handler __UNUSED__)
 {
    Display *d;
-   
+
    d = data;
    while (XPending(d))
      {
-       XEvent ev;
-       
-       XNextEvent(d, &ev);
+        XEvent ev;
+
+        XNextEvent(d, &ev);
 
 #ifdef ENABLE_XIM
-       /* Filter event for XIM */
-       if (XFilterEvent(&ev, ev.xkey.window)) continue;
+        /* Filter event for XIM */
+        if (XFilterEvent(&ev, ev.xkey.window))
+           continue;
+
 #endif
 
-       if ((ev.type >= 0) && (ev.type < _ecore_x_event_handlers_num))
-         {
-            if (_ecore_x_event_handlers[AnyXEvent])
-              _ecore_x_event_handlers[AnyXEvent] (&ev);
+        if ((ev.type >= 0) && (ev.type < _ecore_x_event_handlers_num))
+          {
+             if (_ecore_x_event_handlers[AnyXEvent])
+                _ecore_x_event_handlers[AnyXEvent] (&ev);
 
-            if (_ecore_x_event_handlers[ev.type])
-              _ecore_x_event_handlers[ev.type] (&ev);
-         }
+             if (_ecore_x_event_handlers[ev.type])
+                _ecore_x_event_handlers[ev.type] (&ev);
+          }
      }
    return ECORE_CALLBACK_RENEW;
 }
@@ -882,49 +964,56 @@ _ecore_x_fd_handler_buf(void *data, Ecore_Fd_Handler *fd_handler __UNUSED__)
    Display *d;
 
    d = data;
-   if (XPending(d)) return ECORE_CALLBACK_RENEW;
+   if (XPending(d))
+      return ECORE_CALLBACK_RENEW;
+
    return ECORE_CALLBACK_CANCEL;
 }
 
 static int
 _ecore_x_key_mask_get(KeySym sym)
 {
-   XModifierKeymap    *mod;
-   KeySym              sym2;
-   int                 i, j;
-   const int           masks[8] = 
-     {
-       ShiftMask, LockMask, ControlMask, 
-         Mod1Mask, Mod2Mask, Mod3Mask, Mod4Mask, Mod5Mask
-     };
-   
+   XModifierKeymap *mod;
+   KeySym sym2;
+   int i, j;
+   const int masks[8] =
+   {
+      ShiftMask, LockMask, ControlMask,
+      Mod1Mask, Mod2Mask, Mod3Mask, Mod4Mask, Mod5Mask
+   };
+
    mod = XGetModifierMapping(_ecore_x_disp);
    if ((mod) && (mod->max_keypermod > 0))
-     {
-       for (i = 0; i < (8 * mod->max_keypermod); i++)
-         {
-            for (j = 0; j < 8; j++)
-              {
-                 sym2 = XKeycodeToKeysym(_ecore_x_disp, mod->modifiermap[i], j);
-                 if (sym2 != 0) break;
-              }
-            if (sym2 == sym)
-              {
-                 int mask;
-                 
-                 mask = masks[i / mod->max_keypermod];
-                 if (mod->modifiermap) XFree(mod->modifiermap);
-                 XFree(mod);
-                 return mask;
-              }
-         }
-     }
+      for (i = 0; i < (8 * mod->max_keypermod); i++)
+        {
+           for (j = 0; j < 8; j++)
+             {
+                sym2 = XKeycodeToKeysym(_ecore_x_disp, mod->modifiermap[i], j);
+                if (sym2 != 0)
+                   break;
+             }
+           if (sym2 == sym)
+             {
+                int mask;
+
+                mask = masks[i / mod->max_keypermod];
+                if (mod->modifiermap)
+                   XFree(mod->modifiermap);
+
+                   XFree(mod);
+                return mask;
+             }
+        }
+
    if (mod)
      {
-       if (mod->modifiermap) XFree(mod->modifiermap);
-       XFree(mod);
+        if (mod->modifiermap)
+                   XFree(mod->modifiermap);
+
+                   XFree(mod);
      }
-  return 0;
+
+   return 0;
 }
 
 
@@ -970,8 +1059,10 @@ ecore_x_window_root_list(int *num_ret)
 #ifdef ECORE_XPRINT
    int xp_base, xp_err_base;
 #endif
-   
-   if (!num_ret) return NULL;
+
+   if (!num_ret)
+      return NULL;
+
    *num_ret = 0;
 
    LOGFN(__FILE__, __LINE__, __FUNCTION__);
@@ -979,77 +1070,85 @@ ecore_x_window_root_list(int *num_ret)
    num = ScreenCount(_ecore_x_disp);
    if (XpQueryExtension(_ecore_x_disp, &xp_base, &xp_err_base))
      {
-       Screen **ps = NULL;
-       int psnum = 0;
-       
-       ps = XpQueryScreens(_ecore_x_disp, &psnum);
-       if (ps)
-         {
-            int overlap, j;
-            
-            overlap = 0;
-            for (i = 0; i < num; i++)
-              {
-                 for (j = 0; j < psnum; j++)
-                   {
-                      if (ScreenOfDisplay(_ecore_x_disp, i) == ps[j])
-                        overlap++;
-                   }
-              }
-            roots = malloc((num - overlap) * sizeof(Window));
-            if (roots)
-              {
-                 int k;
-                 
-                 k = 0;
-                 for (i = 0; i < num; i++)
-                   {
-                      int is_print;
-                      
-                      is_print = 0;
-                      for (j = 0; j < psnum; j++)
-                        {
-                           if (ScreenOfDisplay(_ecore_x_disp, i) == ps[j])
-                             {
-                                is_print = 1;
-                                break;
-                             }
-                        }
-                      if (!is_print)
-                        {
-                           roots[k] = RootWindow(_ecore_x_disp, i);
-                           k++;
-                        }
-                   }
-                 *num_ret = k;
-              }
-            XFree(ps);
-         }
-       else
-         {
-            roots = malloc(num * sizeof(Window));
-            if (!roots) return NULL;
-            *num_ret = num;
-            for (i = 0; i < num; i++)
-              roots[i] = RootWindow(_ecore_x_disp, i);
-         }
+        Screen **ps = NULL;
+        int psnum = 0;
+
+        ps = XpQueryScreens(_ecore_x_disp, &psnum);
+        if (ps)
+          {
+             int overlap, j;
+
+             overlap = 0;
+             for (i = 0; i < num; i++)
+               {
+                  for (j = 0; j < psnum; j++)
+                    {
+                       if (ScreenOfDisplay(_ecore_x_disp, i) == ps[j])
+                          overlap++;
+                    }
+               }
+             roots = malloc((num - overlap) * sizeof(Window));
+             if (roots)
+               {
+                  int k;
+
+                  k = 0;
+                  for (i = 0; i < num; i++)
+                    {
+                       int is_print;
+
+                       is_print = 0;
+                       for (j = 0; j < psnum; j++)
+                         {
+                            if (ScreenOfDisplay(_ecore_x_disp, i) == ps[j])
+                              {
+                                 is_print = 1;
+                                 break;
+                              }
+                         }
+                       if (!is_print)
+                         {
+                            roots[k] = RootWindow(_ecore_x_disp, i);
+                            k++;
+                         }
+                    }
+                  *num_ret = k;
+               }
+
+             XFree(ps);
+          }
+        else
+          {
+             roots = malloc(num * sizeof(Window));
+             if (!roots)
+                return NULL;
+
+             *num_ret = num;
+             for (i = 0; i < num; i++)
+                roots[i] = RootWindow(_ecore_x_disp, i);
+          }
      }
    else
      {
-       roots = malloc(num * sizeof(Window));
-       if (!roots) return NULL;
-       *num_ret = num;
-       for (i = 0; i < num; i++)
-         roots[i] = RootWindow(_ecore_x_disp, i);
+        roots = malloc(num * sizeof(Window));
+        if (!roots)
+           return NULL;
+
+        *num_ret = num;
+        for (i = 0; i < num; i++)
+           roots[i] = RootWindow(_ecore_x_disp, i);
      }
-#else   
+
+#else
    num = ScreenCount(_ecore_x_disp);
    roots = malloc(num * sizeof(Window));
-   if (!roots) return NULL;
+   if (!roots)
+      return NULL;
+
    *num_ret = num;
    for (i = 0; i < num; i++)
-     roots[i] = RootWindow(_ecore_x_disp, i);
-#endif   
+      roots[i] = RootWindow(_ecore_x_disp, i);
+#endif
    return roots;
 }
 
@@ -1057,19 +1156,19 @@ EAPI Ecore_X_Window
 ecore_x_window_root_first_get(void)
 {
    return RootWindow(_ecore_x_disp, 0);
-/*   
+/*
    int num;
    Ecore_X_Window root, *roots = NULL;
 
    LOGFN(__FILE__, __LINE__, __FUNCTION__);
    roots = ecore_x_window_root_list(&num);
    if (!(roots)) return 0;
-   
+
    if (num > 0)
      root = roots[0];
    else
      root = 0;
-   
+
    free(roots);
    return root;
  */
@@ -1084,37 +1183,40 @@ _ecore_x_window_manage_error(void *data __UNUSED__)
 {
    if ((ecore_x_error_request_get() == X_ChangeWindowAttributes) &&
        (ecore_x_error_code_get() == BadAccess))
-     _ecore_x_window_manage_failed = 1;
+      _ecore_x_window_manage_failed = 1;
 }
 
 EAPI int
 ecore_x_window_manage(Ecore_X_Window win)
 {
-   XWindowAttributes   att;
-   
+   XWindowAttributes att;
+
    LOGFN(__FILE__, __LINE__, __FUNCTION__);
-   if (XGetWindowAttributes(_ecore_x_disp, win, &att) != True) return 0;
+   if (XGetWindowAttributes(_ecore_x_disp, win, &att) != True)
+      return 0;
+
    ecore_x_sync();
    _ecore_x_window_manage_failed = 0;
    ecore_x_error_handler_set(_ecore_x_window_manage_error, NULL);
-   XSelectInput(_ecore_x_disp, win, 
-               EnterWindowMask | 
-               LeaveWindowMask | 
-               PropertyChangeMask | 
-               ResizeRedirectMask |
-               SubstructureRedirectMask | 
-               SubstructureNotifyMask |
-               StructureNotifyMask |
-               KeyPressMask | 
-               KeyReleaseMask |
-               att.your_event_mask);
+   XSelectInput(_ecore_x_disp, win,
+                EnterWindowMask |
+                LeaveWindowMask |
+                PropertyChangeMask |
+                ResizeRedirectMask |
+                SubstructureRedirectMask |
+                SubstructureNotifyMask |
+                StructureNotifyMask |
+                KeyPressMask |
+                KeyReleaseMask |
+                att.your_event_mask);
    ecore_x_sync();
    ecore_x_error_handler_set(NULL, NULL);
    if (_ecore_x_window_manage_failed)
      {
-       _ecore_x_window_manage_failed = 0;
-       return 0;
+        _ecore_x_window_manage_failed = 0;
+        return 0;
      }
+
    return 1;
 }
 
@@ -1122,24 +1224,24 @@ EAPI void
 ecore_x_window_container_manage(Ecore_X_Window win)
 {
    LOGFN(__FILE__, __LINE__, __FUNCTION__);
-   XSelectInput(_ecore_x_disp, win, 
-               SubstructureRedirectMask | 
-               SubstructureNotifyMask);
+   XSelectInput(_ecore_x_disp, win,
+                SubstructureRedirectMask |
+                SubstructureNotifyMask);
 }
 
 EAPI void
 ecore_x_window_client_manage(Ecore_X_Window win)
 {
    LOGFN(__FILE__, __LINE__, __FUNCTION__);
-   XSelectInput(_ecore_x_disp, win, 
-               PropertyChangeMask | 
+   XSelectInput(_ecore_x_disp, win,
+                PropertyChangeMask |
 //             ResizeRedirectMask |
-               FocusChangeMask |
-               ColormapChangeMask |
-               VisibilityChangeMask |
-               StructureNotifyMask |
+                FocusChangeMask |
+                ColormapChangeMask |
+                VisibilityChangeMask |
+                StructureNotifyMask |
                 SubstructureNotifyMask
-               );
+                );
    XShapeSelectInput(_ecore_x_disp, win, ShapeNotifyMask);
 }
 
@@ -1148,8 +1250,8 @@ ecore_x_window_sniff(Ecore_X_Window win)
 {
    LOGFN(__FILE__, __LINE__, __FUNCTION__);
    XSelectInput(_ecore_x_disp, win,
-               PropertyChangeMask |
-               SubstructureNotifyMask);
+                PropertyChangeMask |
+                SubstructureNotifyMask);
 }
 
 EAPI void
@@ -1157,11 +1259,11 @@ ecore_x_window_client_sniff(Ecore_X_Window win)
 {
    LOGFN(__FILE__, __LINE__, __FUNCTION__);
    XSelectInput(_ecore_x_disp, win,
-               PropertyChangeMask |
-               FocusChangeMask |
-               ColormapChangeMask |
-               VisibilityChangeMask |
-               StructureNotifyMask |
+                PropertyChangeMask |
+                FocusChangeMask |
+                ColormapChangeMask |
+                VisibilityChangeMask |
+                StructureNotifyMask |
                 SubstructureNotifyMask);
    XShapeSelectInput(_ecore_x_disp, win, ShapeNotifyMask);
 }
@@ -1172,12 +1274,15 @@ ecore_x_window_client_sniff(Ecore_X_Window win)
 
 
 EAPI int
-ecore_x_window_attributes_get(Ecore_X_Window win, Ecore_X_Window_Attributes *att_ret)
+ecore_x_window_attributes_get(Ecore_X_Window win,
+                              Ecore_X_Window_Attributes *att_ret)
 {
    XWindowAttributes att;
-   
+
    LOGFN(__FILE__, __LINE__, __FUNCTION__);
-   if (!XGetWindowAttributes(_ecore_x_disp, win, &att)) return 0;
+   if (!XGetWindowAttributes(_ecore_x_disp, win, &att))
+      return 0;
+
    memset(att_ret, 0, sizeof(Ecore_X_Window_Attributes));
    att_ret->root = att.root;
    att_ret->x = att.x;
@@ -1186,11 +1291,21 @@ ecore_x_window_attributes_get(Ecore_X_Window win, Ecore_X_Window_Attributes *att
    att_ret->h = att.height;
    att_ret->border = att.border_width;
    att_ret->depth = att.depth;
-   if (att.map_state != IsUnmapped) att_ret->visible = 1;
-   if (att.map_state == IsViewable) att_ret->viewable = 1;
-   if (att.override_redirect) att_ret->override = 1;
-   if (att.class == InputOnly) att_ret->input_only = 1;
-   if (att.save_under) att_ret->save_under = 1;
+   if (att.map_state != IsUnmapped)
+      att_ret->visible = 1;
+
+   if (att.map_state == IsViewable)
+      att_ret->viewable = 1;
+
+   if (att.override_redirect)
+      att_ret->override = 1;
+
+   if (att.class == InputOnly)
+      att_ret->input_only = 1;
+
+   if (att.save_under)
+      att_ret->save_under = 1;
+
    att_ret->event_mask.mine = att.your_event_mask;
    att_ret->event_mask.all = att.all_event_masks;
    att_ret->event_mask.no_propagate = att.do_not_propagate_mask;
@@ -1218,29 +1333,30 @@ ecore_x_window_save_set_del(Ecore_X_Window win)
 EAPI Ecore_X_Window *
 ecore_x_window_children_get(Ecore_X_Window win, int *num)
 {
-   Ecore_X_Window     *windows = NULL;
-   Window              root_ret = 0, parent_ret = 0, *children_ret = NULL;
-   unsigned int        children_ret_num = 0;
-   
+   Ecore_X_Window *windows = NULL;
+   Window root_ret = 0, parent_ret = 0, *children_ret = NULL;
+   unsigned int children_ret_num = 0;
+
    LOGFN(__FILE__, __LINE__, __FUNCTION__);
    if (!XQueryTree(_ecore_x_disp, win, &root_ret, &parent_ret, &children_ret,
-                  &children_ret_num))
-     {
-       return NULL;
-     }
+                   &children_ret_num))
+      return NULL;
+
    if (children_ret)
      {
-       windows = malloc(children_ret_num * sizeof(Ecore_X_Window));
-       if (windows)
-         {
-            unsigned int i;
-            
-            for (i = 0; i < children_ret_num; i++)
-              windows[i] = children_ret[i];
-            *num = children_ret_num;
-         }
-       XFree(children_ret);
+        windows = malloc(children_ret_num * sizeof(Ecore_X_Window));
+        if (windows)
+          {
+             unsigned int i;
+
+             for (i = 0; i < children_ret_num; i++)
+                windows[i] = children_ret[i];
+             *num = children_ret_num;
+          }
+
+        XFree(children_ret);
      }
+
    return windows;
 }
 
@@ -1248,16 +1364,16 @@ EAPI int
 ecore_x_pointer_control_set(int accel_num, int accel_denom, int threshold)
 {
    LOGFN(__FILE__, __LINE__, __FUNCTION__);
-   return XChangePointerControl(_ecore_x_disp, 1, 1, 
-                               accel_num, accel_denom, threshold);
+   return XChangePointerControl(_ecore_x_disp, 1, 1,
+                                accel_num, accel_denom, threshold);
 }
 
 EAPI int
 ecore_x_pointer_control_get(int *accel_num, int *accel_denom, int *threshold)
 {
    LOGFN(__FILE__, __LINE__, __FUNCTION__);
-   return XGetPointerControl(_ecore_x_disp, 
-                               accel_num, accel_denom, threshold);
+   return XGetPointerControl(_ecore_x_disp,
+                             accel_num, accel_denom, threshold);
 }
 
 EAPI int
@@ -1279,10 +1395,12 @@ ecore_x_pointer_grab(Ecore_X_Window win)
 {
    LOGFN(__FILE__, __LINE__, __FUNCTION__);
    if (XGrabPointer(_ecore_x_disp, win, False,
-                   ButtonPressMask | ButtonReleaseMask | 
-                   EnterWindowMask | LeaveWindowMask | PointerMotionMask,
-                   GrabModeAsync, GrabModeAsync,
-                   None, None, CurrentTime) == GrabSuccess) return 1;
+                    ButtonPressMask | ButtonReleaseMask |
+                    EnterWindowMask | LeaveWindowMask | PointerMotionMask,
+                    GrabModeAsync, GrabModeAsync,
+                    None, None, CurrentTime) == GrabSuccess)
+      return 1;
+
    return 0;
 }
 
@@ -1291,10 +1409,12 @@ ecore_x_pointer_confine_grab(Ecore_X_Window win)
 {
    LOGFN(__FILE__, __LINE__, __FUNCTION__);
    if (XGrabPointer(_ecore_x_disp, win, False,
-                   ButtonPressMask | ButtonReleaseMask | 
-                   EnterWindowMask | LeaveWindowMask | PointerMotionMask,
-                   GrabModeAsync, GrabModeAsync,
-                   win, None, CurrentTime) == GrabSuccess) return 1;
+                    ButtonPressMask | ButtonReleaseMask |
+                    EnterWindowMask | LeaveWindowMask | PointerMotionMask,
+                    GrabModeAsync, GrabModeAsync,
+                    win, None, CurrentTime) == GrabSuccess)
+      return 1;
+
    return 0;
 }
 
@@ -1317,8 +1437,10 @@ ecore_x_keyboard_grab(Ecore_X_Window win)
 {
    LOGFN(__FILE__, __LINE__, __FUNCTION__);
    if (XGrabKeyboard(_ecore_x_disp, win, False,
-                    GrabModeAsync, GrabModeAsync,
-                    CurrentTime) == GrabSuccess) return 1;
+                     GrabModeAsync, GrabModeAsync,
+                     CurrentTime) == GrabSuccess)
+      return 1;
+
    return 0;
 }
 
@@ -1326,7 +1448,7 @@ EAPI void
 ecore_x_keyboard_ungrab(void)
 {
    LOGFN(__FILE__, __LINE__, __FUNCTION__);
-   XUngrabKeyboard(_ecore_x_disp, CurrentTime);   
+   XUngrabKeyboard(_ecore_x_disp, CurrentTime);
 }
 
 EAPI void
@@ -1334,7 +1456,8 @@ ecore_x_grab(void)
 {
    LOGFN(__FILE__, __LINE__, __FUNCTION__);
    _ecore_x_grab_count++;
-   if (_ecore_x_grab_count == 1) XGrabServer(_ecore_x_disp);
+   if (_ecore_x_grab_count == 1)
+      XGrabServer(_ecore_x_disp);
 }
 
 EAPI void
@@ -1342,17 +1465,23 @@ ecore_x_ungrab(void)
 {
    LOGFN(__FILE__, __LINE__, __FUNCTION__);
    _ecore_x_grab_count--;
-   if (_ecore_x_grab_count < 0) _ecore_x_grab_count = 0;
-   if (_ecore_x_grab_count == 0) XUngrabServer(_ecore_x_disp);
+   if (_ecore_x_grab_count < 0)
+      _ecore_x_grab_count = 0;
+
+   if (_ecore_x_grab_count == 0)
+      XUngrabServer(_ecore_x_disp);
 }
 
-int      _ecore_window_grabs_num = 0;
-Window  *_ecore_window_grabs = NULL;
-Eina_Bool (*_ecore_window_grab_replay_func) (void *data, int event_type, void *event);
-void    *_ecore_window_grab_replay_data;
+int _ecore_window_grabs_num = 0;
+Window *_ecore_window_grabs = NULL;
+Eina_Bool (*_ecore_window_grab_replay_func)(void *data, int event_type,
+                                            void *event);
+void *_ecore_window_grab_replay_data;
 
 EAPI void
-ecore_x_passive_grab_replay_func_set(Eina_Bool (*func) (void *data, int event_type, void *event), void *data)
+ecore_x_passive_grab_replay_func_set(Eina_Bool (*func)(void *data,
+                                                       int event_type,
+                                                       void *event), void *data)
 {
    LOGFN(__FILE__, __LINE__, __FUNCTION__);
    _ecore_window_grab_replay_func = func;
@@ -1360,35 +1489,39 @@ ecore_x_passive_grab_replay_func_set(Eina_Bool (*func) (void *data, int event_ty
 }
 
 EAPI void
-ecore_x_window_button_grab(Ecore_X_Window win, int button, 
-                          Ecore_X_Event_Mask event_mask,
-                          int mod, int any_mod)
+ecore_x_window_button_grab(Ecore_X_Window win, int button,
+                           Ecore_X_Event_Mask event_mask,
+                           int mod, int any_mod)
 {
-   unsigned int        b;
-   unsigned int        m;
-   unsigned int        locks[8];
-   int                 i, ev;
-   
+   unsigned int b;
+   unsigned int m;
+   unsigned int locks[8];
+   int i, ev;
+
    LOGFN(__FILE__, __LINE__, __FUNCTION__);
    b = button;
-   if (b == 0) b = AnyButton;
+   if (b == 0)
+      b = AnyButton;
+
    m = _ecore_x_event_modifier(mod);
-   if (any_mod) m = AnyModifier;
+   if (any_mod)
+      m = AnyModifier;
+
    locks[0] = 0;
    locks[1] = ECORE_X_LOCK_CAPS;
    locks[2] = ECORE_X_LOCK_NUM;
    locks[3] = ECORE_X_LOCK_SCROLL;
-   locks[4] = ECORE_X_LOCK_CAPS   | ECORE_X_LOCK_NUM;
-   locks[5] = ECORE_X_LOCK_CAPS   | ECORE_X_LOCK_SCROLL;
-   locks[6] = ECORE_X_LOCK_NUM    | ECORE_X_LOCK_SCROLL;
-   locks[7] = ECORE_X_LOCK_CAPS   | ECORE_X_LOCK_NUM    | ECORE_X_LOCK_SCROLL;
+   locks[4] = ECORE_X_LOCK_CAPS | ECORE_X_LOCK_NUM;
+   locks[5] = ECORE_X_LOCK_CAPS | ECORE_X_LOCK_SCROLL;
+   locks[6] = ECORE_X_LOCK_NUM | ECORE_X_LOCK_SCROLL;
+   locks[7] = ECORE_X_LOCK_CAPS | ECORE_X_LOCK_NUM | ECORE_X_LOCK_SCROLL;
    ev = event_mask;
    for (i = 0; i < 8; i++)
-     XGrabButton(_ecore_x_disp, b, m | locks[i],
-                win, False, ev, GrabModeSync, GrabModeAsync, None, None);
+      XGrabButton(_ecore_x_disp, b, m | locks[i],
+                  win, False, ev, GrabModeSync, GrabModeAsync, None, None);
    _ecore_window_grabs_num++;
-   _ecore_window_grabs = realloc(_ecore_window_grabs, 
-                                _ecore_window_grabs_num * sizeof(Window));
+   _ecore_window_grabs = realloc(_ecore_window_grabs,
+                                 _ecore_window_grabs_num * sizeof(Window));
    _ecore_window_grabs[_ecore_window_grabs_num - 1] = win;
 }
 
@@ -1396,7 +1529,7 @@ void
 _ecore_x_sync_magic_send(int val, Ecore_X_Window swin)
 {
    XEvent xev;
-   
+
    xev.xclient.type = ClientMessage;
    xev.xclient.serial = 0;
    xev.xclient.send_event = True;
@@ -1414,91 +1547,104 @@ void
 _ecore_x_window_grab_remove(Ecore_X_Window win)
 {
    int i, shuffle = 0;
-   
+
    if (_ecore_window_grabs_num > 0)
      {
-       for (i = 0; i < _ecore_window_grabs_num; i++)
-         {
-            if (shuffle) _ecore_window_grabs[i - 1] = _ecore_window_grabs[i];
-            if ((!shuffle) && (_ecore_window_grabs[i] == win))
-              shuffle = 1;
-         }
-       if (shuffle)
-         {
-            _ecore_window_grabs_num--;
-            _ecore_window_grabs = realloc(_ecore_window_grabs, 
-                                          _ecore_window_grabs_num * sizeof(Window));
-         }
+        for (i = 0; i < _ecore_window_grabs_num; i++)
+          {
+             if (shuffle)
+                _ecore_window_grabs[i - 1] = _ecore_window_grabs[i];
+
+             if ((!shuffle) && (_ecore_window_grabs[i] == win))
+                shuffle = 1;
+          }
+        if (shuffle)
+          {
+             _ecore_window_grabs_num--;
+             _ecore_window_grabs = realloc(_ecore_window_grabs,
+                                           _ecore_window_grabs_num *
+                                           sizeof(Window));
+          }
      }
 }
 
 EAPI void
-ecore_x_window_button_ungrab(Ecore_X_Window win, int button, 
-                            int mod, int any_mod)
+ecore_x_window_button_ungrab(Ecore_X_Window win, int button,
+                             int mod, int any_mod)
 {
-   unsigned int        b;
-   unsigned int        m;
-   unsigned int        locks[8];
-   int                 i;
-   
+   unsigned int b;
+   unsigned int m;
+   unsigned int locks[8];
+   int i;
+
    LOGFN(__FILE__, __LINE__, __FUNCTION__);
    b = button;
-   if (b == 0) b = AnyButton;
+   if (b == 0)
+      b = AnyButton;
+
    m = _ecore_x_event_modifier(mod);
-   if (any_mod) m = AnyModifier;
+   if (any_mod)
+      m = AnyModifier;
+
    locks[0] = 0;
    locks[1] = ECORE_X_LOCK_CAPS;
    locks[2] = ECORE_X_LOCK_NUM;
    locks[3] = ECORE_X_LOCK_SCROLL;
-   locks[4] = ECORE_X_LOCK_CAPS   | ECORE_X_LOCK_NUM;
-   locks[5] = ECORE_X_LOCK_CAPS   | ECORE_X_LOCK_SCROLL;
-   locks[6] = ECORE_X_LOCK_NUM    | ECORE_X_LOCK_SCROLL;
-   locks[7] = ECORE_X_LOCK_CAPS   | ECORE_X_LOCK_NUM    | ECORE_X_LOCK_SCROLL;
+   locks[4] = ECORE_X_LOCK_CAPS | ECORE_X_LOCK_NUM;
+   locks[5] = ECORE_X_LOCK_CAPS | ECORE_X_LOCK_SCROLL;
+   locks[6] = ECORE_X_LOCK_NUM | ECORE_X_LOCK_SCROLL;
+   locks[7] = ECORE_X_LOCK_CAPS | ECORE_X_LOCK_NUM | ECORE_X_LOCK_SCROLL;
    for (i = 0; i < 8; i++)
-     XUngrabButton(_ecore_x_disp, b, m | locks[i], win);
+      XUngrabButton(_ecore_x_disp, b, m | locks[i], win);
    _ecore_x_sync_magic_send(1, win);
 }
 
-int      _ecore_key_grabs_num = 0;
-Window  *_ecore_key_grabs = NULL;
+int _ecore_key_grabs_num = 0;
+Window *_ecore_key_grabs = NULL;
 
 EAPI void
-ecore_x_window_key_grab(Ecore_X_Window win, const char *key, 
-                       int mod, int any_mod)
+ecore_x_window_key_grab(Ecore_X_Window win, const char *key,
+                        int mod, int any_mod)
 {
-   KeyCode             keycode = 0;
-   KeySym              keysym;
-   unsigned int        m;
-   unsigned int        locks[8];
-   int                 i;
-   
+   KeyCode keycode = 0;
+   KeySym keysym;
+   unsigned int m;
+   unsigned int locks[8];
+   int i;
+
    LOGFN(__FILE__, __LINE__, __FUNCTION__);
    if (!strncmp(key, "Keycode-", 8))
-     keycode = atoi(key + 8);
+      keycode = atoi(key + 8);
    else
      {
-       keysym = XStringToKeysym(key);
-       if (keysym == NoSymbol) return;
-       keycode  = XKeysymToKeycode(_ecore_x_disp, XStringToKeysym(key));
+        keysym = XStringToKeysym(key);
+        if (keysym == NoSymbol)
+           return;
+
+        keycode = XKeysymToKeycode(_ecore_x_disp, XStringToKeysym(key));
      }
-   if (keycode == 0) return;
-   
+
+   if (keycode == 0)
+      return;
+
    m = _ecore_x_event_modifier(mod);
-   if (any_mod) m = AnyModifier;
+   if (any_mod)
+      m = AnyModifier;
+
    locks[0] = 0;
    locks[1] = ECORE_X_LOCK_CAPS;
    locks[2] = ECORE_X_LOCK_NUM;
    locks[3] = ECORE_X_LOCK_SCROLL;
-   locks[4] = ECORE_X_LOCK_CAPS   | ECORE_X_LOCK_NUM;
-   locks[5] = ECORE_X_LOCK_CAPS   | ECORE_X_LOCK_SCROLL;
-   locks[6] = ECORE_X_LOCK_NUM    | ECORE_X_LOCK_SCROLL;
-   locks[7] = ECORE_X_LOCK_CAPS   | ECORE_X_LOCK_NUM    | ECORE_X_LOCK_SCROLL;
+   locks[4] = ECORE_X_LOCK_CAPS | ECORE_X_LOCK_NUM;
+   locks[5] = ECORE_X_LOCK_CAPS | ECORE_X_LOCK_SCROLL;
+   locks[6] = ECORE_X_LOCK_NUM | ECORE_X_LOCK_SCROLL;
+   locks[7] = ECORE_X_LOCK_CAPS | ECORE_X_LOCK_NUM | ECORE_X_LOCK_SCROLL;
    for (i = 0; i < 8; i++)
-     XGrabKey(_ecore_x_disp, keycode, m | locks[i],
-             win, False, GrabModeSync, GrabModeAsync);
+      XGrabKey(_ecore_x_disp, keycode, m | locks[i],
+               win, False, GrabModeSync, GrabModeAsync);
    _ecore_key_grabs_num++;
    _ecore_key_grabs = realloc(_ecore_key_grabs,
-                             _ecore_key_grabs_num * sizeof(Window));
+                              _ecore_key_grabs_num * sizeof(Window));
    _ecore_key_grabs[_ecore_key_grabs_num - 1] = win;
 }
 
@@ -1506,57 +1652,65 @@ void
 _ecore_x_key_grab_remove(Ecore_X_Window win)
 {
    int i, shuffle = 0;
-   
+
    if (_ecore_key_grabs_num > 0)
      {
-       for (i = 0; i < _ecore_key_grabs_num; i++)
-         {
-            if (shuffle) _ecore_key_grabs[i - 1] = _ecore_key_grabs[i];
-            if ((!shuffle) && (_ecore_key_grabs[i] == win))
-              shuffle = 1;
-         }
-       if (shuffle)
-         {
-            _ecore_key_grabs_num--;
-            _ecore_key_grabs = realloc(_ecore_key_grabs, 
-                                       _ecore_key_grabs_num * sizeof(Window));
-         }
+        for (i = 0; i < _ecore_key_grabs_num; i++)
+          {
+             if (shuffle)
+                _ecore_key_grabs[i - 1] = _ecore_key_grabs[i];
+
+             if ((!shuffle) && (_ecore_key_grabs[i] == win))
+                shuffle = 1;
+          }
+        if (shuffle)
+          {
+             _ecore_key_grabs_num--;
+             _ecore_key_grabs = realloc(_ecore_key_grabs,
+                                        _ecore_key_grabs_num * sizeof(Window));
+          }
      }
 }
 
 EAPI void
 ecore_x_window_key_ungrab(Ecore_X_Window win, const char *key,
-                         int mod, int any_mod)
+                          int mod, int any_mod)
 {
-   KeyCode             keycode = 0;
-   KeySym              keysym;
-   unsigned int        m;
-   unsigned int        locks[8];
-   int                 i;
+   KeyCode keycode = 0;
+   KeySym keysym;
+   unsigned int m;
+   unsigned int locks[8];
+   int i;
 
    LOGFN(__FILE__, __LINE__, __FUNCTION__);
    if (!strncmp(key, "Keycode-", 8))
-     keycode = atoi(key + 8);
+      keycode = atoi(key + 8);
    else
      {
-       keysym = XStringToKeysym(key);
-       if (keysym == NoSymbol) return;
-       keycode  = XKeysymToKeycode(_ecore_x_disp, XStringToKeysym(key));
+        keysym = XStringToKeysym(key);
+        if (keysym == NoSymbol)
+           return;
+
+        keycode = XKeysymToKeycode(_ecore_x_disp, XStringToKeysym(key));
      }
-   if (keycode == 0) return;
-   
+
+   if (keycode == 0)
+      return;
+
    m = _ecore_x_event_modifier(mod);
-   if (any_mod) m = AnyModifier;
+   if (any_mod)
+      m = AnyModifier;
+
    locks[0] = 0;
    locks[1] = ECORE_X_LOCK_CAPS;
    locks[2] = ECORE_X_LOCK_NUM;
    locks[3] = ECORE_X_LOCK_SCROLL;
-   locks[4] = ECORE_X_LOCK_CAPS   | ECORE_X_LOCK_NUM;
-   locks[5] = ECORE_X_LOCK_CAPS   | ECORE_X_LOCK_SCROLL;
-   locks[6] = ECORE_X_LOCK_NUM    | ECORE_X_LOCK_SCROLL;
-   locks[7] = ECORE_X_LOCK_CAPS   | ECORE_X_LOCK_NUM    | ECORE_X_LOCK_SCROLL;
+   locks[4] = ECORE_X_LOCK_CAPS | ECORE_X_LOCK_NUM;
+   locks[5] = ECORE_X_LOCK_CAPS | ECORE_X_LOCK_SCROLL;
+   locks[6] = ECORE_X_LOCK_NUM | ECORE_X_LOCK_SCROLL;
+   locks[7] = ECORE_X_LOCK_CAPS | ECORE_X_LOCK_NUM | ECORE_X_LOCK_SCROLL;
    for (i = 0; i < 8; i++)
-     XUngrabKey(_ecore_x_disp, keycode, m | locks[i], win);
+      XUngrabKey(_ecore_x_disp, keycode, m | locks[i], win);
    _ecore_x_sync_magic_send(2, win);
 }
 
@@ -1575,8 +1729,8 @@ ecore_x_window_key_ungrab(Ecore_X_Window win, const char *key,
  */
 EAPI int
 ecore_x_client_message32_send(Ecore_X_Window win, Ecore_X_Atom type,
-                             Ecore_X_Event_Mask mask,
-                             long d0, long d1, long d2, long d3, long d4)
+                              Ecore_X_Event_Mask mask,
+                              long d0, long d1, long d2, long d3, long d4)
 {
    XEvent xev;
 
@@ -1590,7 +1744,7 @@ ecore_x_client_message32_send(Ecore_X_Window win, Ecore_X_Atom type,
    xev.xclient.data.l[2] = d2;
    xev.xclient.data.l[3] = d3;
    xev.xclient.data.l[4] = d4;
-   
+
    return XSendEvent(_ecore_x_disp, win, False, mask, &xev);
 }
 
@@ -1606,19 +1760,21 @@ ecore_x_client_message32_send(Ecore_X_Window win, Ecore_X_Atom type,
  */
 EAPI int
 ecore_x_client_message8_send(Ecore_X_Window win, Ecore_X_Atom type,
-                            const void *data, int len)
+                             const void *data, int len)
 {
    XEvent xev;
-   
+
    LOGFN(__FILE__, __LINE__, __FUNCTION__);
    xev.xclient.window = win;
    xev.xclient.type = ClientMessage;
    xev.xclient.message_type = type;
    xev.xclient.format = 8;
-   if (len > 20) len = 20;
+   if (len > 20)
+      len = 20;
+
    memcpy(xev.xclient.data.b, data, len);
    memset(xev.xclient.data.b + len, 0, 20 - len);
-   
+
    return XSendEvent(_ecore_x_disp, win, False, NoEventMask, &xev);
 }
 
@@ -1717,8 +1873,11 @@ ecore_x_events_allow_all(void)
 EAPI void
 ecore_x_pointer_last_xy_get(int *x, int *y)
 {
-   if (x) *x = _ecore_x_event_last_root_x;
-   if (y) *y = _ecore_x_event_last_root_y;
+   if (x)
+      *x = _ecore_x_event_last_root_x;
+
+   if (y)
+      *y = _ecore_x_event_last_root_y;
 }
 
 EAPI void
@@ -1727,12 +1886,25 @@ ecore_x_pointer_xy_get(Ecore_X_Window win, int *x, int *y)
    Window rwin, cwin;
    int rx, ry, wx, wy, ret;
    unsigned int mask;
-   
+
    LOGFN(__FILE__, __LINE__, __FUNCTION__);
-   ret = XQueryPointer(_ecore_x_disp, win, &rwin, &cwin, &rx, &ry, &wx, &wy, &mask);
-   if (!ret) wx = wy = -1;
-   if (x) *x = wx;
-   if (y) *y = wy;
+   ret = XQueryPointer(_ecore_x_disp,
+                       win,
+                       &rwin,
+                       &cwin,
+                       &rx,
+                       &ry,
+                       &wx,
+                       &wy,
+                       &mask);
+   if (!ret)
+      wx = wy = -1;
+
+   if (x)
+      *x = wx;
+
+   if (y)
+      *y = wy;
 }
 /*****************************************************************************/
 /*****************************************************************************/
@@ -1743,13 +1915,26 @@ _ecore_x_event_modifier(unsigned int state)
 {
    int xmodifiers = 0;
 
-   if (state & ECORE_EVENT_MODIFIER_SHIFT) xmodifiers |= ECORE_X_MODIFIER_SHIFT;
-   if (state & ECORE_EVENT_MODIFIER_CTRL) xmodifiers |= ECORE_X_MODIFIER_CTRL;
-   if (state & ECORE_EVENT_MODIFIER_ALT) xmodifiers |= ECORE_X_MODIFIER_ALT;
-   if (state & ECORE_EVENT_MODIFIER_WIN) xmodifiers |= ECORE_X_MODIFIER_WIN;
-   if (state & ECORE_EVENT_LOCK_SCROLL) xmodifiers |= ECORE_X_LOCK_SCROLL;
-   if (state & ECORE_EVENT_LOCK_NUM) xmodifiers |= ECORE_X_LOCK_NUM;
-   if (state & ECORE_EVENT_LOCK_CAPS) xmodifiers |= ECORE_X_LOCK_CAPS;
+   if (state & ECORE_EVENT_MODIFIER_SHIFT)
+      xmodifiers |= ECORE_X_MODIFIER_SHIFT;
+
+   if (state & ECORE_EVENT_MODIFIER_CTRL)
+      xmodifiers |= ECORE_X_MODIFIER_CTRL;
+
+   if (state & ECORE_EVENT_MODIFIER_ALT)
+      xmodifiers |= ECORE_X_MODIFIER_ALT;
+
+   if (state & ECORE_EVENT_MODIFIER_WIN)
+      xmodifiers |= ECORE_X_MODIFIER_WIN;
+
+   if (state & ECORE_EVENT_LOCK_SCROLL)
+      xmodifiers |= ECORE_X_LOCK_SCROLL;
+
+   if (state & ECORE_EVENT_LOCK_NUM)
+      xmodifiers |= ECORE_X_LOCK_NUM;
+
+   if (state & ECORE_EVENT_LOCK_CAPS)
+      xmodifiers |= ECORE_X_LOCK_CAPS;
 
    return xmodifiers;
 }
index 87442bd..8514b9f 100644 (file)
@@ -34,7 +34,7 @@ void *alloca (size_t);
 
 typedef struct
 {
-   const char   *name;
+   const char *name;
    Ecore_X_Atom *atom;
 } Atom_Item;
 
@@ -42,232 +42,250 @@ void
 _ecore_x_atoms_init(void)
 {
    const Atom_Item items[] =
-     {
-       { "ATOM", &ECORE_X_ATOM_ATOM },
-       { "CARDINAL", &ECORE_X_ATOM_CARDINAL },
-       { "COMPOUND_TEXT", &ECORE_X_ATOM_COMPOUND_TEXT },
-       { "FILE_NAME", &ECORE_X_ATOM_FILE_NAME },
-       { "STRING", &ECORE_X_ATOM_STRING },
-       { "TEXT", &ECORE_X_ATOM_TEXT },
-       { "UTF8_STRING", &ECORE_X_ATOM_UTF8_STRING },
-       { "WINDOW", &ECORE_X_ATOM_WINDOW },
-       { "PIXMAP", &ECORE_X_ATOM_PIXMAP },
-
-       { "JXSelectionWindowProperty", &ECORE_X_ATOM_SELECTION_PROP_XDND },
-       { "XdndSelection", &ECORE_X_ATOM_SELECTION_XDND },
-       { "XdndAware", &ECORE_X_ATOM_XDND_AWARE },
-       { "XdndEnter", &ECORE_X_ATOM_XDND_ENTER },
-       { "XdndTypeList", &ECORE_X_ATOM_XDND_TYPE_LIST },
-       { "XdndPosition", &ECORE_X_ATOM_XDND_POSITION },
-       { "XdndActionCopy", &ECORE_X_ATOM_XDND_ACTION_COPY },
-       { "XdndActionMove", &ECORE_X_ATOM_XDND_ACTION_MOVE },
-       { "XdndActionPrivate", &ECORE_X_ATOM_XDND_ACTION_PRIVATE },
-       { "XdndActionAsk", &ECORE_X_ATOM_XDND_ACTION_ASK },
-       { "XdndActionList", &ECORE_X_ATOM_XDND_ACTION_LIST },
-       { "XdndActionLink", &ECORE_X_ATOM_XDND_ACTION_LINK },
-       { "XdndActionDescription", &ECORE_X_ATOM_XDND_ACTION_DESCRIPTION },
-       { "XdndProxy", &ECORE_X_ATOM_XDND_PROXY },
-       { "XdndStatus", &ECORE_X_ATOM_XDND_STATUS },
-       { "XdndLeave", &ECORE_X_ATOM_XDND_LEAVE },
-       { "XdndDrop", &ECORE_X_ATOM_XDND_DROP },
-       { "XdndFinished", &ECORE_X_ATOM_XDND_FINISHED },
-
-       { "XdndActionCopy", &ECORE_X_DND_ACTION_COPY },
-       { "XdndActionMove", &ECORE_X_DND_ACTION_MOVE },
-       { "XdndActionLink", &ECORE_X_DND_ACTION_LINK },
-       { "XdndActionAsk", &ECORE_X_DND_ACTION_ASK },
-       { "XdndActionPrivate", &ECORE_X_DND_ACTION_PRIVATE },
-
-       { "_E_FRAME_SIZE", &ECORE_X_ATOM_E_FRAME_SIZE },
-
-       { "_WIN_LAYER", &ECORE_X_ATOM_WIN_LAYER },
-
-       { "WM_NAME", &ECORE_X_ATOM_WM_NAME },
-       { "WM_ICON_NAME", &ECORE_X_ATOM_WM_ICON_NAME },
-       { "WM_NORMAL_HINTS", &ECORE_X_ATOM_WM_NORMAL_HINTS },
-       { "WM_SIZE_HINTS", &ECORE_X_ATOM_WM_SIZE_HINTS },
-       { "WM_HINTS", &ECORE_X_ATOM_WM_HINTS },
-       { "WM_CLASS", &ECORE_X_ATOM_WM_CLASS },
-       { "WM_TRANSIENT_FOR", &ECORE_X_ATOM_WM_TRANSIENT_FOR },
-       { "WM_PROTOCOLS", &ECORE_X_ATOM_WM_PROTOCOLS },
-       { "WM_COLORMAP_WINDOWS", &ECORE_X_ATOM_WM_COLORMAP_WINDOWS },
-       { "WM_COMMAND", &ECORE_X_ATOM_WM_COMMAND },
-       { "WM_CLIENT_MACHINE", &ECORE_X_ATOM_WM_CLIENT_MACHINE },
-
-       { "WM_STATE", &ECORE_X_ATOM_WM_STATE },
-       { "WM_ICON_SIZE", &ECORE_X_ATOM_WM_ICON_SIZE },
-
-       { "WM_CHANGE_STATE", &ECORE_X_ATOM_WM_CHANGE_STATE },
-
-       { "WM_TAKE_FOCUS", &ECORE_X_ATOM_WM_TAKE_FOCUS },
-       { "WM_SAVE_YOURSELF", &ECORE_X_ATOM_WM_SAVE_YOURSELF },
-       { "WM_DELETE_WINDOW", &ECORE_X_ATOM_WM_DELETE_WINDOW },
-
-       { "WM_COLORMAP_NOTIFY", &ECORE_X_ATOM_WM_COLORMAP_NOTIFY },
-
-       { "SM_CLIENT_ID", &ECORE_X_ATOM_SM_CLIENT_ID },
-       { "WM_CLIENT_LEADER", &ECORE_X_ATOM_WM_CLIENT_LEADER },
-       { "WM_WINDOW_ROLE", &ECORE_X_ATOM_WM_WINDOW_ROLE },
-
-       { "_MOTIF_WM_HINTS", &ECORE_X_ATOM_MOTIF_WM_HINTS },
-
-       { "_NET_SUPPORTED", &ECORE_X_ATOM_NET_SUPPORTED },
-       { "_NET_CLIENT_LIST", &ECORE_X_ATOM_NET_CLIENT_LIST },
-       { "_NET_CLIENT_LIST_STACKING", &ECORE_X_ATOM_NET_CLIENT_LIST_STACKING },
-       { "_NET_NUMBER_OF_DESKTOPS", &ECORE_X_ATOM_NET_NUMBER_OF_DESKTOPS },
-       { "_NET_DESKTOP_GEOMETRY", &ECORE_X_ATOM_NET_DESKTOP_GEOMETRY },
-       { "_NET_DESKTOP_VIEWPORT", &ECORE_X_ATOM_NET_DESKTOP_VIEWPORT },
-       { "_NET_CURRENT_DESKTOP", &ECORE_X_ATOM_NET_CURRENT_DESKTOP },
-       { "_NET_DESKTOP_NAMES", &ECORE_X_ATOM_NET_DESKTOP_NAMES },
-       { "_NET_ACTIVE_WINDOW", &ECORE_X_ATOM_NET_ACTIVE_WINDOW },
-       { "_NET_WORKAREA", &ECORE_X_ATOM_NET_WORKAREA },
-       { "_NET_SUPPORTING_WM_CHECK", &ECORE_X_ATOM_NET_SUPPORTING_WM_CHECK },
-       { "_NET_VIRTUAL_ROOTS", &ECORE_X_ATOM_NET_VIRTUAL_ROOTS },
-       { "_NET_DESKTOP_LAYOUT", &ECORE_X_ATOM_NET_DESKTOP_LAYOUT },
-       { "_NET_SHOWING_DESKTOP", &ECORE_X_ATOM_NET_SHOWING_DESKTOP },
-
-       { "_NET_CLOSE_WINDOW", &ECORE_X_ATOM_NET_CLOSE_WINDOW },
-       { "_NET_MOVERESIZE_WINDOW", &ECORE_X_ATOM_NET_MOVERESIZE_WINDOW },
-       { "_NET_WM_MOVERESIZE", &ECORE_X_ATOM_NET_WM_MOVERESIZE },
-       { "_NET_RESTACK_WINDOW", &ECORE_X_ATOM_NET_RESTACK_WINDOW },
-
-       { "_NET_REQUEST_FRAME_EXTENTS", &ECORE_X_ATOM_NET_REQUEST_FRAME_EXTENTS },
-
-       { "_NET_WM_NAME", &ECORE_X_ATOM_NET_WM_NAME },
-       { "_NET_WM_VISIBLE_NAME", &ECORE_X_ATOM_NET_WM_VISIBLE_NAME },
-       { "_NET_WM_ICON_NAME", &ECORE_X_ATOM_NET_WM_ICON_NAME },
-       { "_NET_WM_VISIBLE_ICON_NAME", &ECORE_X_ATOM_NET_WM_VISIBLE_ICON_NAME },
-       { "_NET_WM_DESKTOP", &ECORE_X_ATOM_NET_WM_DESKTOP },
-
-       { "_NET_WM_WINDOW_TYPE", &ECORE_X_ATOM_NET_WM_WINDOW_TYPE },
-       { "_NET_WM_WINDOW_TYPE_DESKTOP", &ECORE_X_ATOM_NET_WM_WINDOW_TYPE_DESKTOP },
-       { "_NET_WM_WINDOW_TYPE_DOCK", &ECORE_X_ATOM_NET_WM_WINDOW_TYPE_DOCK },
-       { "_NET_WM_WINDOW_TYPE_TOOLBAR", &ECORE_X_ATOM_NET_WM_WINDOW_TYPE_TOOLBAR },
-       { "_NET_WM_WINDOW_TYPE_MENU", &ECORE_X_ATOM_NET_WM_WINDOW_TYPE_MENU },
-       { "_NET_WM_WINDOW_TYPE_UTILITY", &ECORE_X_ATOM_NET_WM_WINDOW_TYPE_UTILITY },
-       { "_NET_WM_WINDOW_TYPE_SPLASH", &ECORE_X_ATOM_NET_WM_WINDOW_TYPE_SPLASH },
-       { "_NET_WM_WINDOW_TYPE_DIALOG", &ECORE_X_ATOM_NET_WM_WINDOW_TYPE_DIALOG },
-       { "_NET_WM_WINDOW_TYPE_NORMAL", &ECORE_X_ATOM_NET_WM_WINDOW_TYPE_NORMAL },
-       { "_NET_WM_WINDOW_TYPE_DROPDOWN_MENU", &ECORE_X_ATOM_NET_WM_WINDOW_TYPE_DROPDOWN_MENU },
-       { "_NET_WM_WINDOW_TYPE_POPUP_MENU", &ECORE_X_ATOM_NET_WM_WINDOW_TYPE_POPUP_MENU },
-       { "_NET_WM_WINDOW_TYPE_TOOLTIP", &ECORE_X_ATOM_NET_WM_WINDOW_TYPE_TOOLTIP },
-       { "_NET_WM_WINDOW_TYPE_NOTIFICATION", &ECORE_X_ATOM_NET_WM_WINDOW_TYPE_NOTIFICATION },
-       { "_NET_WM_WINDOW_TYPE_COMBO", &ECORE_X_ATOM_NET_WM_WINDOW_TYPE_COMBO },
-       { "_NET_WM_WINDOW_TYPE_DND", &ECORE_X_ATOM_NET_WM_WINDOW_TYPE_DND },
-
-       { "_NET_WM_STATE", &ECORE_X_ATOM_NET_WM_STATE },
-       { "_NET_WM_STATE_MODAL", &ECORE_X_ATOM_NET_WM_STATE_MODAL },
-       { "_NET_WM_STATE_STICKY", &ECORE_X_ATOM_NET_WM_STATE_STICKY },
-       { "_NET_WM_STATE_MAXIMIZED_VERT", &ECORE_X_ATOM_NET_WM_STATE_MAXIMIZED_VERT },
-       { "_NET_WM_STATE_MAXIMIZED_HORZ", &ECORE_X_ATOM_NET_WM_STATE_MAXIMIZED_HORZ },
-       { "_NET_WM_STATE_SHADED", &ECORE_X_ATOM_NET_WM_STATE_SHADED },
-       { "_NET_WM_STATE_SKIP_TASKBAR", &ECORE_X_ATOM_NET_WM_STATE_SKIP_TASKBAR },
-       { "_NET_WM_STATE_SKIP_PAGER", &ECORE_X_ATOM_NET_WM_STATE_SKIP_PAGER },
-       { "_NET_WM_STATE_HIDDEN", &ECORE_X_ATOM_NET_WM_STATE_HIDDEN },
-       { "_NET_WM_STATE_FULLSCREEN", &ECORE_X_ATOM_NET_WM_STATE_FULLSCREEN },
-       { "_NET_WM_STATE_ABOVE", &ECORE_X_ATOM_NET_WM_STATE_ABOVE },
-       { "_NET_WM_STATE_BELOW", &ECORE_X_ATOM_NET_WM_STATE_BELOW },
-       { "_NET_WM_STATE_DEMANDS_ATTENTION", &ECORE_X_ATOM_NET_WM_STATE_DEMANDS_ATTENTION },
-
-       { "_NET_WM_ALLOWED_ACTIONS", &ECORE_X_ATOM_NET_WM_ALLOWED_ACTIONS },
-       { "_NET_WM_ACTION_MOVE", &ECORE_X_ATOM_NET_WM_ACTION_MOVE },
-       { "_NET_WM_ACTION_RESIZE", &ECORE_X_ATOM_NET_WM_ACTION_RESIZE },
-       { "_NET_WM_ACTION_MINIMIZE", &ECORE_X_ATOM_NET_WM_ACTION_MINIMIZE },
-       { "_NET_WM_ACTION_SHADE", &ECORE_X_ATOM_NET_WM_ACTION_SHADE },
-       { "_NET_WM_ACTION_STICK", &ECORE_X_ATOM_NET_WM_ACTION_STICK },
-       { "_NET_WM_ACTION_MAXIMIZE_HORZ", &ECORE_X_ATOM_NET_WM_ACTION_MAXIMIZE_HORZ },
-       { "_NET_WM_ACTION_MAXIMIZE_VERT", &ECORE_X_ATOM_NET_WM_ACTION_MAXIMIZE_VERT },
-       { "_NET_WM_ACTION_FULLSCREEN", &ECORE_X_ATOM_NET_WM_ACTION_FULLSCREEN },
-       { "_NET_WM_ACTION_CHANGE_DESKTOP", &ECORE_X_ATOM_NET_WM_ACTION_CHANGE_DESKTOP },
-       { "_NET_WM_ACTION_CLOSE", &ECORE_X_ATOM_NET_WM_ACTION_CLOSE },
-       { "_NET_WM_ACTION_ABOVE", &ECORE_X_ATOM_NET_WM_ACTION_ABOVE },
-       { "_NET_WM_ACTION_BELOW", &ECORE_X_ATOM_NET_WM_ACTION_BELOW },
-
-       { "_NET_WM_STRUT", &ECORE_X_ATOM_NET_WM_STRUT },
-       { "_NET_WM_STRUT_PARTIAL", &ECORE_X_ATOM_NET_WM_STRUT_PARTIAL },
-       { "_NET_WM_ICON_GEOMETRY", &ECORE_X_ATOM_NET_WM_ICON_GEOMETRY },
-       { "_NET_WM_ICON", &ECORE_X_ATOM_NET_WM_ICON },
-       { "_NET_WM_PID", &ECORE_X_ATOM_NET_WM_PID },
-       { "_NET_WM_HANDLED_ICONS", &ECORE_X_ATOM_NET_WM_HANDLED_ICONS },
-       { "_NET_WM_USER_TIME", &ECORE_X_ATOM_NET_WM_USER_TIME },
-       { "_NET_STARTUP_ID", &ECORE_X_ATOM_NET_STARTUP_ID },
-       { "_NET_FRAME_EXTENTS", &ECORE_X_ATOM_NET_FRAME_EXTENTS },
-
-       { "_NET_WM_PING", &ECORE_X_ATOM_NET_WM_PING },
-       { "_NET_WM_SYNC_REQUEST", &ECORE_X_ATOM_NET_WM_SYNC_REQUEST },
-       { "_NET_WM_SYNC_REQUEST_COUNTER", &ECORE_X_ATOM_NET_WM_SYNC_REQUEST_COUNTER },
-
-       { "_NET_WM_WINDOW_OPACITY", &ECORE_X_ATOM_NET_WM_WINDOW_OPACITY },
-       { "_NET_WM_WINDOW_SHADOW", &ECORE_X_ATOM_NET_WM_WINDOW_SHADOW },
-       { "_NET_WM_WINDOW_SHADE", &ECORE_X_ATOM_NET_WM_WINDOW_SHADE },
-
-       { "TARGETS", &ECORE_X_ATOM_SELECTION_TARGETS },
-       { "CLIPBOARD", &ECORE_X_ATOM_SELECTION_CLIPBOARD },
-       { "PRIMARY", &ECORE_X_ATOM_SELECTION_PRIMARY },
-       { "SECONDARY", &ECORE_X_ATOM_SELECTION_SECONDARY },
-       { "_ECORE_SELECTION_PRIMARY", &ECORE_X_ATOM_SELECTION_PROP_PRIMARY },
-       { "_ECORE_SELECTION_SECONDARY", &ECORE_X_ATOM_SELECTION_PROP_SECONDARY },
-       { "_ECORE_SELECTION_CLIPBOARD", &ECORE_X_ATOM_SELECTION_PROP_CLIPBOARD },
-
-       { "_E_VIRTUAL_KEYBOARD", &ECORE_X_ATOM_E_VIRTUAL_KEYBOARD },
-       { "_E_VIRTUAL_KEYBOARD_STATE", &ECORE_X_ATOM_E_VIRTUAL_KEYBOARD_STATE },
-       { "_E_VIRTUAL_KEYBOARD_ON", &ECORE_X_ATOM_E_VIRTUAL_KEYBOARD_ON },
-       { "_E_VIRTUAL_KEYBOARD_OFF", &ECORE_X_ATOM_E_VIRTUAL_KEYBOARD_OFF },
-       { "_E_VIRTUAL_KEYBOARD_ALPHA", &ECORE_X_ATOM_E_VIRTUAL_KEYBOARD_ALPHA },
-       { "_E_VIRTUAL_KEYBOARD_NUMERIC", &ECORE_X_ATOM_E_VIRTUAL_KEYBOARD_NUMERIC },
-       { "_E_VIRTUAL_KEYBOARD_PIN", &ECORE_X_ATOM_E_VIRTUAL_KEYBOARD_PIN },
-       { "_E_VIRTUAL_KEYBOARD_PHONE_NUMBER", &ECORE_X_ATOM_E_VIRTUAL_KEYBOARD_PHONE_NUMBER },
-       { "_E_VIRTUAL_KEYBOARD_HEX", &ECORE_X_ATOM_E_VIRTUAL_KEYBOARD_HEX },
-       { "_E_VIRTUAL_KEYBOARD_TERMINAL", &ECORE_X_ATOM_E_VIRTUAL_KEYBOARD_TERMINAL },
-       { "_E_VIRTUAL_KEYBOARD_PASSWORD", &ECORE_X_ATOM_E_VIRTUAL_KEYBOARD_PASSWORD }, 
-       { "_E_VIRTUAL_KEYBOARD_IP", &ECORE_X_ATOM_E_VIRTUAL_KEYBOARD_IP }, 
-       { "_E_VIRTUAL_KEYBOARD_HOST", &ECORE_X_ATOM_E_VIRTUAL_KEYBOARD_HOST }, 
-       { "_E_VIRTUAL_KEYBOARD_FILE", &ECORE_X_ATOM_E_VIRTUAL_KEYBOARD_FILE }, 
-       { "_E_VIRTUAL_KEYBOARD_URL", &ECORE_X_ATOM_E_VIRTUAL_KEYBOARD_URL }, 
-       { "_E_VIRTUAL_KEYBOARD_KEYPAD", &ECORE_X_ATOM_E_VIRTUAL_KEYBOARD_KEYPAD }, 
-       { "_E_VIRTUAL_KEYBOARD_J2ME", &ECORE_X_ATOM_E_VIRTUAL_KEYBOARD_J2ME }, 
-
-        { "_E_ILLUME_ZONE", &ECORE_X_ATOM_E_ILLUME_ZONE }, 
-        { "_E_ILLUME_ZONE_LIST", &ECORE_X_ATOM_E_ILLUME_ZONE_LIST }, 
-        { "_E_ILLUME_CONFORMANT", &ECORE_X_ATOM_E_ILLUME_CONFORMANT }, 
-        { "_E_ILLUME_MODE", &ECORE_X_ATOM_E_ILLUME_MODE }, 
-        { "_E_ILLUME_MODE_SINGLE", &ECORE_X_ATOM_E_ILLUME_MODE_SINGLE }, 
-        { "_E_ILLUME_MODE_DUAL_TOP", &ECORE_X_ATOM_E_ILLUME_MODE_DUAL_TOP }, 
-        { "_E_ILLUME_MODE_DUAL_LEFT", &ECORE_X_ATOM_E_ILLUME_MODE_DUAL_LEFT }, 
-        { "_E_ILLUME_FOCUS_BACK", &ECORE_X_ATOM_E_ILLUME_FOCUS_BACK }, 
-        { "_E_ILLUME_FOCUS_FORWARD", &ECORE_X_ATOM_E_ILLUME_FOCUS_FORWARD }, 
-        { "_E_ILLUME_FOCUS_HOME", &ECORE_X_ATOM_E_ILLUME_FOCUS_HOME }, 
-        { "_E_ILLUME_CLOSE", &ECORE_X_ATOM_E_ILLUME_CLOSE }, 
-        { "_E_ILLUME_HOME_NEW", &ECORE_X_ATOM_E_ILLUME_HOME_NEW }, 
-        { "_E_ILLUME_HOME_DEL", &ECORE_X_ATOM_E_ILLUME_HOME_DEL }, 
-        { "_E_ILLUME_DRAG", &ECORE_X_ATOM_E_ILLUME_DRAG }, 
-        { "_E_ILLUME_DRAG_LOCKED", &ECORE_X_ATOM_E_ILLUME_DRAG_LOCKED }, 
-        { "_E_ILLUME_DRAG_START", &ECORE_X_ATOM_E_ILLUME_DRAG_START }, 
-        { "_E_ILLUME_DRAG_END", &ECORE_X_ATOM_E_ILLUME_DRAG_END }, 
-        { "_E_ILLUME_INDICATOR_GEOMETRY", &ECORE_X_ATOM_E_ILLUME_INDICATOR_GEOMETRY }, 
-        { "_E_ILLUME_SOFTKEY_GEOMETRY", &ECORE_X_ATOM_E_ILLUME_SOFTKEY_GEOMETRY },
-        { "_E_ILLUME_KEYBOARD_GEOMETRY", &ECORE_X_ATOM_E_ILLUME_KEYBOARD_GEOMETRY },
-        { "_E_ILLUME_QUICKPANEL", &ECORE_X_ATOM_E_ILLUME_QUICKPANEL }, 
-        { "_E_ILLUME_QUICKPANEL_STATE", &ECORE_X_ATOM_E_ILLUME_QUICKPANEL_STATE }, 
-        { "_E_ILLUME_QUICKPANEL_STATE_TOGGLE", &ECORE_X_ATOM_E_ILLUME_QUICKPANEL_STATE_TOGGLE }, 
-        { "_E_ILLUME_QUICKPANEL_ON", &ECORE_X_ATOM_E_ILLUME_QUICKPANEL_ON }, 
-        { "_E_ILLUME_QUICKPANEL_OFF", &ECORE_X_ATOM_E_ILLUME_QUICKPANEL_OFF }, 
-        { "_E_ILLUME_QUICKPANEL_PRIORITY_MAJOR", &ECORE_X_ATOM_E_ILLUME_QUICKPANEL_PRIORITY_MAJOR }, 
-        { "_E_ILLUME_QUICKPANEL_PRIORITY_MINOR", &ECORE_X_ATOM_E_ILLUME_QUICKPANEL_PRIORITY_MINOR }, 
-        { "_E_ILLUME_QUICKPANEL_ZONE", &ECORE_X_ATOM_E_ILLUME_QUICKPANEL_ZONE }, 
-        { "_E_ILLUME_QUICKPANEL_POSITION_UPDATE", &ECORE_X_ATOM_E_ILLUME_QUICKPANEL_POSITION_UPDATE }, 
-
-        { "_E_COMP_SYNC_COUNTER", &ECORE_X_ATOM_E_COMP_SYNC_COUNTER },
-        { "_E_COMP_SYNC_DRAW_DONE", &ECORE_X_ATOM_E_COMP_SYNC_DRAW_DONE },
-        { "_E_COMP_SYNC_SUPPORTED", &ECORE_X_ATOM_E_COMP_SYNC_SUPPORTED },
-        { "_E_COMP_SYNC_BEGIN", &ECORE_X_ATOM_E_COMP_SYNC_BEGIN },
-        { "_E_COMP_SYNC_END", &ECORE_X_ATOM_E_COMP_SYNC_END },
-        { "_E_COMP_SYNC_CANCEL", &ECORE_X_ATOM_E_COMP_SYNC_CANCEL },
-        
-        { "_E_COMP_FLUSH", &ECORE_X_ATOM_E_COMP_FLUSH },
-        { "_E_COMP_DUMP", &ECORE_X_ATOM_E_COMP_DUMP },
-        { "_E_COMP_PIXMAP", &ECORE_X_ATOM_E_COMP_PIXMAP }
-     };
+   {
+      { "ATOM", &ECORE_X_ATOM_ATOM },
+      { "CARDINAL", &ECORE_X_ATOM_CARDINAL },
+      { "COMPOUND_TEXT", &ECORE_X_ATOM_COMPOUND_TEXT },
+      { "FILE_NAME", &ECORE_X_ATOM_FILE_NAME },
+      { "STRING", &ECORE_X_ATOM_STRING },
+      { "TEXT", &ECORE_X_ATOM_TEXT },
+      { "UTF8_STRING", &ECORE_X_ATOM_UTF8_STRING },
+      { "WINDOW", &ECORE_X_ATOM_WINDOW },
+      { "PIXMAP", &ECORE_X_ATOM_PIXMAP },
+
+      { "JXSelectionWindowProperty", &ECORE_X_ATOM_SELECTION_PROP_XDND },
+      { "XdndSelection", &ECORE_X_ATOM_SELECTION_XDND },
+      { "XdndAware", &ECORE_X_ATOM_XDND_AWARE },
+      { "XdndEnter", &ECORE_X_ATOM_XDND_ENTER },
+      { "XdndTypeList", &ECORE_X_ATOM_XDND_TYPE_LIST },
+      { "XdndPosition", &ECORE_X_ATOM_XDND_POSITION },
+      { "XdndActionCopy", &ECORE_X_ATOM_XDND_ACTION_COPY },
+      { "XdndActionMove", &ECORE_X_ATOM_XDND_ACTION_MOVE },
+      { "XdndActionPrivate", &ECORE_X_ATOM_XDND_ACTION_PRIVATE },
+      { "XdndActionAsk", &ECORE_X_ATOM_XDND_ACTION_ASK },
+      { "XdndActionList", &ECORE_X_ATOM_XDND_ACTION_LIST },
+      { "XdndActionLink", &ECORE_X_ATOM_XDND_ACTION_LINK },
+      { "XdndActionDescription", &ECORE_X_ATOM_XDND_ACTION_DESCRIPTION },
+      { "XdndProxy", &ECORE_X_ATOM_XDND_PROXY },
+      { "XdndStatus", &ECORE_X_ATOM_XDND_STATUS },
+      { "XdndLeave", &ECORE_X_ATOM_XDND_LEAVE },
+      { "XdndDrop", &ECORE_X_ATOM_XDND_DROP },
+      { "XdndFinished", &ECORE_X_ATOM_XDND_FINISHED },
+
+      { "XdndActionCopy", &ECORE_X_DND_ACTION_COPY },
+      { "XdndActionMove", &ECORE_X_DND_ACTION_MOVE },
+      { "XdndActionLink", &ECORE_X_DND_ACTION_LINK },
+      { "XdndActionAsk", &ECORE_X_DND_ACTION_ASK },
+      { "XdndActionPrivate", &ECORE_X_DND_ACTION_PRIVATE },
+
+      { "_E_FRAME_SIZE", &ECORE_X_ATOM_E_FRAME_SIZE },
+
+      { "_WIN_LAYER", &ECORE_X_ATOM_WIN_LAYER },
+
+      { "WM_NAME", &ECORE_X_ATOM_WM_NAME },
+      { "WM_ICON_NAME", &ECORE_X_ATOM_WM_ICON_NAME },
+      { "WM_NORMAL_HINTS", &ECORE_X_ATOM_WM_NORMAL_HINTS },
+      { "WM_SIZE_HINTS", &ECORE_X_ATOM_WM_SIZE_HINTS },
+      { "WM_HINTS", &ECORE_X_ATOM_WM_HINTS },
+      { "WM_CLASS", &ECORE_X_ATOM_WM_CLASS },
+      { "WM_TRANSIENT_FOR", &ECORE_X_ATOM_WM_TRANSIENT_FOR },
+      { "WM_PROTOCOLS", &ECORE_X_ATOM_WM_PROTOCOLS },
+      { "WM_COLORMAP_WINDOWS", &ECORE_X_ATOM_WM_COLORMAP_WINDOWS },
+      { "WM_COMMAND", &ECORE_X_ATOM_WM_COMMAND },
+      { "WM_CLIENT_MACHINE", &ECORE_X_ATOM_WM_CLIENT_MACHINE },
+
+      { "WM_STATE", &ECORE_X_ATOM_WM_STATE },
+      { "WM_ICON_SIZE", &ECORE_X_ATOM_WM_ICON_SIZE },
+
+      { "WM_CHANGE_STATE", &ECORE_X_ATOM_WM_CHANGE_STATE },
+
+      { "WM_TAKE_FOCUS", &ECORE_X_ATOM_WM_TAKE_FOCUS },
+      { "WM_SAVE_YOURSELF", &ECORE_X_ATOM_WM_SAVE_YOURSELF },
+      { "WM_DELETE_WINDOW", &ECORE_X_ATOM_WM_DELETE_WINDOW },
+
+      { "WM_COLORMAP_NOTIFY", &ECORE_X_ATOM_WM_COLORMAP_NOTIFY },
+
+      { "SM_CLIENT_ID", &ECORE_X_ATOM_SM_CLIENT_ID },
+      { "WM_CLIENT_LEADER", &ECORE_X_ATOM_WM_CLIENT_LEADER },
+      { "WM_WINDOW_ROLE", &ECORE_X_ATOM_WM_WINDOW_ROLE },
+
+      { "_MOTIF_WM_HINTS", &ECORE_X_ATOM_MOTIF_WM_HINTS },
+
+      { "_NET_SUPPORTED", &ECORE_X_ATOM_NET_SUPPORTED },
+      { "_NET_CLIENT_LIST", &ECORE_X_ATOM_NET_CLIENT_LIST },
+      { "_NET_CLIENT_LIST_STACKING", &ECORE_X_ATOM_NET_CLIENT_LIST_STACKING },
+      { "_NET_NUMBER_OF_DESKTOPS", &ECORE_X_ATOM_NET_NUMBER_OF_DESKTOPS },
+      { "_NET_DESKTOP_GEOMETRY", &ECORE_X_ATOM_NET_DESKTOP_GEOMETRY },
+      { "_NET_DESKTOP_VIEWPORT", &ECORE_X_ATOM_NET_DESKTOP_VIEWPORT },
+      { "_NET_CURRENT_DESKTOP", &ECORE_X_ATOM_NET_CURRENT_DESKTOP },
+      { "_NET_DESKTOP_NAMES", &ECORE_X_ATOM_NET_DESKTOP_NAMES },
+      { "_NET_ACTIVE_WINDOW", &ECORE_X_ATOM_NET_ACTIVE_WINDOW },
+      { "_NET_WORKAREA", &ECORE_X_ATOM_NET_WORKAREA },
+      { "_NET_SUPPORTING_WM_CHECK", &ECORE_X_ATOM_NET_SUPPORTING_WM_CHECK },
+      { "_NET_VIRTUAL_ROOTS", &ECORE_X_ATOM_NET_VIRTUAL_ROOTS },
+      { "_NET_DESKTOP_LAYOUT", &ECORE_X_ATOM_NET_DESKTOP_LAYOUT },
+      { "_NET_SHOWING_DESKTOP", &ECORE_X_ATOM_NET_SHOWING_DESKTOP },
+
+      { "_NET_CLOSE_WINDOW", &ECORE_X_ATOM_NET_CLOSE_WINDOW },
+      { "_NET_MOVERESIZE_WINDOW", &ECORE_X_ATOM_NET_MOVERESIZE_WINDOW },
+      { "_NET_WM_MOVERESIZE", &ECORE_X_ATOM_NET_WM_MOVERESIZE },
+      { "_NET_RESTACK_WINDOW", &ECORE_X_ATOM_NET_RESTACK_WINDOW },
+
+      { "_NET_REQUEST_FRAME_EXTENTS", &ECORE_X_ATOM_NET_REQUEST_FRAME_EXTENTS },
+
+      { "_NET_WM_NAME", &ECORE_X_ATOM_NET_WM_NAME },
+      { "_NET_WM_VISIBLE_NAME", &ECORE_X_ATOM_NET_WM_VISIBLE_NAME },
+      { "_NET_WM_ICON_NAME", &ECORE_X_ATOM_NET_WM_ICON_NAME },
+      { "_NET_WM_VISIBLE_ICON_NAME", &ECORE_X_ATOM_NET_WM_VISIBLE_ICON_NAME },
+      { "_NET_WM_DESKTOP", &ECORE_X_ATOM_NET_WM_DESKTOP },
+
+      { "_NET_WM_WINDOW_TYPE", &ECORE_X_ATOM_NET_WM_WINDOW_TYPE },
+      { "_NET_WM_WINDOW_TYPE_DESKTOP", &ECORE_X_ATOM_NET_WM_WINDOW_TYPE_DESKTOP },
+      { "_NET_WM_WINDOW_TYPE_DOCK", &ECORE_X_ATOM_NET_WM_WINDOW_TYPE_DOCK },
+      { "_NET_WM_WINDOW_TYPE_TOOLBAR", &ECORE_X_ATOM_NET_WM_WINDOW_TYPE_TOOLBAR },
+      { "_NET_WM_WINDOW_TYPE_MENU", &ECORE_X_ATOM_NET_WM_WINDOW_TYPE_MENU },
+      { "_NET_WM_WINDOW_TYPE_UTILITY", &ECORE_X_ATOM_NET_WM_WINDOW_TYPE_UTILITY },
+      { "_NET_WM_WINDOW_TYPE_SPLASH", &ECORE_X_ATOM_NET_WM_WINDOW_TYPE_SPLASH },
+      { "_NET_WM_WINDOW_TYPE_DIALOG", &ECORE_X_ATOM_NET_WM_WINDOW_TYPE_DIALOG },
+      { "_NET_WM_WINDOW_TYPE_NORMAL", &ECORE_X_ATOM_NET_WM_WINDOW_TYPE_NORMAL },
+      { "_NET_WM_WINDOW_TYPE_DROPDOWN_MENU",
+        &ECORE_X_ATOM_NET_WM_WINDOW_TYPE_DROPDOWN_MENU },
+      { "_NET_WM_WINDOW_TYPE_POPUP_MENU",
+        &ECORE_X_ATOM_NET_WM_WINDOW_TYPE_POPUP_MENU },
+      { "_NET_WM_WINDOW_TYPE_TOOLTIP", &ECORE_X_ATOM_NET_WM_WINDOW_TYPE_TOOLTIP },
+      { "_NET_WM_WINDOW_TYPE_NOTIFICATION",
+        &ECORE_X_ATOM_NET_WM_WINDOW_TYPE_NOTIFICATION },
+      { "_NET_WM_WINDOW_TYPE_COMBO", &ECORE_X_ATOM_NET_WM_WINDOW_TYPE_COMBO },
+      { "_NET_WM_WINDOW_TYPE_DND", &ECORE_X_ATOM_NET_WM_WINDOW_TYPE_DND },
+
+      { "_NET_WM_STATE", &ECORE_X_ATOM_NET_WM_STATE },
+      { "_NET_WM_STATE_MODAL", &ECORE_X_ATOM_NET_WM_STATE_MODAL },
+      { "_NET_WM_STATE_STICKY", &ECORE_X_ATOM_NET_WM_STATE_STICKY },
+      { "_NET_WM_STATE_MAXIMIZED_VERT",
+        &ECORE_X_ATOM_NET_WM_STATE_MAXIMIZED_VERT },
+      { "_NET_WM_STATE_MAXIMIZED_HORZ",
+        &ECORE_X_ATOM_NET_WM_STATE_MAXIMIZED_HORZ },
+      { "_NET_WM_STATE_SHADED", &ECORE_X_ATOM_NET_WM_STATE_SHADED },
+      { "_NET_WM_STATE_SKIP_TASKBAR", &ECORE_X_ATOM_NET_WM_STATE_SKIP_TASKBAR },
+      { "_NET_WM_STATE_SKIP_PAGER", &ECORE_X_ATOM_NET_WM_STATE_SKIP_PAGER },
+      { "_NET_WM_STATE_HIDDEN", &ECORE_X_ATOM_NET_WM_STATE_HIDDEN },
+      { "_NET_WM_STATE_FULLSCREEN", &ECORE_X_ATOM_NET_WM_STATE_FULLSCREEN },
+      { "_NET_WM_STATE_ABOVE", &ECORE_X_ATOM_NET_WM_STATE_ABOVE },
+      { "_NET_WM_STATE_BELOW", &ECORE_X_ATOM_NET_WM_STATE_BELOW },
+      { "_NET_WM_STATE_DEMANDS_ATTENTION",
+        &ECORE_X_ATOM_NET_WM_STATE_DEMANDS_ATTENTION },
+
+      { "_NET_WM_ALLOWED_ACTIONS", &ECORE_X_ATOM_NET_WM_ALLOWED_ACTIONS },
+      { "_NET_WM_ACTION_MOVE", &ECORE_X_ATOM_NET_WM_ACTION_MOVE },
+      { "_NET_WM_ACTION_RESIZE", &ECORE_X_ATOM_NET_WM_ACTION_RESIZE },
+      { "_NET_WM_ACTION_MINIMIZE", &ECORE_X_ATOM_NET_WM_ACTION_MINIMIZE },
+      { "_NET_WM_ACTION_SHADE", &ECORE_X_ATOM_NET_WM_ACTION_SHADE },
+      { "_NET_WM_ACTION_STICK", &ECORE_X_ATOM_NET_WM_ACTION_STICK },
+      { "_NET_WM_ACTION_MAXIMIZE_HORZ",
+        &ECORE_X_ATOM_NET_WM_ACTION_MAXIMIZE_HORZ },
+      { "_NET_WM_ACTION_MAXIMIZE_VERT",
+        &ECORE_X_ATOM_NET_WM_ACTION_MAXIMIZE_VERT },
+      { "_NET_WM_ACTION_FULLSCREEN", &ECORE_X_ATOM_NET_WM_ACTION_FULLSCREEN },
+      { "_NET_WM_ACTION_CHANGE_DESKTOP",
+        &ECORE_X_ATOM_NET_WM_ACTION_CHANGE_DESKTOP },
+      { "_NET_WM_ACTION_CLOSE", &ECORE_X_ATOM_NET_WM_ACTION_CLOSE },
+      { "_NET_WM_ACTION_ABOVE", &ECORE_X_ATOM_NET_WM_ACTION_ABOVE },
+      { "_NET_WM_ACTION_BELOW", &ECORE_X_ATOM_NET_WM_ACTION_BELOW },
+
+      { "_NET_WM_STRUT", &ECORE_X_ATOM_NET_WM_STRUT },
+      { "_NET_WM_STRUT_PARTIAL", &ECORE_X_ATOM_NET_WM_STRUT_PARTIAL },
+      { "_NET_WM_ICON_GEOMETRY", &ECORE_X_ATOM_NET_WM_ICON_GEOMETRY },
+      { "_NET_WM_ICON", &ECORE_X_ATOM_NET_WM_ICON },
+      { "_NET_WM_PID", &ECORE_X_ATOM_NET_WM_PID },
+      { "_NET_WM_HANDLED_ICONS", &ECORE_X_ATOM_NET_WM_HANDLED_ICONS },
+      { "_NET_WM_USER_TIME", &ECORE_X_ATOM_NET_WM_USER_TIME },
+      { "_NET_STARTUP_ID", &ECORE_X_ATOM_NET_STARTUP_ID },
+      { "_NET_FRAME_EXTENTS", &ECORE_X_ATOM_NET_FRAME_EXTENTS },
+
+      { "_NET_WM_PING", &ECORE_X_ATOM_NET_WM_PING },
+      { "_NET_WM_SYNC_REQUEST", &ECORE_X_ATOM_NET_WM_SYNC_REQUEST },
+      { "_NET_WM_SYNC_REQUEST_COUNTER",
+        &ECORE_X_ATOM_NET_WM_SYNC_REQUEST_COUNTER },
+
+      { "_NET_WM_WINDOW_OPACITY", &ECORE_X_ATOM_NET_WM_WINDOW_OPACITY },
+      { "_NET_WM_WINDOW_SHADOW", &ECORE_X_ATOM_NET_WM_WINDOW_SHADOW },
+      { "_NET_WM_WINDOW_SHADE", &ECORE_X_ATOM_NET_WM_WINDOW_SHADE },
+
+      { "TARGETS", &ECORE_X_ATOM_SELECTION_TARGETS },
+      { "CLIPBOARD", &ECORE_X_ATOM_SELECTION_CLIPBOARD },
+      { "PRIMARY", &ECORE_X_ATOM_SELECTION_PRIMARY },
+      { "SECONDARY", &ECORE_X_ATOM_SELECTION_SECONDARY },
+      { "_ECORE_SELECTION_PRIMARY", &ECORE_X_ATOM_SELECTION_PROP_PRIMARY },
+      { "_ECORE_SELECTION_SECONDARY", &ECORE_X_ATOM_SELECTION_PROP_SECONDARY },
+      { "_ECORE_SELECTION_CLIPBOARD", &ECORE_X_ATOM_SELECTION_PROP_CLIPBOARD },
+
+      { "_E_VIRTUAL_KEYBOARD", &ECORE_X_ATOM_E_VIRTUAL_KEYBOARD },
+      { "_E_VIRTUAL_KEYBOARD_STATE", &ECORE_X_ATOM_E_VIRTUAL_KEYBOARD_STATE },
+      { "_E_VIRTUAL_KEYBOARD_ON", &ECORE_X_ATOM_E_VIRTUAL_KEYBOARD_ON },
+      { "_E_VIRTUAL_KEYBOARD_OFF", &ECORE_X_ATOM_E_VIRTUAL_KEYBOARD_OFF },
+      { "_E_VIRTUAL_KEYBOARD_ALPHA", &ECORE_X_ATOM_E_VIRTUAL_KEYBOARD_ALPHA },
+      { "_E_VIRTUAL_KEYBOARD_NUMERIC", &ECORE_X_ATOM_E_VIRTUAL_KEYBOARD_NUMERIC },
+      { "_E_VIRTUAL_KEYBOARD_PIN", &ECORE_X_ATOM_E_VIRTUAL_KEYBOARD_PIN },
+      { "_E_VIRTUAL_KEYBOARD_PHONE_NUMBER",
+        &ECORE_X_ATOM_E_VIRTUAL_KEYBOARD_PHONE_NUMBER },
+      { "_E_VIRTUAL_KEYBOARD_HEX", &ECORE_X_ATOM_E_VIRTUAL_KEYBOARD_HEX },
+      { "_E_VIRTUAL_KEYBOARD_TERMINAL",
+        &ECORE_X_ATOM_E_VIRTUAL_KEYBOARD_TERMINAL },
+      { "_E_VIRTUAL_KEYBOARD_PASSWORD",
+        &ECORE_X_ATOM_E_VIRTUAL_KEYBOARD_PASSWORD },
+      { "_E_VIRTUAL_KEYBOARD_IP", &ECORE_X_ATOM_E_VIRTUAL_KEYBOARD_IP },
+      { "_E_VIRTUAL_KEYBOARD_HOST", &ECORE_X_ATOM_E_VIRTUAL_KEYBOARD_HOST },
+      { "_E_VIRTUAL_KEYBOARD_FILE", &ECORE_X_ATOM_E_VIRTUAL_KEYBOARD_FILE },
+      { "_E_VIRTUAL_KEYBOARD_URL", &ECORE_X_ATOM_E_VIRTUAL_KEYBOARD_URL },
+      { "_E_VIRTUAL_KEYBOARD_KEYPAD", &ECORE_X_ATOM_E_VIRTUAL_KEYBOARD_KEYPAD },
+      { "_E_VIRTUAL_KEYBOARD_J2ME", &ECORE_X_ATOM_E_VIRTUAL_KEYBOARD_J2ME },
+
+      { "_E_ILLUME_ZONE", &ECORE_X_ATOM_E_ILLUME_ZONE },
+      { "_E_ILLUME_ZONE_LIST", &ECORE_X_ATOM_E_ILLUME_ZONE_LIST },
+      { "_E_ILLUME_CONFORMANT", &ECORE_X_ATOM_E_ILLUME_CONFORMANT },
+      { "_E_ILLUME_MODE", &ECORE_X_ATOM_E_ILLUME_MODE },
+      { "_E_ILLUME_MODE_SINGLE", &ECORE_X_ATOM_E_ILLUME_MODE_SINGLE },
+      { "_E_ILLUME_MODE_DUAL_TOP", &ECORE_X_ATOM_E_ILLUME_MODE_DUAL_TOP },
+      { "_E_ILLUME_MODE_DUAL_LEFT", &ECORE_X_ATOM_E_ILLUME_MODE_DUAL_LEFT },
+      { "_E_ILLUME_FOCUS_BACK", &ECORE_X_ATOM_E_ILLUME_FOCUS_BACK },
+      { "_E_ILLUME_FOCUS_FORWARD", &ECORE_X_ATOM_E_ILLUME_FOCUS_FORWARD },
+      { "_E_ILLUME_FOCUS_HOME", &ECORE_X_ATOM_E_ILLUME_FOCUS_HOME },
+      { "_E_ILLUME_CLOSE", &ECORE_X_ATOM_E_ILLUME_CLOSE },
+      { "_E_ILLUME_HOME_NEW", &ECORE_X_ATOM_E_ILLUME_HOME_NEW },
+      { "_E_ILLUME_HOME_DEL", &ECORE_X_ATOM_E_ILLUME_HOME_DEL },
+      { "_E_ILLUME_DRAG", &ECORE_X_ATOM_E_ILLUME_DRAG },
+      { "_E_ILLUME_DRAG_LOCKED", &ECORE_X_ATOM_E_ILLUME_DRAG_LOCKED },
+      { "_E_ILLUME_DRAG_START", &ECORE_X_ATOM_E_ILLUME_DRAG_START },
+      { "_E_ILLUME_DRAG_END", &ECORE_X_ATOM_E_ILLUME_DRAG_END },
+      { "_E_ILLUME_INDICATOR_GEOMETRY",
+        &ECORE_X_ATOM_E_ILLUME_INDICATOR_GEOMETRY },
+      { "_E_ILLUME_SOFTKEY_GEOMETRY", &ECORE_X_ATOM_E_ILLUME_SOFTKEY_GEOMETRY },
+      { "_E_ILLUME_KEYBOARD_GEOMETRY", &ECORE_X_ATOM_E_ILLUME_KEYBOARD_GEOMETRY },
+      { "_E_ILLUME_QUICKPANEL", &ECORE_X_ATOM_E_ILLUME_QUICKPANEL },
+      { "_E_ILLUME_QUICKPANEL_STATE", &ECORE_X_ATOM_E_ILLUME_QUICKPANEL_STATE },
+      { "_E_ILLUME_QUICKPANEL_STATE_TOGGLE",
+        &ECORE_X_ATOM_E_ILLUME_QUICKPANEL_STATE_TOGGLE },
+      { "_E_ILLUME_QUICKPANEL_ON", &ECORE_X_ATOM_E_ILLUME_QUICKPANEL_ON },
+      { "_E_ILLUME_QUICKPANEL_OFF", &ECORE_X_ATOM_E_ILLUME_QUICKPANEL_OFF },
+      { "_E_ILLUME_QUICKPANEL_PRIORITY_MAJOR",
+        &ECORE_X_ATOM_E_ILLUME_QUICKPANEL_PRIORITY_MAJOR },
+      { "_E_ILLUME_QUICKPANEL_PRIORITY_MINOR",
+        &ECORE_X_ATOM_E_ILLUME_QUICKPANEL_PRIORITY_MINOR },
+      { "_E_ILLUME_QUICKPANEL_ZONE", &ECORE_X_ATOM_E_ILLUME_QUICKPANEL_ZONE },
+      { "_E_ILLUME_QUICKPANEL_POSITION_UPDATE",
+        &ECORE_X_ATOM_E_ILLUME_QUICKPANEL_POSITION_UPDATE },
+
+      { "_E_COMP_SYNC_COUNTER", &ECORE_X_ATOM_E_COMP_SYNC_COUNTER },
+      { "_E_COMP_SYNC_DRAW_DONE", &ECORE_X_ATOM_E_COMP_SYNC_DRAW_DONE },
+      { "_E_COMP_SYNC_SUPPORTED", &ECORE_X_ATOM_E_COMP_SYNC_SUPPORTED },
+      { "_E_COMP_SYNC_BEGIN", &ECORE_X_ATOM_E_COMP_SYNC_BEGIN },
+      { "_E_COMP_SYNC_END", &ECORE_X_ATOM_E_COMP_SYNC_END },
+      { "_E_COMP_SYNC_CANCEL", &ECORE_X_ATOM_E_COMP_SYNC_CANCEL },
+
+      { "_E_COMP_FLUSH", &ECORE_X_ATOM_E_COMP_FLUSH },
+      { "_E_COMP_DUMP", &ECORE_X_ATOM_E_COMP_DUMP },
+      { "_E_COMP_PIXMAP", &ECORE_X_ATOM_E_COMP_PIXMAP }
+   };
    Atom *atoms;
    char **names;
    int i, num;
@@ -288,7 +306,9 @@ _ecore_x_atoms_init(void)
 EAPI Ecore_X_Atom
 ecore_x_atom_get(const char *name)
 {
-   if (!_ecore_x_disp) return 0;
+   if (!_ecore_x_disp)
+      return 0;
+
    LOGFN(__FILE__, __LINE__, __FUNCTION__);
    return XInternAtom(_ecore_x_disp, name, False);
 }
@@ -299,12 +319,14 @@ ecore_x_atoms_get(const char **names, int num, Ecore_X_Atom *atoms)
    Atom *atoms_int;
    int i;
 
-   if (!_ecore_x_disp) return;
+   if (!_ecore_x_disp)
+      return;
+
    LOGFN(__FILE__, __LINE__, __FUNCTION__);
    atoms_int = alloca(num * sizeof(Atom));
    XInternAtoms(_ecore_x_disp, (char **)names, num, False, atoms_int);
    for (i = 0; i < num; i++)
-     atoms[i] = atoms_int[i];
+      atoms[i] = atoms_int[i];
 }
 
 EAPI char *
@@ -313,11 +335,14 @@ ecore_x_atom_name_get(Ecore_X_Atom atom)
    char *name;
    char *xname;
 
-   if (!_ecore_x_disp) return NULL;
+   if (!_ecore_x_disp)
+      return NULL;
+
    LOGFN(__FILE__, __LINE__, __FUNCTION__);
 
    xname = XGetAtomName(_ecore_x_disp, atom);
-   if (!xname) return NULL;
+   if (!xname)
+      return NULL;
 
    name = strdup(xname);
    XFree(xname);
index 617f0fb..299c166 100644 (file)
@@ -21,7 +21,8 @@ _ecore_x_composite_init(void)
    int major, minor;
 
    if (XCompositeQueryVersion(_ecore_x_disp, &major, &minor))
-     _composite_available = 1;
+      _composite_available = 1;
+
 #endif
 }
 
@@ -33,7 +34,8 @@ ecore_x_composite_query(void)
 }
 
 EAPI void
-ecore_x_composite_redirect_window(Ecore_X_Window win, Ecore_X_Composite_Update_Type type)
+ecore_x_composite_redirect_window(Ecore_X_Window win,
+                                  Ecore_X_Composite_Update_Type type)
 {
 #ifdef ECORE_XCOMPOSITE
    int update = CompositeRedirectAutomatic;
@@ -42,18 +44,20 @@ ecore_x_composite_redirect_window(Ecore_X_Window win, Ecore_X_Composite_Update_T
    switch(type)
      {
       case ECORE_X_COMPOSITE_UPDATE_AUTOMATIC:
-        update = CompositeRedirectAutomatic;
-        break;
+         update = CompositeRedirectAutomatic;
+         break;
+
       case ECORE_X_COMPOSITE_UPDATE_MANUAL:
-        update = CompositeRedirectManual;
-        break;
+         update = CompositeRedirectManual;
+         break;
      }
    XCompositeRedirectWindow(_ecore_x_disp, win, update);
 #endif
 }
 
 EAPI void
-ecore_x_composite_redirect_subwindows(Ecore_X_Window win, Ecore_X_Composite_Update_Type type)
+ecore_x_composite_redirect_subwindows(Ecore_X_Window win,
+                                      Ecore_X_Composite_Update_Type type)
 {
 #ifdef ECORE_XCOMPOSITE
    int update = CompositeRedirectAutomatic;
@@ -62,18 +66,20 @@ ecore_x_composite_redirect_subwindows(Ecore_X_Window win, Ecore_X_Composite_Upda
    switch(type)
      {
       case ECORE_X_COMPOSITE_UPDATE_AUTOMATIC:
-        update = CompositeRedirectAutomatic;
-        break;
+         update = CompositeRedirectAutomatic;
+         break;
+
       case ECORE_X_COMPOSITE_UPDATE_MANUAL:
-        update = CompositeRedirectManual;
-        break;
+         update = CompositeRedirectManual;
+         break;
      }
    XCompositeRedirectSubwindows(_ecore_x_disp, win, update);
 #endif
 }
 
 EAPI void
-ecore_x_composite_unredirect_window(Ecore_X_Window win, Ecore_X_Composite_Update_Type type)
+ecore_x_composite_unredirect_window(Ecore_X_Window win,
+                                    Ecore_X_Composite_Update_Type type)
 {
 #ifdef ECORE_XCOMPOSITE
    int update = CompositeRedirectAutomatic;
@@ -82,18 +88,20 @@ ecore_x_composite_unredirect_window(Ecore_X_Window win, Ecore_X_Composite_Update
    switch(type)
      {
       case ECORE_X_COMPOSITE_UPDATE_AUTOMATIC:
-        update = CompositeRedirectAutomatic;
-        break;
+         update = CompositeRedirectAutomatic;
+         break;
+
       case ECORE_X_COMPOSITE_UPDATE_MANUAL:
-        update = CompositeRedirectManual;
-        break;
+         update = CompositeRedirectManual;
+         break;
      }
    XCompositeUnredirectWindow(_ecore_x_disp, win, update);
 #endif
 }
 
 EAPI void
-ecore_x_composite_unredirect_subwindows(Ecore_X_Window win, Ecore_X_Composite_Update_Type type)
+ecore_x_composite_unredirect_subwindows(Ecore_X_Window win,
+                                        Ecore_X_Composite_Update_Type type)
 {
 #ifdef ECORE_XCOMPOSITE
    int update = CompositeRedirectAutomatic;
@@ -102,11 +110,12 @@ ecore_x_composite_unredirect_subwindows(Ecore_X_Window win, Ecore_X_Composite_Up
    switch(type)
      {
       case ECORE_X_COMPOSITE_UPDATE_AUTOMATIC:
-        update = CompositeRedirectAutomatic;
-        break;
+         update = CompositeRedirectAutomatic;
+         break;
+
       case ECORE_X_COMPOSITE_UPDATE_MANUAL:
-        update = CompositeRedirectManual;
-        break;
+         update = CompositeRedirectManual;
+         break;
      }
    XCompositeUnredirectSubwindows(_ecore_x_disp, win, update);
 #endif
@@ -116,7 +125,7 @@ EAPI Ecore_X_Pixmap
 ecore_x_composite_name_window_pixmap_get(Ecore_X_Window win)
 {
    Ecore_X_Pixmap pixmap = None;
-  
+
 #ifdef ECORE_XCOMPOSITE
    LOGFN(__FILE__, __LINE__, __FUNCTION__);
    pixmap = XCompositeNameWindowPixmap(_ecore_x_disp, win);
@@ -131,14 +140,14 @@ ecore_x_composite_render_window_enable(Ecore_X_Window root)
    Ecore_X_Window win = 0;
 #ifdef ECORE_XCOMPOSITE
    XRectangle rect;
-   
+
    LOGFN(__FILE__, __LINE__, __FUNCTION__);
    win = XCompositeGetOverlayWindow(_ecore_x_disp, root);
    rect.x = -1;
    rect.y = -1;
    rect.width = 1;
    rect.height = 1;
-   XShapeCombineRectangles(_ecore_x_disp, win, ShapeInput, 0, 0, &rect, 1, 
+   XShapeCombineRectangles(_ecore_x_disp, win, ShapeInput, 0, 0, &rect, 1,
                            ShapeSet, Unsorted);
 #endif
    return win;
@@ -150,5 +159,5 @@ ecore_x_composite_render_window_disable(Ecore_X_Window root)
 #ifdef ECORE_XCOMPOSITE
    LOGFN(__FILE__, __LINE__, __FUNCTION__);
    XCompositeReleaseOverlayWindow(_ecore_x_disp, root);
-#endif   
+#endif
 }
index 82c50a0..0177282 100644 (file)
@@ -18,180 +18,192 @@ ecore_x_cursor_color_supported_get(void)
 }
 
 EAPI Ecore_X_Cursor
-ecore_x_cursor_new(Ecore_X_Window win, int *pixels, int w, int h, int hot_x, int hot_y)
+ecore_x_cursor_new(Ecore_X_Window win,
+                   int *pixels,
+                   int w,
+                   int h,
+                   int hot_x,
+                   int hot_y)
 {
 #ifdef ECORE_XCURSOR
    LOGFN(__FILE__, __LINE__, __FUNCTION__);
    if (_ecore_x_xcursor)
      {
-       Cursor c;
-       XcursorImage *xci;
-
-       xci = XcursorImageCreate(w, h);
-       if (xci)
-         {
-            int i;
-
-            xci->xhot = hot_x;
-            xci->yhot = hot_y;
-            xci->delay = 0;
-            for (i = 0; i < (w * h); i++)
-              {
+        Cursor c;
+        XcursorImage *xci;
+
+        xci = XcursorImageCreate(w, h);
+        if (xci)
+          {
+             int i;
+
+             xci->xhot = hot_x;
+             xci->yhot = hot_y;
+             xci->delay = 0;
+             for (i = 0; i < (w * h); i++)
+               {
 //               int r, g, b, a;
 //
 //               a = (pixels[i] >> 24) & 0xff;
 //               r = (((pixels[i] >> 16) & 0xff) * a) / 0xff;
 //               g = (((pixels[i] >> 8 ) & 0xff) * a) / 0xff;
 //               b = (((pixels[i]      ) & 0xff) * a) / 0xff;
-                 xci->pixels[i] = pixels[i];
+                  xci->pixels[i] = pixels[i];
 //                 (a << 24) | (r << 16) | (g << 8) | (b);
-              }
-            c = XcursorImageLoadCursor(_ecore_x_disp, xci);
-            XcursorImageDestroy(xci);
-            return c;
-         }
+               }
+             c = XcursorImageLoadCursor(_ecore_x_disp, xci);
+             XcursorImageDestroy(xci);
+             return c;
+          }
      }
    else
 #endif
-     {
-       XColor c1, c2;
-       Cursor c;
-       Pixmap pmap, mask;
-       GC gc;
-       XGCValues gcv;
-       XImage *xim;
-       unsigned int *pix;
-       int fr, fg, fb, br, bg, bb;
-       int brightest = 0;
-       int darkest = 255 * 3;
-       int x, y;
-       const int dither[2][2] =
-         {
-              {0, 2},
-              {3, 1}
-         };
-
-       pmap = XCreatePixmap(_ecore_x_disp, win, w, h, 1);
-       mask = XCreatePixmap(_ecore_x_disp, win, w, h, 1);
-       xim = XCreateImage(_ecore_x_disp,
-                          DefaultVisual(_ecore_x_disp, 0),
-                          1, ZPixmap, 0, NULL, w, h, 32, 0);
-       xim->data = malloc(xim->bytes_per_line * xim->height);
-
-       fr = 0x00; fg = 0x00; fb = 0x00;
-       br = 0xff; bg = 0xff; bb = 0xff;
-       pix = (unsigned int*)pixels;
-       for (y = 0; y < h; y++)
-         {
-            for (x = 0; x < w; x++)
-              {
-                 int r, g, b, a;
-
-                 a = (pix[0] >> 24) & 0xff;
-                 r = (pix[0] >> 16) & 0xff;
-                 g = (pix[0] >> 8 ) & 0xff;
-                 b = (pix[0]      ) & 0xff;
-                 if (a > 0)
-                   {
-                      if ((r + g + b) > brightest)
-                        {
-                           brightest = r + g + b;
-                           br = r;
-                           bg = g;
-                           bb = b;
-                        }
-                      if ((r + g + b) < darkest)
-                        {
-                           darkest = r + g + b;
-                           fr = r;
-                           fg = g;
-                           fb = b;
-                        }
-                   }
-                 pix++;
-              }
-         }
-
-       pix = (unsigned int*)pixels;
-       for (y = 0; y < h; y++)
-         {
-            for (x = 0; x < w; x++)
-              {
-                 int v;
-                 int r, g, b;
-                 int d1, d2;
-
-                 r = (pix[0] >> 16) & 0xff;
-                 g = (pix[0] >> 8 ) & 0xff;
-                 b = (pix[0]      ) & 0xff;
-                 d1 =
-                   ((r - fr) * (r - fr)) +
-                   ((g - fg) * (g - fg)) +
-                   ((b - fb) * (b - fb));
-                 d2 =
-                   ((r - br) * (r - br)) +
-                   ((g - bg) * (g - bg)) +
-                   ((b - bb) * (b - bb));
-                 if (d1 + d2)
-                   {
-                      v = (((d2 * 255) / (d1 + d2)) * 5) / 256;
-                      if (v > dither[x & 0x1][y & 0x1]) v = 1;
-                      else v = 0;
-                   }
-                 else
-                   {
-                      v = 0;
-                   }
-                 XPutPixel(xim, x, y, v);
-                 pix++;
-              }
-         }
-       gc = XCreateGC(_ecore_x_disp, pmap, 0, &gcv);
-       XPutImage(_ecore_x_disp, pmap, gc, xim, 0, 0, 0, 0, w, h);
-       XFreeGC(_ecore_x_disp, gc);
-
-       pix = (unsigned int*)pixels;
-       for (y = 0; y < h; y++)
-         {
-            for (x = 0; x < w; x++)
-              {
-                 int v;
-
-                 v = (((pix[0] >> 24) & 0xff) * 5) / 256;
-                 if (v > dither[x & 0x1][y & 0x1]) v = 1;
-                 else v = 0;
-                 XPutPixel(xim, x, y, v);
-                 pix++;
-              }
-         }
-       gc = XCreateGC(_ecore_x_disp, mask, 0, &gcv);
-       XPutImage(_ecore_x_disp, mask, gc, xim, 0, 0, 0, 0, w, h);
-       XFreeGC(_ecore_x_disp, gc);
-
-       free(xim->data);
-       xim->data = NULL;
-       XDestroyImage(xim);
-
-       c1.pixel = 0;
-       c1.red   = fr << 8 | fr;
-       c1.green = fg << 8 | fg;
-       c1.blue  = fb << 8 | fb;
-       c1.flags = DoRed | DoGreen | DoBlue;
-
-       c2.pixel = 0;
-       c2.red   = br << 8 | br;
-       c2.green = bg << 8 | bg;
-       c2.blue  = bb << 8 | bb;
-       c2.flags = DoRed | DoGreen | DoBlue;
-
-       c = XCreatePixmapCursor(_ecore_x_disp,
-                               pmap, mask,
-                               &c1, &c2,
-                               hot_x, hot_y);
-       XFreePixmap(_ecore_x_disp, pmap);
-       XFreePixmap(_ecore_x_disp, mask);
-       return c;
-     }
+   {
+      XColor c1, c2;
+      Cursor c;
+      Pixmap pmap, mask;
+      GC gc;
+      XGCValues gcv;
+      XImage *xim;
+      unsigned int *pix;
+      int fr, fg, fb, br, bg, bb;
+      int brightest = 0;
+      int darkest = 255 * 3;
+      int x, y;
+      const int dither[2][2] =
+      {
+         {0, 2},
+         {3, 1}
+      };
+
+      pmap = XCreatePixmap(_ecore_x_disp, win, w, h, 1);
+      mask = XCreatePixmap(_ecore_x_disp, win, w, h, 1);
+      xim = XCreateImage(_ecore_x_disp,
+                         DefaultVisual(_ecore_x_disp, 0),
+                         1, ZPixmap, 0, NULL, w, h, 32, 0);
+      xim->data = malloc(xim->bytes_per_line * xim->height);
+
+      fr = 0x00; fg = 0x00; fb = 0x00;
+      br = 0xff; bg = 0xff; bb = 0xff;
+      pix = (unsigned int *)pixels;
+      for (y = 0; y < h; y++)
+        {
+           for (x = 0; x < w; x++)
+             {
+                int r, g, b, a;
+
+                a = (pix[0] >> 24) & 0xff;
+                r = (pix[0] >> 16) & 0xff;
+                g = (pix[0] >> 8) & 0xff;
+                b = (pix[0]) & 0xff;
+                if (a > 0)
+                  {
+                     if ((r + g + b) > brightest)
+                       {
+                          brightest = r + g + b;
+                          br = r;
+                          bg = g;
+                          bb = b;
+                       }
+
+                     if ((r + g + b) < darkest)
+                       {
+                          darkest = r + g + b;
+                          fr = r;
+                          fg = g;
+                          fb = b;
+                       }
+                  }
+
+                pix++;
+             }
+        }
+
+      pix = (unsigned int *)pixels;
+      for (y = 0; y < h; y++)
+        {
+           for (x = 0; x < w; x++)
+             {
+                int v;
+                int r, g, b;
+                int d1, d2;
+
+                r = (pix[0] >> 16) & 0xff;
+                g = (pix[0] >> 8) & 0xff;
+                b = (pix[0]) & 0xff;
+                d1 =
+                   ((r - fr) * (r - fr)) +
+                   ((g - fg) * (g - fg)) +
+                   ((b - fb) * (b - fb));
+                d2 =
+                   ((r - br) * (r - br)) +
+                   ((g - bg) * (g - bg)) +
+                   ((b - bb) * (b - bb));
+                if (d1 + d2)
+                  {
+                     v = (((d2 * 255) / (d1 + d2)) * 5) / 256;
+                     if (v > dither[x & 0x1][y & 0x1])
+                        v = 1;
+                     else
+                        v = 0;
+                  }
+                else
+                   v = 0;
+
+                XPutPixel(xim, x, y, v);
+                pix++;
+             }
+        }
+      gc = XCreateGC(_ecore_x_disp, pmap, 0, &gcv);
+      XPutImage(_ecore_x_disp, pmap, gc, xim, 0, 0, 0, 0, w, h);
+      XFreeGC(_ecore_x_disp, gc);
+
+      pix = (unsigned int *)pixels;
+      for (y = 0; y < h; y++)
+        {
+           for (x = 0; x < w; x++)
+             {
+                int v;
+
+                v = (((pix[0] >> 24) & 0xff) * 5) / 256;
+                if (v > dither[x & 0x1][y & 0x1])
+                   v = 1;
+                else
+                   v = 0;
+
+                XPutPixel(xim, x, y, v);
+                pix++;
+             }
+        }
+      gc = XCreateGC(_ecore_x_disp, mask, 0, &gcv);
+      XPutImage(_ecore_x_disp, mask, gc, xim, 0, 0, 0, 0, w, h);
+      XFreeGC(_ecore_x_disp, gc);
+
+      free(xim->data);
+      xim->data = NULL;
+      XDestroyImage(xim);
+
+      c1.pixel = 0;
+      c1.red = fr << 8 | fr;
+      c1.green = fg << 8 | fg;
+      c1.blue = fb << 8 | fb;
+      c1.flags = DoRed | DoGreen | DoBlue;
+
+      c2.pixel = 0;
+      c2.red = br << 8 | br;
+      c2.green = bg << 8 | bg;
+      c2.blue = bb << 8 | bb;
+      c2.flags = DoRed | DoGreen | DoBlue;
+
+      c = XCreatePixmapCursor(_ecore_x_disp,
+                              pmap, mask,
+                              &c1, &c2,
+                              hot_x, hot_y);
+      XFreePixmap(_ecore_x_disp, pmap);
+      XFreePixmap(_ecore_x_disp, mask);
+      return c;
+   }
+
    return 0;
 }
 
index 05695ec..b587eee 100644 (file)
@@ -24,9 +24,10 @@ _ecore_x_damage_init(void)
 
    LOGFN(__FILE__, __LINE__, __FUNCTION__);
    if (XDamageQueryVersion(_ecore_x_disp, &_damage_major, &_damage_minor))
-     _damage_available = 1;
+      _damage_available = 1;
    else
-     _damage_available = 0;
+      _damage_available = 0;
+
 #else
    _damage_available = 0;
 #endif
@@ -62,7 +63,9 @@ ecore_x_damage_free(Ecore_X_Damage damage)
 }
 
 EAPI void
-ecore_x_damage_subtract(Ecore_X_Damage damage, Ecore_X_Region repair, Ecore_X_Region parts)
+ecore_x_damage_subtract(Ecore_X_Damage damage,
+                        Ecore_X_Region repair,
+                        Ecore_X_Region parts)
 {
 #ifdef ECORE_XDAMAGE
    LOGFN(__FILE__, __LINE__, __FUNCTION__);
index ab22044..900e8a1 100644 (file)
@@ -38,24 +38,24 @@ _ecore_x_dnd_init(void)
 {
    if (!_ecore_x_dnd_init_count)
      {
-       _source = calloc(1, sizeof(Ecore_X_DND_Source));
-       _source->version = ECORE_X_DND_VERSION;
-       _source->win = None;
-       _source->dest = None;
-       _source->state = ECORE_X_DND_SOURCE_IDLE;
-       _source->prev.window = 0;
-
-       _target = calloc(1, sizeof(Ecore_X_DND_Target));
-       _target->win = None;
-       _target->source = None;
-       _target->state = ECORE_X_DND_TARGET_IDLE;
-       
-       ECORE_X_EVENT_XDND_ENTER              = ecore_event_type_new();
-       ECORE_X_EVENT_XDND_POSITION           = ecore_event_type_new();
-       ECORE_X_EVENT_XDND_STATUS             = ecore_event_type_new();
-       ECORE_X_EVENT_XDND_LEAVE              = ecore_event_type_new();
-       ECORE_X_EVENT_XDND_DROP               = ecore_event_type_new();
-       ECORE_X_EVENT_XDND_FINISHED           = ecore_event_type_new();
+        _source = calloc(1, sizeof(Ecore_X_DND_Source));
+        _source->version = ECORE_X_DND_VERSION;
+        _source->win = None;
+        _source->dest = None;
+        _source->state = ECORE_X_DND_SOURCE_IDLE;
+        _source->prev.window = 0;
+
+        _target = calloc(1, sizeof(Ecore_X_DND_Target));
+        _target->win = None;
+        _target->source = None;
+        _target->state = ECORE_X_DND_TARGET_IDLE;
+
+        ECORE_X_EVENT_XDND_ENTER = ecore_event_type_new();
+        ECORE_X_EVENT_XDND_POSITION = ecore_event_type_new();
+        ECORE_X_EVENT_XDND_STATUS = ecore_event_type_new();
+        ECORE_X_EVENT_XDND_LEAVE = ecore_event_type_new();
+        ECORE_X_EVENT_XDND_DROP = ecore_event_type_new();
+        ECORE_X_EVENT_XDND_FINISHED = ecore_event_type_new();
      }
 
    _ecore_x_dnd_init_count++;
@@ -66,47 +66,58 @@ _ecore_x_dnd_shutdown(void)
 {
    _ecore_x_dnd_init_count--;
    if (_ecore_x_dnd_init_count > 0)
-     return;
+      return;
 
    if (_source)
-     free(_source);
+      free(_source);
+
    _source = NULL;
 
    if (_target)
-     free(_target);
+      free(_target);
+
    _target = NULL;
 
    _ecore_x_dnd_init_count = 0;
 }
 
 static int
-_ecore_x_dnd_converter_copy(char *target __UNUSED__, void *data, int size, void **data_ret, int *size_ret, Ecore_X_Atom *tprop, int *count)
+_ecore_x_dnd_converter_copy(char *target __UNUSED__,
+                            void *data,
+                            int size,
+                            void **data_ret,
+                            int *size_ret,
+                            Ecore_X_Atom *tprop,
+                            int *count)
 {
    XTextProperty text_prop;
    char *mystr;
    XICCEncodingStyle style = XTextStyle;
 
    if (!data || !size)
-     return 0;
+      return 0;
 
    mystr = calloc(1, size + 1);
-   if (!mystr) return 0;
-   memcpy(mystr, data, size);
+   if (!mystr)
+      return 0;
 
-   if (XmbTextListToTextProperty(_ecore_x_disp, &mystr, 1, style, &text_prop) == Success)
+        memcpy(mystr, data, size);
+
+   if (XmbTextListToTextProperty(_ecore_x_disp, &mystr, 1, style,
+                                 &text_prop) == Success)
      {
-       int bufsize = strlen((char *)text_prop.value) + 1;
-       *data_ret = malloc(bufsize);
-       memcpy(*data_ret, text_prop.value, bufsize);
-       *size_ret = bufsize;
-       XFree(text_prop.value);
-       free(mystr);
-       return 1;
+        int bufsize = strlen((char *)text_prop.value) + 1;
+        *data_ret = malloc(bufsize);
+        memcpy(*data_ret, text_prop.value, bufsize);
+        *size_ret = bufsize;
+        XFree(text_prop.value);
+        free(mystr);
+        return 1;
      }
    else
      {
-       free(mystr);
-       return 0;
+        free(mystr);
+        return 0;
      }
 }
 
@@ -117,10 +128,10 @@ ecore_x_dnd_aware_set(Ecore_X_Window win, int on)
 
    LOGFN(__FILE__, __LINE__, __FUNCTION__);
    if (on)
-     ecore_x_window_prop_property_set(win, ECORE_X_ATOM_XDND_AWARE,
-                                     XA_ATOM, 32, &prop_data, 1);
+      ecore_x_window_prop_property_set(win, ECORE_X_ATOM_XDND_AWARE,
+                                       XA_ATOM, 32, &prop_data, 1);
    else
-     ecore_x_window_prop_property_del(win, ECORE_X_ATOM_XDND_AWARE);
+      ecore_x_window_prop_property_del(win, ECORE_X_ATOM_XDND_AWARE);
 }
 
 EAPI int
@@ -135,69 +146,76 @@ ecore_x_dnd_version_get(Ecore_X_Window win)
    // move and going to and from x multiple times per move is EXPENSIVE
    // and slows things down, puts lots of load on x etc.
    if (_source->state == ECORE_X_DND_SOURCE_DRAGGING)
-     {
-       if (_version_cache)
-         {
-            int i;
-            
-            for (i = 0; i < _version_cache_num; i++)
-              {
-                 if (_version_cache[i].win == win)
-                   return _version_cache[i].ver;
-              }
-         }
-     }
-     
+      if (_version_cache)
+        {
+           int i;
+
+           for (i = 0; i < _version_cache_num; i++)
+             {
+                if (_version_cache[i].win == win)
+                   return _version_cache[i].ver;
+             }
+        }
+
    if (ecore_x_window_prop_property_get(win, ECORE_X_ATOM_XDND_AWARE,
                                         XA_ATOM, 32, &prop_data, &num))
      {
-       int version = (int) *prop_data;
-       free(prop_data);
-       if (_source->state == ECORE_X_DND_SOURCE_DRAGGING)
-         {
-            _version_cache_num++;
-            if (_version_cache_num > _version_cache_alloc)
-              _version_cache_alloc += 16;
-            _version_cache = realloc(_version_cache, _version_cache_alloc * sizeof(Version_Cache_Item));
-            _version_cache[_version_cache_num - 1].win = win;
-            _version_cache[_version_cache_num - 1].ver = version;
-         }
-       return version;
+        int version = (int)*prop_data;
+        free(prop_data);
+        if (_source->state == ECORE_X_DND_SOURCE_DRAGGING)
+          {
+             _version_cache_num++;
+             if (_version_cache_num > _version_cache_alloc)
+                _version_cache_alloc += 16;
+
+             _version_cache = realloc(_version_cache,
+                                      _version_cache_alloc *
+                                      sizeof(Version_Cache_Item));
+             _version_cache[_version_cache_num - 1].win = win;
+             _version_cache[_version_cache_num - 1].ver = version;
+          }
+
+        return version;
      }
+
    if (_source->state == ECORE_X_DND_SOURCE_DRAGGING)
      {
-       _version_cache_num++;
-       if (_version_cache_num > _version_cache_alloc)
-         _version_cache_alloc += 16;
-       _version_cache = realloc(_version_cache, _version_cache_alloc * sizeof(Version_Cache_Item));
-       _version_cache[_version_cache_num - 1].win = win;
-       _version_cache[_version_cache_num - 1].ver = 0;
+        _version_cache_num++;
+        if (_version_cache_num > _version_cache_alloc)
+           _version_cache_alloc += 16;
+
+        _version_cache =
+           realloc(_version_cache, _version_cache_alloc *
+                   sizeof(Version_Cache_Item));
+        _version_cache[_version_cache_num - 1].win = win;
+        _version_cache[_version_cache_num - 1].ver = 0;
      }
+
    return 0;
 }
 
 EAPI int
 ecore_x_dnd_type_isset(Ecore_X_Window win, const char *type)
 {
-   int                  num, i, ret = 0;
-   unsigned char       *data;
-   Ecore_X_Atom        *atoms, atom;
+   int num, i, ret = 0;
+   unsigned char *data;
+   Ecore_X_Atom *atoms, atom;
 
    LOGFN(__FILE__, __LINE__, __FUNCTION__);
    if (!ecore_x_window_prop_property_get(win, ECORE_X_ATOM_XDND_TYPE_LIST,
-                                        XA_ATOM, 32, &data, &num))
-     return ret;
+                                         XA_ATOM, 32, &data, &num))
+      return ret;
 
    atom = ecore_x_atom_get(type);
    atoms = (Ecore_X_Atom *)data;
 
    for (i = 0; i < num; ++i)
      {
-       if (atom == atoms[i])
-         {
-            ret = 1;
-            break;
-         }
+        if (atom == atoms[i])
+          {
+             ret = 1;
+             break;
+          }
      }
 
    XFree(data);
@@ -207,11 +225,11 @@ ecore_x_dnd_type_isset(Ecore_X_Window win, const char *type)
 EAPI void
 ecore_x_dnd_type_set(Ecore_X_Window win, const char *type, int on)
 {
-   Ecore_X_Atom      atom;
-   Ecore_X_Atom      *oldset = NULL, *newset = NULL;
-   int               i, j = 0, num = 0;
-   unsigned char     *data = NULL;
-   unsigned char     *old_data = NULL;
+   Ecore_X_Atom atom;
+   Ecore_X_Atom *oldset = NULL, *newset = NULL;
+   int i, j = 0, num = 0;
+   unsigned char *data = NULL;
+   unsigned char *old_data = NULL;
 
    LOGFN(__FILE__, __LINE__, __FUNCTION__);
    atom = ecore_x_atom_get(type);
@@ -222,96 +240,106 @@ ecore_x_dnd_type_set(Ecore_X_Window win, const char *type, int on)
    LOGFN(__FILE__, __LINE__, __FUNCTION__);
    if (on)
      {
-       if (ecore_x_dnd_type_isset(win, type))
-         {
-            XFree(old_data);
-            return;
-         }
-       newset = calloc(num + 1, sizeof(Ecore_X_Atom));
-       if (!newset) return;
-       data = (unsigned char *)newset;
-
-       for (i = 0; i < num; i++)
-         newset[i + 1] = oldset[i];
-       /* prepend the new type */
-       newset[0] = atom;
-
-       ecore_x_window_prop_property_set(win, ECORE_X_ATOM_XDND_TYPE_LIST,
-                                        XA_ATOM, 32, data, num + 1);
+        if (ecore_x_dnd_type_isset(win, type))
+          {
+             XFree(old_data);
+             return;
+          }
+
+        newset = calloc(num + 1, sizeof(Ecore_X_Atom));
+        if (!newset)
+           return;
+
+        data = (unsigned char *)newset;
+
+        for (i = 0; i < num; i++)
+           newset[i + 1] = oldset[i];
+        /* prepend the new type */
+        newset[0] = atom;
+
+        ecore_x_window_prop_property_set(win, ECORE_X_ATOM_XDND_TYPE_LIST,
+                                         XA_ATOM, 32, data, num + 1);
      }
    else
      {
-       if (!ecore_x_dnd_type_isset(win, type))
-         {
-            XFree(old_data);
-            return;
-         }
-       newset = calloc(num - 1, sizeof(Ecore_X_Atom));
-       if (!newset)
-         {
-            XFree(old_data);
-            return;
-         }
-       data = (unsigned char *)newset;
-       for (i = 0; i < num; i++)
-         if (oldset[i] != atom)
-           newset[j++] = oldset[i];
-
-       ecore_x_window_prop_property_set(win, ECORE_X_ATOM_XDND_TYPE_LIST,
-                                        XA_ATOM, 32, data, num - 1);
+        if (!ecore_x_dnd_type_isset(win, type))
+          {
+             XFree(old_data);
+             return;
+          }
+
+        newset = calloc(num - 1, sizeof(Ecore_X_Atom));
+        if (!newset)
+          {
+             XFree(old_data);
+             return;
+          }
+
+        data = (unsigned char *)newset;
+        for (i = 0; i < num; i++)
+           if (oldset[i] != atom)
+              newset[j++] = oldset[i];
+
+        ecore_x_window_prop_property_set(win, ECORE_X_ATOM_XDND_TYPE_LIST,
+                                         XA_ATOM, 32, data, num - 1);
      }
+
    XFree(oldset);
    free(newset);
 }
 
 EAPI void
-ecore_x_dnd_types_set(Ecore_X_Window win, const char **types, unsigned int num_types)
+ecore_x_dnd_types_set(Ecore_X_Window win,
+                      const char **types,
+                      unsigned int num_types)
 {
-   Ecore_X_Atom      *newset = NULL;
-   unsigned int      i;
-   unsigned char     *data = NULL;
+   Ecore_X_Atom *newset = NULL;
+   unsigned int i;
+   unsigned char *data = NULL;
 
    LOGFN(__FILE__, __LINE__, __FUNCTION__);
    if (!num_types)
-     {
-       ecore_x_window_prop_property_del(win, ECORE_X_ATOM_XDND_TYPE_LIST);
-     }
+      ecore_x_window_prop_property_del(win, ECORE_X_ATOM_XDND_TYPE_LIST);
    else
      {
-       newset = calloc(num_types, sizeof(Ecore_X_Atom));
-       if (!newset) return;
-       data = (unsigned char *)newset;
-       for (i = 0; i < num_types; i++)
-         {
-            newset[i] = ecore_x_atom_get(types[i]);
-            ecore_x_selection_converter_atom_add(newset[i], _ecore_x_dnd_converter_copy);
-         }
-       ecore_x_window_prop_property_set(win, ECORE_X_ATOM_XDND_TYPE_LIST,
-                                        XA_ATOM, 32, data, num_types);
-       free(newset);
+        newset = calloc(num_types, sizeof(Ecore_X_Atom));
+        if (!newset)
+           return;
+
+        data = (unsigned char *)newset;
+        for (i = 0; i < num_types; i++)
+          {
+             newset[i] = ecore_x_atom_get(types[i]);
+             ecore_x_selection_converter_atom_add(newset[i],
+                                                  _ecore_x_dnd_converter_copy);
+          }
+        ecore_x_window_prop_property_set(win, ECORE_X_ATOM_XDND_TYPE_LIST,
+                                         XA_ATOM, 32, data, num_types);
+        free(newset);
      }
 }
 
 EAPI void
-ecore_x_dnd_actions_set(Ecore_X_Window win, Ecore_X_Atom *actions, unsigned int num_actions)
+ecore_x_dnd_actions_set(Ecore_X_Window win,
+                        Ecore_X_Atom *actions,
+                        unsigned int num_actions)
 {
-   unsigned int      i;
-   unsigned char     *data = NULL;
+   unsigned int i;
+   unsigned char *data = NULL;
 
    LOGFN(__FILE__, __LINE__, __FUNCTION__);
    if (!num_actions)
-     {
-       ecore_x_window_prop_property_del(win, ECORE_X_ATOM_XDND_ACTION_LIST);
-     }
+      ecore_x_window_prop_property_del(win, ECORE_X_ATOM_XDND_ACTION_LIST);
    else
      {
-       data = (unsigned char *)actions;
-       for (i = 0; i < num_actions; i++)
-         {
-            ecore_x_selection_converter_atom_add(actions[i], _ecore_x_dnd_converter_copy);
-         }
-       ecore_x_window_prop_property_set(win, ECORE_X_ATOM_XDND_ACTION_LIST,
-                                        XA_ATOM, 32, data, num_actions);
+        data = (unsigned char *)actions;
+        for (i = 0; i < num_actions; i++)
+          {
+             ecore_x_selection_converter_atom_add(actions[i],
+                                                  _ecore_x_dnd_converter_copy);
+          }
+        ecore_x_window_prop_property_set(win, ECORE_X_ATOM_XDND_ACTION_LIST,
+                                         XA_ATOM, 32, data, num_actions);
      }
 }
 
@@ -333,21 +361,22 @@ ecore_x_dnd_begin(Ecore_X_Window source, unsigned char *data, int size)
 
    LOGFN(__FILE__, __LINE__, __FUNCTION__);
    if (!ecore_x_dnd_version_get(source))
-     return 0;
+      return 0;
 
    /* Take ownership of XdndSelection */
    if (!ecore_x_selection_xdnd_set(source, data, size))
-     return 0;
+      return 0;
 
    if (_version_cache)
      {
-       free(_version_cache);
-       _version_cache = NULL;
-       _version_cache_num = 0;
-       _version_cache_alloc = 0;
+        free(_version_cache);
+        _version_cache = NULL;
+        _version_cache_num = 0;
+        _version_cache_alloc = 0;
      }
+
    ecore_x_window_shadow_tree_flush();
-   
+
    _source->win = source;
    ecore_x_window_ignore_set(_source->win, 1);
    _source->state = ECORE_X_DND_SOURCE_DRAGGING;
@@ -371,36 +400,37 @@ ecore_x_dnd_drop(void)
    LOGFN(__FILE__, __LINE__, __FUNCTION__);
    if (_source->dest)
      {
-       xev.xany.type = ClientMessage;
-       xev.xany.display = _ecore_x_disp;
-       xev.xclient.format = 32;
-       xev.xclient.window = _source->dest;
-
-       if (_source->will_accept)
-         {
-            xev.xclient.message_type = ECORE_X_ATOM_XDND_DROP;
-            xev.xclient.data.l[0] = _source->win;
-            xev.xclient.data.l[1] = 0;
-            xev.xclient.data.l[2] = _source->time;
-            XSendEvent(_ecore_x_disp, _source->dest, False, 0, &xev);
-            _source->state = ECORE_X_DND_SOURCE_DROPPED;
-            status = 1;
-         }
-       else
-         {
-            xev.xclient.message_type = ECORE_X_ATOM_XDND_LEAVE;
-            xev.xclient.data.l[0] = _source->win;
-            xev.xclient.data.l[1] = 0;
-            XSendEvent(_ecore_x_disp, _source->dest, False, 0, &xev);
-            _source->state = ECORE_X_DND_SOURCE_IDLE;
-         }
+        xev.xany.type = ClientMessage;
+        xev.xany.display = _ecore_x_disp;
+        xev.xclient.format = 32;
+        xev.xclient.window = _source->dest;
+
+        if (_source->will_accept)
+          {
+             xev.xclient.message_type = ECORE_X_ATOM_XDND_DROP;
+             xev.xclient.data.l[0] = _source->win;
+             xev.xclient.data.l[1] = 0;
+             xev.xclient.data.l[2] = _source->time;
+             XSendEvent(_ecore_x_disp, _source->dest, False, 0, &xev);
+             _source->state = ECORE_X_DND_SOURCE_DROPPED;
+             status = 1;
+          }
+        else
+          {
+             xev.xclient.message_type = ECORE_X_ATOM_XDND_LEAVE;
+             xev.xclient.data.l[0] = _source->win;
+             xev.xclient.data.l[1] = 0;
+             XSendEvent(_ecore_x_disp, _source->dest, False, 0, &xev);
+             _source->state = ECORE_X_DND_SOURCE_IDLE;
+          }
      }
    else
      {
-       /* Dropping on nothing */
-       ecore_x_selection_xdnd_clear();
-       _source->state = ECORE_X_DND_SOURCE_IDLE;
+        /* Dropping on nothing */
+        ecore_x_selection_xdnd_clear();
+        _source->state = ECORE_X_DND_SOURCE_IDLE;
      }
+
    ecore_x_window_ignore_set(_source->win, 0);
 
    _source->prev.window = 0;
@@ -409,12 +439,15 @@ ecore_x_dnd_drop(void)
 }
 
 EAPI void
-ecore_x_dnd_send_status(int will_accept, int suppress, Ecore_X_Rectangle rectangle, Ecore_X_Atom action)
+ecore_x_dnd_send_status(int will_accept,
+                        int suppress,
+                        Ecore_X_Rectangle rectangle,
+                        Ecore_X_Atom action)
 {
    XEvent xev;
 
    if (_target->state == ECORE_X_DND_TARGET_IDLE)
-     return;
+      return;
 
    LOGFN(__FILE__, __LINE__, __FUNCTION__);
    memset(&xev, 0, sizeof(XEvent));
@@ -430,9 +463,10 @@ ecore_x_dnd_send_status(int will_accept, int suppress, Ecore_X_Rectangle rectang
    xev.xclient.data.l[0] = _target->win;
    xev.xclient.data.l[1] = 0;
    if (will_accept)
-     xev.xclient.data.l[1] |= 0x1UL;
+      xev.xclient.data.l[1] |= 0x1UL;
+
    if (!suppress)
-     xev.xclient.data.l[1] |= 0x2UL;
+      xev.xclient.data.l[1] |= 0x2UL;
 
    /* Set rectangle information */
    xev.xclient.data.l[2] = rectangle.x;
@@ -444,13 +478,13 @@ ecore_x_dnd_send_status(int will_accept, int suppress, Ecore_X_Rectangle rectang
 
    if (will_accept)
      {
-       xev.xclient.data.l[4] = action;
-       _target->accepted_action = action;
+        xev.xclient.data.l[4] = action;
+        _target->accepted_action = action;
      }
    else
      {
-       xev.xclient.data.l[4] = None;
-       _target->accepted_action = action;
+        xev.xclient.data.l[4] = None;
+        _target->accepted_action = action;
      }
 
    XSendEvent(_ecore_x_disp, _target->source, False, 0, &xev);
@@ -459,10 +493,10 @@ ecore_x_dnd_send_status(int will_accept, int suppress, Ecore_X_Rectangle rectang
 EAPI void
 ecore_x_dnd_send_finished(void)
 {
-   XEvent   xev;
+   XEvent xev;
 
    if (_target->state == ECORE_X_DND_TARGET_IDLE)
-     return;
+      return;
 
    LOGFN(__FILE__, __LINE__, __FUNCTION__);
    xev.xany.type = ClientMessage;
@@ -476,9 +510,10 @@ ecore_x_dnd_send_finished(void)
    xev.xclient.data.l[2] = 0;
    if (_target->will_accept)
      {
-       xev.xclient.data.l[1] |= 0x1UL;
-       xev.xclient.data.l[2] = _target->accepted_action;
+        xev.xclient.data.l[1] |= 0x1UL;
+        xev.xclient.data.l[2] = _target->accepted_action;
      }
+
    XSendEvent(_ecore_x_disp, _target->source, False, 0, &xev);
 
    _target->state = ECORE_X_DND_TARGET_IDLE;
@@ -489,7 +524,7 @@ ecore_x_dnd_source_action_set(Ecore_X_Atom action)
 {
    _source->action = action;
    if (_source->prev.window)
-     _ecore_x_dnd_drag(_source->prev.window, _source->prev.x, _source->prev.y);
+      _ecore_x_dnd_drag(_source->prev.window, _source->prev.x, _source->prev.y);
 }
 
 Ecore_X_Atom
@@ -501,13 +536,13 @@ ecore_x_dnd_source_action_get(void)
 void
 _ecore_x_dnd_drag(Ecore_X_Window root, int x, int y)
 {
-   XEvent          xev;
-   Ecore_X_Window  win;
+   XEvent xev;
+   Ecore_X_Window win;
    Ecore_X_Window *skip;
-   int             num;
+   int num;
 
    if (_source->state != ECORE_X_DND_SOURCE_DRAGGING)
-     return;
+      return;
 
    /* Preinitialize XEvent struct */
    memset(&xev, 0, sizeof(XEvent));
@@ -527,78 +562,83 @@ _ecore_x_dnd_drag(Ecore_X_Window root, int x, int y)
 //   while ((win) && !(ecore_x_dnd_version_get(win)))
 //     win = ecore_x_window_parent_get(win);
    while ((win) && !(ecore_x_dnd_version_get(win)))
-     win = ecore_x_window_shadow_parent_get(root, win);
+      win = ecore_x_window_shadow_parent_get(root, win);
 
    /* Send XdndLeave to current destination window if we have left it */
    if ((_source->dest) && (win != _source->dest))
      {
-       xev.xclient.window = _source->dest;
-       xev.xclient.message_type = ECORE_X_ATOM_XDND_LEAVE;
-       xev.xclient.data.l[0] = _source->win;
-       xev.xclient.data.l[1] = 0;
+        xev.xclient.window = _source->dest;
+        xev.xclient.message_type = ECORE_X_ATOM_XDND_LEAVE;
+        xev.xclient.data.l[0] = _source->win;
+        xev.xclient.data.l[1] = 0;
 
-       XSendEvent(_ecore_x_disp, _source->dest, False, 0, &xev);
-       _source->suppress = 0;
+        XSendEvent(_ecore_x_disp, _source->dest, False, 0, &xev);
+        _source->suppress = 0;
      }
 
    if (win)
      {
-       int x1, x2, y1, y2;
-
-       _source->version = MIN(ECORE_X_DND_VERSION,
-                            ecore_x_dnd_version_get(win));
-       if (win != _source->dest)
-         {
-            int i;
-            unsigned char *data;
-            Ecore_X_Atom *types;
-
-            ecore_x_window_prop_property_get(_source->win, ECORE_X_ATOM_XDND_TYPE_LIST,
-                                             XA_ATOM, 32, &data, &num);
-            types = (Ecore_X_Atom *)data;
-
-            /* Entered new window, send XdndEnter */
-            xev.xclient.window = win;
-            xev.xclient.message_type = ECORE_X_ATOM_XDND_ENTER;
-            xev.xclient.data.l[0] = _source->win;
-            xev.xclient.data.l[1] = 0;
-            if (num > 3)
-              xev.xclient.data.l[1] |= 0x1UL;
-            else
-              xev.xclient.data.l[1] &= 0xfffffffeUL;
-            xev.xclient.data.l[1] |= ((unsigned long) _source->version) << 24;
-
-            for (i = 2; i < 5; i++)
-              xev.xclient.data.l[i] = 0;
-            for (i = 0; i < MIN(num, 3); ++i)
-              xev.xclient.data.l[i + 2] = types[i];
-            XFree(data);
-            XSendEvent(_ecore_x_disp, win, False, 0, &xev);
-            _source->await_status = 0;
-            _source->will_accept = 0;
-         }
-
-       /* Determine if we're still in the rectangle from the last status */
-       x1 = _source->rectangle.x;
-       x2 = _source->rectangle.x + _source->rectangle.width;
-       y1 = _source->rectangle.y;
-       y2 = _source->rectangle.y + _source->rectangle.height;
-
-       if ((!_source->await_status) ||
-           (!_source->suppress) ||
-           ((x < x1) || (x > x2) || (y < y1) || (y > y2)))
-         {
-            xev.xclient.window = win;
-            xev.xclient.message_type = ECORE_X_ATOM_XDND_POSITION;
-            xev.xclient.data.l[0] = _source->win;
-            xev.xclient.data.l[1] = 0; /* Reserved */
-            xev.xclient.data.l[2] = ((x << 16) & 0xffff0000) | (y & 0xffff);
-            xev.xclient.data.l[3] = _source->time; /* Version 1 */
-            xev.xclient.data.l[4] = _source->action; /* Version 2, Needs to be pre-set */
-            XSendEvent(_ecore_x_disp, win, False, 0, &xev);
-
-            _source->await_status = 1; 
-         }
+        int x1, x2, y1, y2;
+
+        _source->version = MIN(ECORE_X_DND_VERSION,
+                               ecore_x_dnd_version_get(win));
+        if (win != _source->dest)
+          {
+             int i;
+             unsigned char *data;
+             Ecore_X_Atom *types;
+
+             ecore_x_window_prop_property_get(_source->win,
+                                              ECORE_X_ATOM_XDND_TYPE_LIST,
+                                              XA_ATOM,
+                                              32,
+                                              &data,
+                                              &num);
+             types = (Ecore_X_Atom *)data;
+
+             /* Entered new window, send XdndEnter */
+             xev.xclient.window = win;
+             xev.xclient.message_type = ECORE_X_ATOM_XDND_ENTER;
+             xev.xclient.data.l[0] = _source->win;
+             xev.xclient.data.l[1] = 0;
+             if (num > 3)
+                xev.xclient.data.l[1] |= 0x1UL;
+             else
+                xev.xclient.data.l[1] &= 0xfffffffeUL;
+
+             xev.xclient.data.l[1] |= ((unsigned long)_source->version) << 24;
+
+             for (i = 2; i < 5; i++)
+                xev.xclient.data.l[i] = 0;
+             for (i = 0; i < MIN(num, 3); ++i)
+                xev.xclient.data.l[i + 2] = types[i];
+             XFree(data);
+             XSendEvent(_ecore_x_disp, win, False, 0, &xev);
+             _source->await_status = 0;
+             _source->will_accept = 0;
+          }
+
+        /* Determine if we're still in the rectangle from the last status */
+        x1 = _source->rectangle.x;
+        x2 = _source->rectangle.x + _source->rectangle.width;
+        y1 = _source->rectangle.y;
+        y2 = _source->rectangle.y + _source->rectangle.height;
+
+        if ((!_source->await_status) ||
+            (!_source->suppress) ||
+            ((x < x1) || (x > x2) || (y < y1) || (y > y2)))
+          {
+             xev.xclient.window = win;
+             xev.xclient.message_type = ECORE_X_ATOM_XDND_POSITION;
+             xev.xclient.data.l[0] = _source->win;
+             xev.xclient.data.l[1] = 0; /* Reserved */
+             xev.xclient.data.l[2] = ((x << 16) & 0xffff0000) | (y & 0xffff);
+             xev.xclient.data.l[3] = _source->time; /* Version 1 */
+             xev.xclient.data.l[4] = _source->action; /* Version 2, Needs to be pre-set */
+             XSendEvent(_ecore_x_disp, win, False, 0, &xev);
+
+             _source->await_status = 1;
+          }
      }
 
    _source->prev.x = x;
index 3b15dbc..6660842 100644 (file)
@@ -20,9 +20,10 @@ _ecore_x_dpms_init(void)
    _dpms_minor = 0;
 
    if (DPMSGetVersion(_ecore_x_disp, &_dpms_major, &_dpms_minor))
-     _dpms_available = 1;
+      _dpms_available = 1;
    else
-     _dpms_available = 0;
+      _dpms_available = 0;
+
 #else
    _dpms_available = 0;
 #endif
@@ -92,9 +93,10 @@ ecore_x_dpms_enabled_set(int enabled)
 #ifdef ECORE_XDPMS
    LOGFN(__FILE__, __LINE__, __FUNCTION__);
    if (enabled)
-     DPMSEnable(_ecore_x_disp);
+      DPMSEnable(_ecore_x_disp);
    else
-     DPMSDisable(_ecore_x_disp);
+      DPMSDisable(_ecore_x_disp);
+
 #endif
 }
 
@@ -106,12 +108,14 @@ ecore_x_dpms_enabled_set(int enabled)
  * @ingroup Ecore_X_DPMS_Group
  */
 EAPI void
-ecore_x_dpms_timeouts_get(unsigned int *standby, unsigned int *suspend, unsigned int *off)
+ecore_x_dpms_timeouts_get(unsigned int *standby,
+                          unsigned int *suspend,
+                          unsigned int *off)
 {
 #ifdef ECORE_XDPMS
    LOGFN(__FILE__, __LINE__, __FUNCTION__);
-   DPMSGetTimeouts(_ecore_x_disp, (unsigned short *)standby, 
-                  (unsigned short *)suspend, (unsigned short *)off);
+   DPMSGetTimeouts(_ecore_x_disp, (unsigned short *)standby,
+                   (unsigned short *)suspend, (unsigned short *)off);
 #endif
 }
 
@@ -123,7 +127,9 @@ ecore_x_dpms_timeouts_get(unsigned int *standby, unsigned int *suspend, unsigned
  * @ingroup Ecore_X_DPMS_Group
  */
 EAPI int
-ecore_x_dpms_timeouts_set(unsigned int standby, unsigned int suspend, unsigned int off)
+ecore_x_dpms_timeouts_set(unsigned int standby,
+                          unsigned int suspend,
+                          unsigned int off)
 {
 #ifdef ECORE_XDPMS
    LOGFN(__FILE__, __LINE__, __FUNCTION__);
index 91d7959..8267e6d 100644 (file)
  * @ingroup Ecore_X_Drawable_Group
  */
 EAPI void
-ecore_x_drawable_geometry_get(Ecore_X_Drawable d, int *x, int *y, int *w, int *h)
+ecore_x_drawable_geometry_get(Ecore_X_Drawable d,
+                              int *x,
+                              int *y,
+                              int *w,
+                              int *h)
 {
-   Window         dummy_win;
-   int            ret_x, ret_y;
-   unsigned int   ret_w, ret_h, dummy_border, dummy_depth;
+   Window dummy_win;
+   int ret_x, ret_y;
+   unsigned int ret_w, ret_h, dummy_border, dummy_depth;
 
    LOGFN(__FILE__, __LINE__, __FUNCTION__);
    if (!XGetGeometry(_ecore_x_disp, d, &dummy_win, &ret_x, &ret_y,
                      &ret_w, &ret_h, &dummy_border, &dummy_depth))
-   {
-      ret_x = 0;
-      ret_y = 0;
-      ret_w = 0;
-      ret_h = 0;
-   }
-
-   if (x) *x = ret_x;
-   if (y) *y = ret_y;
-   if (w) *w = (int) ret_w;
-   if (h) *h = (int) ret_h;
+     {
+        ret_x = 0;
+        ret_y = 0;
+        ret_w = 0;
+        ret_h = 0;
+     }
+
+   if (x)
+      *x = ret_x;
+
+   if (y)
+      *y = ret_y;
+
+   if (w)
+      *w = (int)ret_w;
+
+   if (h)
+      *h = (int)ret_h;
 }
 
 /**
@@ -57,16 +68,16 @@ ecore_x_drawable_geometry_get(Ecore_X_Drawable d, int *x, int *y, int *w, int *h
 EAPI int
 ecore_x_drawable_border_width_get(Ecore_X_Drawable d)
 {
-   Window         dummy_win;
-   int            dummy_x, dummy_y;
-   unsigned int   dummy_w, dummy_h, border_ret, dummy_depth;
+   Window dummy_win;
+   int dummy_x, dummy_y;
+   unsigned int dummy_w, dummy_h, border_ret, dummy_depth;
 
    LOGFN(__FILE__, __LINE__, __FUNCTION__);
    if (!XGetGeometry(_ecore_x_disp, d, &dummy_win, &dummy_x, &dummy_y,
                      &dummy_w, &dummy_h, &border_ret, &dummy_depth))
       border_ret = 0;
 
-   return (int) border_ret;
+   return (int)border_ret;
 }
 
 /**
@@ -78,16 +89,16 @@ ecore_x_drawable_border_width_get(Ecore_X_Drawable d)
 EAPI int
 ecore_x_drawable_depth_get(Ecore_X_Drawable d)
 {
-   Window         dummy_win;
-   int            dummy_x, dummy_y;
-   unsigned int   dummy_w, dummy_h, dummy_border, depth_ret;
+   Window dummy_win;
+   int dummy_x, dummy_y;
+   unsigned int dummy_w, dummy_h, dummy_border, depth_ret;
 
    LOGFN(__FILE__, __LINE__, __FUNCTION__);
    if (!XGetGeometry(_ecore_x_disp, d, &dummy_win, &dummy_x, &dummy_y,
                      &dummy_w, &dummy_h, &dummy_border, &depth_ret))
       depth_ret = 0;
 
-   return (int) depth_ret;
+   return (int)depth_ret;
 }
 
 /**
@@ -100,7 +111,12 @@ ecore_x_drawable_depth_get(Ecore_X_Drawable d)
  * @param height The height of the rectangle.
  */
 EAPI void
-ecore_x_drawable_rectangle_fill(Ecore_X_Drawable d, Ecore_X_GC gc, int x, int y, int width, int height)
+ecore_x_drawable_rectangle_fill(Ecore_X_Drawable d,
+                                Ecore_X_GC gc,
+                                int x,
+                                int y,
+                                int width,
+                                int height)
 {
    LOGFN(__FILE__, __LINE__, __FUNCTION__);
    XFillRectangle(_ecore_x_disp, d, gc, x, y, width, height);
index 330f6fd..50aa681 100644 (file)
@@ -38,7 +38,7 @@ ecore_x_e_virtual_keyboard_set(Ecore_X_Window win, unsigned int is_keyboard)
 {
    LOGFN(__FILE__, __LINE__, __FUNCTION__);
    ecore_x_window_prop_card32_set(win, ECORE_X_ATOM_E_VIRTUAL_KEYBOARD,
-                                 &is_keyboard, 1);
+                                  &is_keyboard, 1);
 }
 
 EAPI int
@@ -47,44 +47,61 @@ ecore_x_e_virtual_keyboard_get(Ecore_X_Window win)
    unsigned int val;
 
    LOGFN(__FILE__, __LINE__, __FUNCTION__);
-   if (!ecore_x_window_prop_card32_get(win, ECORE_X_ATOM_E_VIRTUAL_KEYBOARD, &val, 1))
-     return 0;
+   if (!ecore_x_window_prop_card32_get(win, ECORE_X_ATOM_E_VIRTUAL_KEYBOARD,
+                                       &val, 1))
+      return 0;
+
    return val;
 }
 
 static Ecore_X_Virtual_Keyboard_State
 _ecore_x_e_vkbd_state_get(Ecore_X_Atom atom)
 {
-   if (atom == ECORE_X_ATOM_E_VIRTUAL_KEYBOARD_ON) 
-     return ECORE_X_VIRTUAL_KEYBOARD_STATE_ON;
-   if (atom == ECORE_X_ATOM_E_VIRTUAL_KEYBOARD_OFF) 
-     return ECORE_X_VIRTUAL_KEYBOARD_STATE_OFF;
-   if (atom == ECORE_X_ATOM_E_VIRTUAL_KEYBOARD_ALPHA) 
-     return ECORE_X_VIRTUAL_KEYBOARD_STATE_ALPHA;
-   if (atom == ECORE_X_ATOM_E_VIRTUAL_KEYBOARD_NUMERIC) 
-     return ECORE_X_VIRTUAL_KEYBOARD_STATE_NUMERIC;
-   if (atom == ECORE_X_ATOM_E_VIRTUAL_KEYBOARD_PIN) 
-     return ECORE_X_VIRTUAL_KEYBOARD_STATE_PIN;
-   if (atom == ECORE_X_ATOM_E_VIRTUAL_KEYBOARD_PHONE_NUMBER) 
-     return ECORE_X_VIRTUAL_KEYBOARD_STATE_PHONE_NUMBER;
-   if (atom == ECORE_X_ATOM_E_VIRTUAL_KEYBOARD_HEX) 
-     return ECORE_X_VIRTUAL_KEYBOARD_STATE_HEX;
-   if (atom == ECORE_X_ATOM_E_VIRTUAL_KEYBOARD_TERMINAL) 
-     return ECORE_X_VIRTUAL_KEYBOARD_STATE_TERMINAL;
-   if (atom == ECORE_X_ATOM_E_VIRTUAL_KEYBOARD_PASSWORD) 
-     return ECORE_X_VIRTUAL_KEYBOARD_STATE_PASSWORD;
-   if (atom == ECORE_X_ATOM_E_VIRTUAL_KEYBOARD_IP) 
-     return ECORE_X_VIRTUAL_KEYBOARD_STATE_IP;
-   if (atom == ECORE_X_ATOM_E_VIRTUAL_KEYBOARD_HOST) 
-     return ECORE_X_VIRTUAL_KEYBOARD_STATE_HOST;
-   if (atom == ECORE_X_ATOM_E_VIRTUAL_KEYBOARD_FILE) 
-     return ECORE_X_VIRTUAL_KEYBOARD_STATE_FILE;
-   if (atom == ECORE_X_ATOM_E_VIRTUAL_KEYBOARD_URL) 
-     return ECORE_X_VIRTUAL_KEYBOARD_STATE_URL;
-   if (atom == ECORE_X_ATOM_E_VIRTUAL_KEYBOARD_KEYPAD) 
-     return ECORE_X_VIRTUAL_KEYBOARD_STATE_KEYPAD;
-   if (atom == ECORE_X_ATOM_E_VIRTUAL_KEYBOARD_J2ME) 
-     return ECORE_X_VIRTUAL_KEYBOARD_STATE_J2ME;
+   if (atom == ECORE_X_ATOM_E_VIRTUAL_KEYBOARD_ON)
+      return ECORE_X_VIRTUAL_KEYBOARD_STATE_ON;
+
+   if (atom == ECORE_X_ATOM_E_VIRTUAL_KEYBOARD_OFF)
+      return ECORE_X_VIRTUAL_KEYBOARD_STATE_OFF;
+
+   if (atom == ECORE_X_ATOM_E_VIRTUAL_KEYBOARD_ALPHA)
+      return ECORE_X_VIRTUAL_KEYBOARD_STATE_ALPHA;
+
+   if (atom == ECORE_X_ATOM_E_VIRTUAL_KEYBOARD_NUMERIC)
+      return ECORE_X_VIRTUAL_KEYBOARD_STATE_NUMERIC;
+
+   if (atom == ECORE_X_ATOM_E_VIRTUAL_KEYBOARD_PIN)
+      return ECORE_X_VIRTUAL_KEYBOARD_STATE_PIN;
+
+   if (atom == ECORE_X_ATOM_E_VIRTUAL_KEYBOARD_PHONE_NUMBER)
+      return ECORE_X_VIRTUAL_KEYBOARD_STATE_PHONE_NUMBER;
+
+   if (atom == ECORE_X_ATOM_E_VIRTUAL_KEYBOARD_HEX)
+      return ECORE_X_VIRTUAL_KEYBOARD_STATE_HEX;
+
+   if (atom == ECORE_X_ATOM_E_VIRTUAL_KEYBOARD_TERMINAL)
+      return ECORE_X_VIRTUAL_KEYBOARD_STATE_TERMINAL;
+
+   if (atom == ECORE_X_ATOM_E_VIRTUAL_KEYBOARD_PASSWORD)
+      return ECORE_X_VIRTUAL_KEYBOARD_STATE_PASSWORD;
+
+   if (atom == ECORE_X_ATOM_E_VIRTUAL_KEYBOARD_IP)
+      return ECORE_X_VIRTUAL_KEYBOARD_STATE_IP;
+
+   if (atom == ECORE_X_ATOM_E_VIRTUAL_KEYBOARD_HOST)
+      return ECORE_X_VIRTUAL_KEYBOARD_STATE_HOST;
+
+   if (atom == ECORE_X_ATOM_E_VIRTUAL_KEYBOARD_FILE)
+      return ECORE_X_VIRTUAL_KEYBOARD_STATE_FILE;
+
+   if (atom == ECORE_X_ATOM_E_VIRTUAL_KEYBOARD_URL)
+      return ECORE_X_VIRTUAL_KEYBOARD_STATE_URL;
+
+   if (atom == ECORE_X_ATOM_E_VIRTUAL_KEYBOARD_KEYPAD)
+      return ECORE_X_VIRTUAL_KEYBOARD_STATE_KEYPAD;
+
+   if (atom == ECORE_X_ATOM_E_VIRTUAL_KEYBOARD_J2ME)
+      return ECORE_X_VIRTUAL_KEYBOARD_STATE_J2ME;
+
    return ECORE_X_VIRTUAL_KEYBOARD_STATE_UNKNOWN;
 }
 
@@ -93,50 +110,66 @@ _ecore_x_e_vkbd_atom_get(Ecore_X_Virtual_Keyboard_State state)
 {
    switch (state)
      {
-      case ECORE_X_VIRTUAL_KEYBOARD_STATE_OFF: 
-        return ECORE_X_ATOM_E_VIRTUAL_KEYBOARD_OFF;
-      case ECORE_X_VIRTUAL_KEYBOARD_STATE_ON: 
-        return ECORE_X_ATOM_E_VIRTUAL_KEYBOARD_ON;
-      case ECORE_X_VIRTUAL_KEYBOARD_STATE_ALPHA: 
-        return ECORE_X_ATOM_E_VIRTUAL_KEYBOARD_ALPHA;
-      case ECORE_X_VIRTUAL_KEYBOARD_STATE_NUMERIC: 
-        return ECORE_X_ATOM_E_VIRTUAL_KEYBOARD_NUMERIC;
-      case ECORE_X_VIRTUAL_KEYBOARD_STATE_PIN: 
-        return ECORE_X_ATOM_E_VIRTUAL_KEYBOARD_PIN;
-      case ECORE_X_VIRTUAL_KEYBOARD_STATE_PHONE_NUMBER: 
-        return ECORE_X_ATOM_E_VIRTUAL_KEYBOARD_PHONE_NUMBER;
-      case ECORE_X_VIRTUAL_KEYBOARD_STATE_HEX: 
-        return ECORE_X_ATOM_E_VIRTUAL_KEYBOARD_HEX;
-      case ECORE_X_VIRTUAL_KEYBOARD_STATE_TERMINAL: 
-        return ECORE_X_ATOM_E_VIRTUAL_KEYBOARD_TERMINAL;
-      case ECORE_X_VIRTUAL_KEYBOARD_STATE_PASSWORD: 
-        return ECORE_X_ATOM_E_VIRTUAL_KEYBOARD_PASSWORD;
-      case ECORE_X_VIRTUAL_KEYBOARD_STATE_IP: 
-        return ECORE_X_ATOM_E_VIRTUAL_KEYBOARD_IP;
-      case ECORE_X_VIRTUAL_KEYBOARD_STATE_HOST: 
-        return ECORE_X_ATOM_E_VIRTUAL_KEYBOARD_HOST;
-      case ECORE_X_VIRTUAL_KEYBOARD_STATE_FILE: 
-        return ECORE_X_ATOM_E_VIRTUAL_KEYBOARD_FILE;
-      case ECORE_X_VIRTUAL_KEYBOARD_STATE_URL: 
-        return ECORE_X_ATOM_E_VIRTUAL_KEYBOARD_URL;
-      case ECORE_X_VIRTUAL_KEYBOARD_STATE_KEYPAD: 
-        return ECORE_X_ATOM_E_VIRTUAL_KEYBOARD_KEYPAD;
-      case ECORE_X_VIRTUAL_KEYBOARD_STATE_J2ME: 
-        return ECORE_X_ATOM_E_VIRTUAL_KEYBOARD_J2ME;
+      case ECORE_X_VIRTUAL_KEYBOARD_STATE_OFF:
+         return ECORE_X_ATOM_E_VIRTUAL_KEYBOARD_OFF;
+
+      case ECORE_X_VIRTUAL_KEYBOARD_STATE_ON:
+         return ECORE_X_ATOM_E_VIRTUAL_KEYBOARD_ON;
+
+      case ECORE_X_VIRTUAL_KEYBOARD_STATE_ALPHA:
+         return ECORE_X_ATOM_E_VIRTUAL_KEYBOARD_ALPHA;
+
+      case ECORE_X_VIRTUAL_KEYBOARD_STATE_NUMERIC:
+         return ECORE_X_ATOM_E_VIRTUAL_KEYBOARD_NUMERIC;
+
+      case ECORE_X_VIRTUAL_KEYBOARD_STATE_PIN:
+         return ECORE_X_ATOM_E_VIRTUAL_KEYBOARD_PIN;
+
+      case ECORE_X_VIRTUAL_KEYBOARD_STATE_PHONE_NUMBER:
+         return ECORE_X_ATOM_E_VIRTUAL_KEYBOARD_PHONE_NUMBER;
+
+      case ECORE_X_VIRTUAL_KEYBOARD_STATE_HEX:
+         return ECORE_X_ATOM_E_VIRTUAL_KEYBOARD_HEX;
+
+      case ECORE_X_VIRTUAL_KEYBOARD_STATE_TERMINAL:
+         return ECORE_X_ATOM_E_VIRTUAL_KEYBOARD_TERMINAL;
+
+      case ECORE_X_VIRTUAL_KEYBOARD_STATE_PASSWORD:
+         return ECORE_X_ATOM_E_VIRTUAL_KEYBOARD_PASSWORD;
+
+      case ECORE_X_VIRTUAL_KEYBOARD_STATE_IP:
+         return ECORE_X_ATOM_E_VIRTUAL_KEYBOARD_IP;
+
+      case ECORE_X_VIRTUAL_KEYBOARD_STATE_HOST:
+         return ECORE_X_ATOM_E_VIRTUAL_KEYBOARD_HOST;
+
+      case ECORE_X_VIRTUAL_KEYBOARD_STATE_FILE:
+         return ECORE_X_ATOM_E_VIRTUAL_KEYBOARD_FILE;
+
+      case ECORE_X_VIRTUAL_KEYBOARD_STATE_URL:
+         return ECORE_X_ATOM_E_VIRTUAL_KEYBOARD_URL;
+
+      case ECORE_X_VIRTUAL_KEYBOARD_STATE_KEYPAD:
+         return ECORE_X_ATOM_E_VIRTUAL_KEYBOARD_KEYPAD;
+
+      case ECORE_X_VIRTUAL_KEYBOARD_STATE_J2ME:
+         return ECORE_X_ATOM_E_VIRTUAL_KEYBOARD_J2ME;
+
       default: return 0;
      }
    return 0;
 }
 
 EAPI void
-ecore_x_e_virtual_keyboard_state_set(Ecore_X_Window win, Ecore_X_Virtual_Keyboard_State state)
+ecore_x_e_virtual_keyboard_state_set(Ecore_X_Window win,
+                                     Ecore_X_Virtual_Keyboard_State state)
 {
    Ecore_X_Atom atom = 0;
 
    LOGFN(__FILE__, __LINE__, __FUNCTION__);
    atom = _ecore_x_e_vkbd_atom_get(state);
    ecore_x_window_prop_atom_set(win, ECORE_X_ATOM_E_VIRTUAL_KEYBOARD_STATE,
-                               &atom, 1);
+                                &atom, 1);
 }
 
 EAPI Ecore_X_Virtual_Keyboard_State
@@ -146,241 +179,261 @@ ecore_x_e_virtual_keyboard_state_get(Ecore_X_Window win)
 
    LOGFN(__FILE__, __LINE__, __FUNCTION__);
    if (!ecore_x_window_prop_atom_get(win, ECORE_X_ATOM_E_VIRTUAL_KEYBOARD_STATE,
-                                    &atom, 1))
-     return ECORE_X_VIRTUAL_KEYBOARD_STATE_UNKNOWN;
+                                     &atom, 1))
+      return ECORE_X_VIRTUAL_KEYBOARD_STATE_UNKNOWN;
+
    return _ecore_x_e_vkbd_state_get(atom);
 }
 
 EAPI void
-ecore_x_e_virtual_keyboard_state_send(Ecore_X_Window win, Ecore_X_Virtual_Keyboard_State state)
+ecore_x_e_virtual_keyboard_state_send(Ecore_X_Window win,
+                                      Ecore_X_Virtual_Keyboard_State state)
 {
    LOGFN(__FILE__, __LINE__, __FUNCTION__);
    ecore_x_client_message32_send(win, ECORE_X_ATOM_E_VIRTUAL_KEYBOARD_STATE,
-                                ECORE_X_EVENT_MASK_WINDOW_CONFIGURE,
-                                _ecore_x_e_vkbd_atom_get(state),
-                                0, 0, 0, 0);
+                                 ECORE_X_EVENT_MASK_WINDOW_CONFIGURE,
+                                 _ecore_x_e_vkbd_atom_get(state),
+                                 0, 0, 0, 0);
 }
 
-static Ecore_X_Atom 
-_ecore_x_e_illume_atom_get(Ecore_X_Illume_Mode mode) 
+static Ecore_X_Atom
+_ecore_x_e_illume_atom_get(Ecore_X_Illume_Mode mode)
 {
-   switch (mode) 
+   switch (mode)
      {
       case ECORE_X_ILLUME_MODE_SINGLE:
-        return ECORE_X_ATOM_E_ILLUME_MODE_SINGLE;
+         return ECORE_X_ATOM_E_ILLUME_MODE_SINGLE;
+
       case ECORE_X_ILLUME_MODE_DUAL_TOP:
-        return ECORE_X_ATOM_E_ILLUME_MODE_DUAL_TOP;
+         return ECORE_X_ATOM_E_ILLUME_MODE_DUAL_TOP;
+
       case ECORE_X_ILLUME_MODE_DUAL_LEFT:
-        return ECORE_X_ATOM_E_ILLUME_MODE_DUAL_LEFT;
+         return ECORE_X_ATOM_E_ILLUME_MODE_DUAL_LEFT;
+
       default:
-        return ECORE_X_ILLUME_MODE_UNKNOWN;;
+         return ECORE_X_ILLUME_MODE_UNKNOWN;
      }
    return ECORE_X_ILLUME_MODE_UNKNOWN;
 }
 
-static Ecore_X_Illume_Mode 
-_ecore_x_e_illume_mode_get(Ecore_X_Atom atom) 
+static Ecore_X_Illume_Mode
+_ecore_x_e_illume_mode_get(Ecore_X_Atom atom)
 {
    if (atom == ECORE_X_ATOM_E_ILLUME_MODE_SINGLE)
-     return ECORE_X_ILLUME_MODE_SINGLE;
+      return ECORE_X_ILLUME_MODE_SINGLE;
+
    if (atom == ECORE_X_ATOM_E_ILLUME_MODE_DUAL_TOP)
-     return ECORE_X_ILLUME_MODE_DUAL_TOP;
+      return ECORE_X_ILLUME_MODE_DUAL_TOP;
+
    if (atom == ECORE_X_ATOM_E_ILLUME_MODE_DUAL_LEFT)
-     return ECORE_X_ILLUME_MODE_DUAL_LEFT;
+      return ECORE_X_ILLUME_MODE_DUAL_LEFT;
+
    return ECORE_X_ILLUME_MODE_UNKNOWN;
 }
 
-EAPI void 
-ecore_x_e_illume_zone_set(Ecore_X_Window win, Ecore_X_Window zone) 
+EAPI void
+ecore_x_e_illume_zone_set(Ecore_X_Window win, Ecore_X_Window zone)
 {
    LOGFN(__FILE__, __LINE__, __FUNCTION__);
-   ecore_x_window_prop_window_set(win, ECORE_X_ATOM_E_ILLUME_ZONE, 
+   ecore_x_window_prop_window_set(win, ECORE_X_ATOM_E_ILLUME_ZONE,
                                   &zone, 1);
 }
 
-EAPI Ecore_X_Window 
-ecore_x_e_illume_zone_get(Ecore_X_Window win) 
+EAPI Ecore_X_Window
+ecore_x_e_illume_zone_get(Ecore_X_Window win)
 {
    Ecore_X_Window zone;
 
    LOGFN(__FILE__, __LINE__, __FUNCTION__);
-   if (!ecore_x_window_prop_window_get(win, ECORE_X_ATOM_E_ILLUME_ZONE, 
-                                       &zone, 1)) return 0;
+   if (!ecore_x_window_prop_window_get(win, ECORE_X_ATOM_E_ILLUME_ZONE,
+                                       &zone, 1))
+      return 0;
+
    return zone;
 }
 
-EAPI void 
-ecore_x_e_illume_zone_list_set(Ecore_X_Window win, Ecore_X_Window *zones, unsigned int n_zones) 
+EAPI void
+ecore_x_e_illume_zone_list_set(Ecore_X_Window win,
+                               Ecore_X_Window *zones,
+                               unsigned int n_zones)
 {
    LOGFN(__FILE__, __LINE__, __FUNCTION__);
-   ecore_x_window_prop_window_set(win, ECORE_X_ATOM_E_ILLUME_ZONE_LIST, 
+   ecore_x_window_prop_window_set(win, ECORE_X_ATOM_E_ILLUME_ZONE_LIST,
                                   zones, n_zones);
 }
 
-EAPI void 
-ecore_x_e_illume_conformant_set(Ecore_X_Window win, unsigned int is_conformant) 
+EAPI void
+ecore_x_e_illume_conformant_set(Ecore_X_Window win, unsigned int is_conformant)
 {
    LOGFN(__FILE__, __LINE__, __FUNCTION__);
    ecore_x_window_prop_card32_set(win, ECORE_X_ATOM_E_ILLUME_CONFORMANT,
-                                 &is_conformant, 1);
+                                  &is_conformant, 1);
 }
 
-EAPI int 
-ecore_x_e_illume_conformant_get(Ecore_X_Window win) 
+EAPI int
+ecore_x_e_illume_conformant_get(Ecore_X_Window win)
 {
    unsigned int val = 0;
 
    LOGFN(__FILE__, __LINE__, __FUNCTION__);
-   if (!ecore_x_window_prop_card32_get(win, ECORE_X_ATOM_E_ILLUME_CONFORMANT, 
+   if (!ecore_x_window_prop_card32_get(win, ECORE_X_ATOM_E_ILLUME_CONFORMANT,
                                        &val, 1))
-     return 0;
+      return 0;
+
    return val;
 }
 
-EAPI void 
-ecore_x_e_illume_mode_set(Ecore_X_Window win, Ecore_X_Illume_Mode mode) 
+EAPI void
+ecore_x_e_illume_mode_set(Ecore_X_Window win, Ecore_X_Illume_Mode mode)
 {
    Ecore_X_Atom atom = 0;
 
    LOGFN(__FILE__, __LINE__, __FUNCTION__);
    atom = _ecore_x_e_illume_atom_get(mode);
    ecore_x_window_prop_atom_set(win, ECORE_X_ATOM_E_ILLUME_MODE,
-                                 &atom, 1);
+                                &atom, 1);
 }
 
-EAPI Ecore_X_Illume_Mode 
-ecore_x_e_illume_mode_get(Ecore_X_Window win) 
+EAPI Ecore_X_Illume_Mode
+ecore_x_e_illume_mode_get(Ecore_X_Window win)
 {
    Ecore_X_Atom atom = 0;
 
    LOGFN(__FILE__, __LINE__, __FUNCTION__);
    if (!ecore_x_window_prop_atom_get(win, ECORE_X_ATOM_E_ILLUME_MODE, &atom, 1))
-     return ECORE_X_ILLUME_MODE_UNKNOWN;
+      return ECORE_X_ILLUME_MODE_UNKNOWN;
+
    return _ecore_x_e_illume_mode_get(atom);
 }
 
-EAPI void 
-ecore_x_e_illume_mode_send(Ecore_X_Window win, Ecore_X_Illume_Mode mode) 
+EAPI void
+ecore_x_e_illume_mode_send(Ecore_X_Window win, Ecore_X_Illume_Mode mode)
 {
    LOGFN(__FILE__, __LINE__, __FUNCTION__);
    ecore_x_client_message32_send(win, ECORE_X_ATOM_E_ILLUME_MODE,
-                                ECORE_X_EVENT_MASK_WINDOW_CONFIGURE,
-                                _ecore_x_e_illume_atom_get(mode),
-                                0, 0, 0, 0);
+                                 ECORE_X_EVENT_MASK_WINDOW_CONFIGURE,
+                                 _ecore_x_e_illume_atom_get(mode),
+                                 0, 0, 0, 0);
 }
 
-EAPI void 
-ecore_x_e_illume_focus_back_send(Ecore_X_Window win) 
+EAPI void
+ecore_x_e_illume_focus_back_send(Ecore_X_Window win)
 {
    LOGFN(__FILE__, __LINE__, __FUNCTION__);
    ecore_x_client_message32_send(win, ECORE_X_ATOM_E_ILLUME_FOCUS_BACK,
-                                ECORE_X_EVENT_MASK_WINDOW_CONFIGURE,
-                                1, 0, 0, 0, 0);
+                                 ECORE_X_EVENT_MASK_WINDOW_CONFIGURE,
+                                 1, 0, 0, 0, 0);
 }
 
-EAPI void 
-ecore_x_e_illume_focus_forward_send(Ecore_X_Window win) 
+EAPI void
+ecore_x_e_illume_focus_forward_send(Ecore_X_Window win)
 {
    LOGFN(__FILE__, __LINE__, __FUNCTION__);
    ecore_x_client_message32_send(win, ECORE_X_ATOM_E_ILLUME_FOCUS_FORWARD,
-                                ECORE_X_EVENT_MASK_WINDOW_CONFIGURE,
-                                1, 0, 0, 0, 0);
+                                 ECORE_X_EVENT_MASK_WINDOW_CONFIGURE,
+                                 1, 0, 0, 0, 0);
 }
 
-EAPI void 
-ecore_x_e_illume_focus_home_send(Ecore_X_Window win) 
+EAPI void
+ecore_x_e_illume_focus_home_send(Ecore_X_Window win)
 {
    LOGFN(__FILE__, __LINE__, __FUNCTION__);
    ecore_x_client_message32_send(win, ECORE_X_ATOM_E_ILLUME_FOCUS_HOME,
-                                ECORE_X_EVENT_MASK_WINDOW_CONFIGURE,
-                                1, 0, 0, 0, 0);
+                                 ECORE_X_EVENT_MASK_WINDOW_CONFIGURE,
+                                 1, 0, 0, 0, 0);
 }
 
-EAPI void 
-ecore_x_e_illume_close_send(Ecore_X_Window win) 
+EAPI void
+ecore_x_e_illume_close_send(Ecore_X_Window win)
 {
    LOGFN(__FILE__, __LINE__, __FUNCTION__);
    ecore_x_client_message32_send(win, ECORE_X_ATOM_E_ILLUME_CLOSE,
-                                ECORE_X_EVENT_MASK_WINDOW_CONFIGURE, 
-                                1, 0, 0, 0, 0);
+                                 ECORE_X_EVENT_MASK_WINDOW_CONFIGURE,
+                                 1, 0, 0, 0, 0);
 }
 
-EAPI void 
-ecore_x_e_illume_home_new_send(Ecore_X_Window win) 
+EAPI void
+ecore_x_e_illume_home_new_send(Ecore_X_Window win)
 {
    LOGFN(__FILE__, __LINE__, __FUNCTION__);
    ecore_x_client_message32_send(win, ECORE_X_ATOM_E_ILLUME_HOME_NEW,
-                                ECORE_X_EVENT_MASK_WINDOW_CONFIGURE, 
-                                1, 0, 0, 0, 0);
+                                 ECORE_X_EVENT_MASK_WINDOW_CONFIGURE,
+                                 1, 0, 0, 0, 0);
 }
 
-EAPI void 
-ecore_x_e_illume_home_del_send(Ecore_X_Window win) 
+EAPI void
+ecore_x_e_illume_home_del_send(Ecore_X_Window win)
 {
    LOGFN(__FILE__, __LINE__, __FUNCTION__);
    ecore_x_client_message32_send(win, ECORE_X_ATOM_E_ILLUME_HOME_DEL,
-                                ECORE_X_EVENT_MASK_WINDOW_CONFIGURE, 
-                                1, 0, 0, 0, 0);
+                                 ECORE_X_EVENT_MASK_WINDOW_CONFIGURE,
+                                 1, 0, 0, 0, 0);
 }
 
-EAPI void 
-ecore_x_e_illume_drag_set(Ecore_X_Window win, unsigned int drag) 
+EAPI void
+ecore_x_e_illume_drag_set(Ecore_X_Window win, unsigned int drag)
 {
    LOGFN(__FILE__, __LINE__, __FUNCTION__);
    ecore_x_window_prop_card32_set(win, ECORE_X_ATOM_E_ILLUME_DRAG, &drag, 1);
 }
 
-EAPI int 
-ecore_x_e_illume_drag_get(Ecore_X_Window win) 
+EAPI int
+ecore_x_e_illume_drag_get(Ecore_X_Window win)
 {
    unsigned int val = 0;
 
    LOGFN(__FILE__, __LINE__, __FUNCTION__);
    if (!ecore_x_window_prop_card32_get(win, ECORE_X_ATOM_E_ILLUME_DRAG, &val, 1))
-     return 0;
+      return 0;
+
    return val;
 }
 
-EAPI void 
-ecore_x_e_illume_drag_locked_set(Ecore_X_Window win, unsigned int is_locked) 
+EAPI void
+ecore_x_e_illume_drag_locked_set(Ecore_X_Window win, unsigned int is_locked)
 {
    LOGFN(__FILE__, __LINE__, __FUNCTION__);
-   ecore_x_window_prop_card32_set(win, ECORE_X_ATOM_E_ILLUME_DRAG_LOCKED, 
+   ecore_x_window_prop_card32_set(win, ECORE_X_ATOM_E_ILLUME_DRAG_LOCKED,
                                   &is_locked, 1);
 }
 
-EAPI int 
-ecore_x_e_illume_drag_locked_get(Ecore_X_Window win) 
+EAPI int
+ecore_x_e_illume_drag_locked_get(Ecore_X_Window win)
 {
    unsigned int val = 0;
 
    LOGFN(__FILE__, __LINE__, __FUNCTION__);
-   if (!ecore_x_window_prop_card32_get(win, ECORE_X_ATOM_E_ILLUME_DRAG_LOCKED, 
+   if (!ecore_x_window_prop_card32_get(win, ECORE_X_ATOM_E_ILLUME_DRAG_LOCKED,
                                        &val, 1))
-     return 0;
+      return 0;
+
    return val;
 }
 
-EAPI void 
-ecore_x_e_illume_drag_start_send(Ecore_X_Window win) 
+EAPI void
+ecore_x_e_illume_drag_start_send(Ecore_X_Window win)
 {
    LOGFN(__FILE__, __LINE__, __FUNCTION__);
    ecore_x_client_message32_send(win, ECORE_X_ATOM_E_ILLUME_DRAG_START,
-                                ECORE_X_EVENT_MASK_WINDOW_CONFIGURE,
-                                1, 0, 0, 0, 0);
+                                 ECORE_X_EVENT_MASK_WINDOW_CONFIGURE,
+                                 1, 0, 0, 0, 0);
 }
 
-EAPI void 
-ecore_x_e_illume_drag_end_send(Ecore_X_Window win) 
+EAPI void
+ecore_x_e_illume_drag_end_send(Ecore_X_Window win)
 {
    LOGFN(__FILE__, __LINE__, __FUNCTION__);
    ecore_x_client_message32_send(win, ECORE_X_ATOM_E_ILLUME_DRAG_END,
-                                ECORE_X_EVENT_MASK_WINDOW_CONFIGURE,
-                                1, 0, 0, 0, 0);
+                                 ECORE_X_EVENT_MASK_WINDOW_CONFIGURE,
+                                 1, 0, 0, 0, 0);
 }
 
-EAPI void 
-ecore_x_e_illume_indicator_geometry_set(Ecore_X_Window win, int x, int y, int w, int h) 
+EAPI void
+ecore_x_e_illume_indicator_geometry_set(Ecore_X_Window win,
+                                        int x,
+                                        int y,
+                                        int w,
+                                        int h)
 {
    unsigned int geom[4];
 
@@ -389,31 +442,49 @@ ecore_x_e_illume_indicator_geometry_set(Ecore_X_Window win, int x, int y, int w,
    geom[1] = y;
    geom[2] = w;
    geom[3] = h;
-   ecore_x_window_prop_card32_set(win, ECORE_X_ATOM_E_ILLUME_INDICATOR_GEOMETRY, 
+   ecore_x_window_prop_card32_set(win, ECORE_X_ATOM_E_ILLUME_INDICATOR_GEOMETRY,
                                   geom, 4);
 }
 
-EAPI int 
-ecore_x_e_illume_indicator_geometry_get(Ecore_X_Window win, int *x, int *y, int *w, int *h) 
+EAPI int
+ecore_x_e_illume_indicator_geometry_get(Ecore_X_Window win,
+                                        int *x,
+                                        int *y,
+                                        int *w,
+                                        int *h)
 {
    int ret = 0;
    unsigned int geom[4];
 
    LOGFN(__FILE__, __LINE__, __FUNCTION__);
-   ret = 
-     ecore_x_window_prop_card32_get(win, 
-                                    ECORE_X_ATOM_E_ILLUME_INDICATOR_GEOMETRY, 
-                                    geom, 4);
-   if (ret != 4) return 0;
-   if (x) *x = geom[0];
-   if (y) *y = geom[1];
-   if (w) *w = geom[2];
-   if (h) *h = geom[3];
+   ret =
+      ecore_x_window_prop_card32_get(win,
+                                     ECORE_X_ATOM_E_ILLUME_INDICATOR_GEOMETRY,
+                                     geom, 4);
+   if (ret != 4)
+      return 0;
+
+   if (x)
+      *x = geom[0];
+
+   if (y)
+      *y = geom[1];
+
+   if (w)
+      *w = geom[2];
+
+   if (h)
+      *h = geom[3];
+
    return 1;
 }
 
-EAPI void 
-ecore_x_e_illume_softkey_geometry_set(Ecore_X_Window win, int x, int y, int w, int h) 
+EAPI void
+ecore_x_e_illume_softkey_geometry_set(Ecore_X_Window win,
+                                      int x,
+                                      int y,
+                                      int w,
+                                      int h)
 {
    unsigned int geom[4];
 
@@ -422,31 +493,49 @@ ecore_x_e_illume_softkey_geometry_set(Ecore_X_Window win, int x, int y, int w, i
    geom[1] = y;
    geom[2] = w;
    geom[3] = h;
-   ecore_x_window_prop_card32_set(win, ECORE_X_ATOM_E_ILLUME_SOFTKEY_GEOMETRY, 
+   ecore_x_window_prop_card32_set(win, ECORE_X_ATOM_E_ILLUME_SOFTKEY_GEOMETRY,
                                   geom, 4);
 }
 
-EAPI int 
-ecore_x_e_illume_softkey_geometry_get(Ecore_X_Window win, int *x, int *y, int *w, int *h) 
+EAPI int
+ecore_x_e_illume_softkey_geometry_get(Ecore_X_Window win,
+                                      int *x,
+                                      int *y,
+                                      int *w,
+                                      int *h)
 {
    int ret = 0;
    unsigned int geom[4];
 
    LOGFN(__FILE__, __LINE__, __FUNCTION__);
-   ret = 
-     ecore_x_window_prop_card32_get(win, 
-                                    ECORE_X_ATOM_E_ILLUME_SOFTKEY_GEOMETRY, 
-                                    geom, 4);
-   if (ret != 4) return 0;
-   if (x) *x = geom[0];
-   if (y) *y = geom[1];
-   if (w) *w = geom[2];
-   if (h) *h = geom[3];
+   ret =
+      ecore_x_window_prop_card32_get(win,
+                                     ECORE_X_ATOM_E_ILLUME_SOFTKEY_GEOMETRY,
+                                     geom, 4);
+   if (ret != 4)
+      return 0;
+
+   if (x)
+      *x = geom[0];
+
+   if (y)
+      *y = geom[1];
+
+   if (w)
+      *w = geom[2];
+
+   if (h)
+      *h = geom[3];
+
    return 1;
 }
 
-EAPI void 
-ecore_x_e_illume_keyboard_geometry_set(Ecore_X_Window win, int x, int y, int w, int h) 
+EAPI void
+ecore_x_e_illume_keyboard_geometry_set(Ecore_X_Window win,
+                                       int x,
+                                       int y,
+                                       int w,
+                                       int h)
 {
    unsigned int geom[4];
 
@@ -455,40 +544,56 @@ ecore_x_e_illume_keyboard_geometry_set(Ecore_X_Window win, int x, int y, int w,
    geom[1] = y;
    geom[2] = w;
    geom[3] = h;
-   ecore_x_window_prop_card32_set(win, ECORE_X_ATOM_E_ILLUME_KEYBOARD_GEOMETRY, 
+   ecore_x_window_prop_card32_set(win, ECORE_X_ATOM_E_ILLUME_KEYBOARD_GEOMETRY,
                                   geom, 4);
 }
 
-EAPI int 
-ecore_x_e_illume_keyboard_geometry_get(Ecore_X_Window win, int *x, int *y, int *w, int *h) 
+EAPI int
+ecore_x_e_illume_keyboard_geometry_get(Ecore_X_Window win,
+                                       int *x,
+                                       int *y,
+                                       int *w,
+                                       int *h)
 {
    int ret = 0;
    unsigned int geom[4];
 
    LOGFN(__FILE__, __LINE__, __FUNCTION__);
-   ret = 
-     ecore_x_window_prop_card32_get(win, 
-                                    ECORE_X_ATOM_E_ILLUME_KEYBOARD_GEOMETRY, 
-                                    geom, 4);
-   if (ret != 4) return 0;
-   if (x) *x = geom[0];
-   if (y) *y = geom[1];
-   if (w) *w = geom[2];
-   if (h) *h = geom[3];
+   ret =
+      ecore_x_window_prop_card32_get(win,
+                                     ECORE_X_ATOM_E_ILLUME_KEYBOARD_GEOMETRY,
+                                     geom, 4);
+   if (ret != 4)
+      return 0;
+
+   if (x)
+      *x = geom[0];
+
+   if (y)
+      *y = geom[1];
+
+   if (w)
+      *w = geom[2];
+
+   if (h)
+      *h = geom[3];
+
    return 1;
 }
 
 static Ecore_X_Atom
 _ecore_x_e_quickpanel_atom_get(Ecore_X_Illume_Quickpanel_State state)
 {
-   switch (state) 
+   switch (state)
      {
       case ECORE_X_ILLUME_QUICKPANEL_STATE_ON:
-        return ECORE_X_ATOM_E_ILLUME_QUICKPANEL_ON;
+         return ECORE_X_ATOM_E_ILLUME_QUICKPANEL_ON;
+
       case ECORE_X_ILLUME_QUICKPANEL_STATE_OFF:
-        return ECORE_X_ATOM_E_ILLUME_QUICKPANEL_OFF;
+         return ECORE_X_ATOM_E_ILLUME_QUICKPANEL_OFF;
+
       default:
-        return 0;
+         return 0;
      }
    return 0;
 }
@@ -496,158 +601,183 @@ _ecore_x_e_quickpanel_atom_get(Ecore_X_Illume_Quickpanel_State state)
 static Ecore_X_Illume_Quickpanel_State
 _ecore_x_e_quickpanel_state_get(Ecore_X_Atom atom)
 {
-   if (atom == ECORE_X_ATOM_E_ILLUME_QUICKPANEL_ON) 
-     return ECORE_X_ILLUME_QUICKPANEL_STATE_ON;
+   if (atom == ECORE_X_ATOM_E_ILLUME_QUICKPANEL_ON)
+      return ECORE_X_ILLUME_QUICKPANEL_STATE_ON;
+
    if (atom == ECORE_X_ATOM_E_ILLUME_QUICKPANEL_OFF)
-     return ECORE_X_ILLUME_QUICKPANEL_STATE_OFF;
+      return ECORE_X_ILLUME_QUICKPANEL_STATE_OFF;
+
    return ECORE_X_ILLUME_QUICKPANEL_STATE_UNKNOWN;
 }
 
-EAPI void 
-ecore_x_e_illume_quickpanel_set(Ecore_X_Window win, unsigned int is_quickpanel) 
+EAPI void
+ecore_x_e_illume_quickpanel_set(Ecore_X_Window win, unsigned int is_quickpanel)
 {
    LOGFN(__FILE__, __LINE__, __FUNCTION__);
    ecore_x_window_prop_card32_set(win, ECORE_X_ATOM_E_ILLUME_QUICKPANEL,
-                                 &is_quickpanel, 1);
+                                  &is_quickpanel, 1);
 }
 
-EAPI int 
-ecore_x_e_illume_quickpanel_get(Ecore_X_Window win) 
+EAPI int
+ecore_x_e_illume_quickpanel_get(Ecore_X_Window win)
 {
    unsigned int val = 0;
 
    LOGFN(__FILE__, __LINE__, __FUNCTION__);
-   if (!ecore_x_window_prop_card32_get(win, ECORE_X_ATOM_E_ILLUME_QUICKPANEL, 
+   if (!ecore_x_window_prop_card32_get(win, ECORE_X_ATOM_E_ILLUME_QUICKPANEL,
                                        &val, 1))
-     return 0;
+      return 0;
+
    return val;
 }
 
-EAPI void 
-ecore_x_e_illume_quickpanel_state_set(Ecore_X_Window win, Ecore_X_Illume_Quickpanel_State state) 
+EAPI void
+ecore_x_e_illume_quickpanel_state_set(Ecore_X_Window win,
+                                      Ecore_X_Illume_Quickpanel_State state)
 {
    Ecore_X_Atom atom = 0;
 
    LOGFN(__FILE__, __LINE__, __FUNCTION__);
    atom = _ecore_x_e_quickpanel_atom_get(state);
    ecore_x_window_prop_atom_set(win, ECORE_X_ATOM_E_ILLUME_QUICKPANEL_STATE,
-                               &atom, 1);
+                                &atom, 1);
 }
 
-EAPI Ecore_X_Illume_Quickpanel_State 
-ecore_x_e_illume_quickpanel_state_get(Ecore_X_Window win) 
+EAPI Ecore_X_Illume_Quickpanel_State
+ecore_x_e_illume_quickpanel_state_get(Ecore_X_Window win)
 {
    Ecore_X_Atom atom;
 
    LOGFN(__FILE__, __LINE__, __FUNCTION__);
-   if (!ecore_x_window_prop_atom_get(win, ECORE_X_ATOM_E_ILLUME_QUICKPANEL_STATE,
-                                    &atom, 1))
-     return ECORE_X_ILLUME_QUICKPANEL_STATE_UNKNOWN;
+   if (!ecore_x_window_prop_atom_get(win,
+                                     ECORE_X_ATOM_E_ILLUME_QUICKPANEL_STATE,
+                                     &atom, 1))
+      return ECORE_X_ILLUME_QUICKPANEL_STATE_UNKNOWN;
+
    return _ecore_x_e_quickpanel_state_get(atom);
 }
 
-EAPI void 
-ecore_x_e_illume_quickpanel_state_send(Ecore_X_Window win, Ecore_X_Illume_Quickpanel_State state) 
+EAPI void
+ecore_x_e_illume_quickpanel_state_send(Ecore_X_Window win,
+                                       Ecore_X_Illume_Quickpanel_State state)
 {
    LOGFN(__FILE__, __LINE__, __FUNCTION__);
    ecore_x_client_message32_send(win, ECORE_X_ATOM_E_ILLUME_QUICKPANEL_STATE,
-                                ECORE_X_EVENT_MASK_WINDOW_CONFIGURE,
-                                _ecore_x_e_quickpanel_atom_get(state),
-                                0, 0, 0, 0);
+                                 ECORE_X_EVENT_MASK_WINDOW_CONFIGURE,
+                                 _ecore_x_e_quickpanel_atom_get(state),
+                                 0, 0, 0, 0);
 }
 
-EAPI void 
-ecore_x_e_illume_quickpanel_state_toggle(Ecore_X_Window win) 
+EAPI void
+ecore_x_e_illume_quickpanel_state_toggle(Ecore_X_Window win)
 {
    LOGFN(__FILE__, __LINE__, __FUNCTION__);
-   ecore_x_client_message32_send(win, 
+   ecore_x_client_message32_send(win,
                                  ECORE_X_ATOM_E_ILLUME_QUICKPANEL_STATE_TOGGLE,
-                                ECORE_X_EVENT_MASK_WINDOW_CONFIGURE,
-                                0, 0, 0, 0, 0);
+                                 ECORE_X_EVENT_MASK_WINDOW_CONFIGURE,
+                                 0, 0, 0, 0, 0);
 }
 
-EAPI void 
-ecore_x_e_illume_quickpanel_priority_major_set(Ecore_X_Window win, unsigned int priority) 
+EAPI void
+ecore_x_e_illume_quickpanel_priority_major_set(Ecore_X_Window win,
+                                               unsigned int priority)
 {
    LOGFN(__FILE__, __LINE__, __FUNCTION__);
-   ecore_x_window_prop_card32_set(win, 
-                                  ECORE_X_ATOM_E_ILLUME_QUICKPANEL_PRIORITY_MAJOR, 
-                                  &priority, 1);
+   ecore_x_window_prop_card32_set(
+      win,
+      ECORE_X_ATOM_E_ILLUME_QUICKPANEL_PRIORITY_MAJOR,
+      &priority,
+      1);
 }
 
-EAPI int 
-ecore_x_e_illume_quickpanel_priority_major_get(Ecore_X_Window win) 
+EAPI int
+ecore_x_e_illume_quickpanel_priority_major_get(Ecore_X_Window win)
 {
    unsigned int val = 0;
 
    LOGFN(__FILE__, __LINE__, __FUNCTION__);
-   if (!ecore_x_window_prop_card32_get(win, ECORE_X_ATOM_E_ILLUME_QUICKPANEL_PRIORITY_MAJOR, 
+   if (!ecore_x_window_prop_card32_get(win,
+                                       ECORE_X_ATOM_E_ILLUME_QUICKPANEL_PRIORITY_MAJOR,
                                        &val, 1))
-     return 0;
+      return 0;
+
    return val;
 }
 
-EAPI void 
-ecore_x_e_illume_quickpanel_priority_minor_set(Ecore_X_Window win, unsigned int priority) 
+EAPI void
+ecore_x_e_illume_quickpanel_priority_minor_set(Ecore_X_Window win,
+                                               unsigned int priority)
 {
    LOGFN(__FILE__, __LINE__, __FUNCTION__);
-   ecore_x_window_prop_card32_set(win, 
-                                  ECORE_X_ATOM_E_ILLUME_QUICKPANEL_PRIORITY_MINOR, 
-                                  &priority, 1);
+   ecore_x_window_prop_card32_set(
+      win,
+      ECORE_X_ATOM_E_ILLUME_QUICKPANEL_PRIORITY_MINOR,
+      &priority,
+      1);
 }
 
-EAPI int 
-ecore_x_e_illume_quickpanel_priority_minor_get(Ecore_X_Window win) 
+EAPI int
+ecore_x_e_illume_quickpanel_priority_minor_get(Ecore_X_Window win)
 {
    unsigned int val = 0;
 
    LOGFN(__FILE__, __LINE__, __FUNCTION__);
-   if (!ecore_x_window_prop_card32_get(win, ECORE_X_ATOM_E_ILLUME_QUICKPANEL_PRIORITY_MINOR, 
+   if (!ecore_x_window_prop_card32_get(win,
+                                       ECORE_X_ATOM_E_ILLUME_QUICKPANEL_PRIORITY_MINOR,
                                        &val, 1))
-     return 0;
+      return 0;
+
    return val;
 }
 
-EAPI void 
-ecore_x_e_illume_quickpanel_zone_set(Ecore_X_Window win, unsigned int zone) 
+EAPI void
+ecore_x_e_illume_quickpanel_zone_set(Ecore_X_Window win, unsigned int zone)
 {
    LOGFN(__FILE__, __LINE__, __FUNCTION__);
-   ecore_x_window_prop_card32_set(win, 
-                                  ECORE_X_ATOM_E_ILLUME_QUICKPANEL_ZONE, 
+   ecore_x_window_prop_card32_set(win,
+                                  ECORE_X_ATOM_E_ILLUME_QUICKPANEL_ZONE,
                                   &zone, 1);
 }
 
-EAPI int 
-ecore_x_e_illume_quickpanel_zone_get(Ecore_X_Window win) 
+EAPI int
+ecore_x_e_illume_quickpanel_zone_get(Ecore_X_Window win)
 {
    unsigned int val = 0;
 
    LOGFN(__FILE__, __LINE__, __FUNCTION__);
-   if (!ecore_x_window_prop_card32_get(win, ECORE_X_ATOM_E_ILLUME_QUICKPANEL_ZONE, 
+   if (!ecore_x_window_prop_card32_get(win,
+                                       ECORE_X_ATOM_E_ILLUME_QUICKPANEL_ZONE,
                                        &val, 1))
-     return 0;
+      return 0;
+
    return val;
 }
 
-EAPI void 
-ecore_x_e_illume_quickpanel_position_update_send(Ecore_X_Window win) 
+EAPI void
+ecore_x_e_illume_quickpanel_position_update_send(Ecore_X_Window win)
 {
    LOGFN(__FILE__, __LINE__, __FUNCTION__);
-   ecore_x_client_message32_send(win, 
-                                 ECORE_X_ATOM_E_ILLUME_QUICKPANEL_POSITION_UPDATE,
-                                ECORE_X_EVENT_MASK_WINDOW_CONFIGURE,
-                                1, 0, 0, 0, 0);
+   ecore_x_client_message32_send(
+      win,
+      ECORE_X_ATOM_E_ILLUME_QUICKPANEL_POSITION_UPDATE,
+      ECORE_X_EVENT_MASK_WINDOW_CONFIGURE,
+      1,
+      0,
+      0,
+      0,
+      0);
 }
 
-EAPI void 
-ecore_x_e_comp_sync_counter_set(Ecore_X_Window win, Ecore_X_Sync_Counter counter)
+EAPI void
+ecore_x_e_comp_sync_counter_set(Ecore_X_Window win,
+                                Ecore_X_Sync_Counter counter)
 {
    LOGFN(__FILE__, __LINE__, __FUNCTION__);
    if (counter)
-     ecore_x_window_prop_xid_set(win, ECORE_X_ATOM_E_COMP_SYNC_COUNTER,
+      ecore_x_window_prop_xid_set(win, ECORE_X_ATOM_E_COMP_SYNC_COUNTER,
                                   ECORE_X_ATOM_CARDINAL, &counter, 1);
    else
-     ecore_x_window_prop_property_del(win, ECORE_X_ATOM_E_COMP_SYNC_COUNTER);
+      ecore_x_window_prop_property_del(win, ECORE_X_ATOM_E_COMP_SYNC_COUNTER);
 }
 
 EAPI Ecore_X_Sync_Counter
@@ -657,12 +787,14 @@ ecore_x_e_comp_sync_counter_get(Ecore_X_Window win)
    Ecore_X_Sync_Counter counter = 0;
 
    LOGFN(__FILE__, __LINE__, __FUNCTION__);
-   ret = 
-     ecore_x_window_prop_xid_get(win, 
-                                 ECORE_X_ATOM_E_COMP_SYNC_COUNTER,
-                                 ECORE_X_ATOM_CARDINAL,
-                                 &counter, 1);
-   if (ret != 1) return 0;
+   ret =
+      ecore_x_window_prop_xid_get(win,
+                                  ECORE_X_ATOM_E_COMP_SYNC_COUNTER,
+                                  ECORE_X_ATOM_CARDINAL,
+                                  &counter, 1);
+   if (ret != 1)
+      return 0;
+
    return counter;
 }
 
@@ -670,9 +802,11 @@ EAPI void
 ecore_x_e_comp_sync_draw_done_send(Ecore_X_Window root, Ecore_X_Window win)
 {
    XEvent xev;
-   
+
    LOGFN(__FILE__, __LINE__, __FUNCTION__);
-   if (!root) root = DefaultRootWindow(_ecore_x_disp);
+   if (!root)
+      root = DefaultRootWindow(_ecore_x_disp);
+
    xev.xclient.type = ClientMessage;
    xev.xclient.display = _ecore_x_disp;
    xev.xclient.window = win;
@@ -683,9 +817,9 @@ ecore_x_e_comp_sync_draw_done_send(Ecore_X_Window root, Ecore_X_Window win)
    xev.xclient.data.l[2] = 0; // later
    xev.xclient.data.l[3] = 0; // later
    xev.xclient.data.l[4] = 0; // later
-   
+
    XSendEvent(_ecore_x_disp, root, False,
-              SubstructureRedirectMask | SubstructureNotifyMask, 
+              SubstructureRedirectMask | SubstructureNotifyMask,
               &xev);
 }
 
@@ -694,28 +828,32 @@ ecore_x_e_comp_sync_supported_set(Ecore_X_Window root, Eina_Bool enabled)
 {
    Ecore_X_Window win;
 
-   if (!root) root = DefaultRootWindow(_ecore_x_disp);
+   if (!root)
+      root = DefaultRootWindow(_ecore_x_disp);
+
    LOGFN(__FILE__, __LINE__, __FUNCTION__);
    if (enabled)
      {
         win = ecore_x_window_new(root, 1, 2, 3, 4);
-        ecore_x_window_prop_xid_set(win, ECORE_X_ATOM_E_COMP_SYNC_SUPPORTED,
-                                     ECORE_X_ATOM_WINDOW, &win, 1);
+        ecore_x_window_prop_xid_set(win,  ECORE_X_ATOM_E_COMP_SYNC_SUPPORTED,
+                                    ECORE_X_ATOM_WINDOW, &win, 1);
         ecore_x_window_prop_xid_set(root, ECORE_X_ATOM_E_COMP_SYNC_SUPPORTED,
-                                     ECORE_X_ATOM_WINDOW, &win, 1);
+                                    ECORE_X_ATOM_WINDOW, &win, 1);
      }
    else
      {
         int ret;
-        
-        ret = 
-          ecore_x_window_prop_xid_get(root, 
-                                      ECORE_X_ATOM_E_COMP_SYNC_SUPPORTED,
-                                      ECORE_X_ATOM_WINDOW,
-                                      &win, 1);
+
+        ret =
+           ecore_x_window_prop_xid_get(root,
+                                       ECORE_X_ATOM_E_COMP_SYNC_SUPPORTED,
+                                       ECORE_X_ATOM_WINDOW,
+                                       &win, 1);
         if ((ret == 1) && (win))
           {
-             ecore_x_window_prop_property_del(root, ECORE_X_ATOM_E_COMP_SYNC_SUPPORTED);
+             ecore_x_window_prop_property_del(
+                root,
+                ECORE_X_ATOM_E_COMP_SYNC_SUPPORTED);
              ecore_x_window_free(win);
           }
      }
@@ -726,26 +864,27 @@ ecore_x_e_comp_sync_supported_get(Ecore_X_Window root)
 {
    Ecore_X_Window win, win2;
    int ret;
-   
-   LOGFN(__FILE__, __LINE__, __FUNCTION__);
-   if (!root) root = DefaultRootWindow(_ecore_x_disp);
-   ret = 
-     ecore_x_window_prop_xid_get(root, 
-                                 ECORE_X_ATOM_E_COMP_SYNC_SUPPORTED,
-                                 ECORE_X_ATOM_WINDOW,
-                                 &win, 1);
+
+   LOGFN(__FILE__, __LINE__, __FUNCTION__);
+   if (!root)
+      root = DefaultRootWindow(_ecore_x_disp);
+
+   ret =
+           ecore_x_window_prop_xid_get(root,
+                                  ECORE_X_ATOM_E_COMP_SYNC_SUPPORTED,
+                                  ECORE_X_ATOM_WINDOW,
+                                  &win, 1);
    if ((ret == 1) && (win))
      {
-        ret = 
-          ecore_x_window_prop_xid_get(win, 
-                                      ECORE_X_ATOM_E_COMP_SYNC_SUPPORTED,
-                                      ECORE_X_ATOM_WINDOW,
-                                      &win2, 1);
+        ret =
+           ecore_x_window_prop_xid_get(win,
+                                       ECORE_X_ATOM_E_COMP_SYNC_SUPPORTED,
+                                       ECORE_X_ATOM_WINDOW,
+                                       &win2, 1);
         if ((ret == 1) && (win2 == win))
-          {
-             return 1;
-          }
+           return 1;
      }
+
    return 0;
 }
 
@@ -753,7 +892,7 @@ EAPI void
 ecore_x_e_comp_sync_begin_send(Ecore_X_Window win)
 {
    XEvent xev;
-   
+
    LOGFN(__FILE__, __LINE__, __FUNCTION__);
    xev.xclient.type = ClientMessage;
    xev.xclient.display = _ecore_x_disp;
@@ -765,9 +904,9 @@ ecore_x_e_comp_sync_begin_send(Ecore_X_Window win)
    xev.xclient.data.l[2] = 0; // later
    xev.xclient.data.l[3] = 0; // later
    xev.xclient.data.l[4] = 0; // later
-   
+
    XSendEvent(_ecore_x_disp, win, False,
-              NoEventMask, //SubstructureRedirectMask | SubstructureNotifyMask, 
+              NoEventMask, //SubstructureRedirectMask | SubstructureNotifyMask,
               &xev);
 }
 
@@ -775,7 +914,7 @@ EAPI void
 ecore_x_e_comp_sync_end_send(Ecore_X_Window win)
 {
    XEvent xev;
-   
+
    LOGFN(__FILE__, __LINE__, __FUNCTION__);
    xev.xclient.type = ClientMessage;
    xev.xclient.display = _ecore_x_disp;
@@ -787,9 +926,9 @@ ecore_x_e_comp_sync_end_send(Ecore_X_Window win)
    xev.xclient.data.l[2] = 0; // later
    xev.xclient.data.l[3] = 0; // later
    xev.xclient.data.l[4] = 0; // later
-   
+
    XSendEvent(_ecore_x_disp, win, False,
-              NoEventMask, //SubstructureRedirectMask | SubstructureNotifyMask, 
+              NoEventMask, //SubstructureRedirectMask | SubstructureNotifyMask,
               &xev);
 }
 
@@ -797,7 +936,7 @@ EAPI void
 ecore_x_e_comp_sync_cancel_send(Ecore_X_Window win)
 {
    XEvent xev;
-   
+
    LOGFN(__FILE__, __LINE__, __FUNCTION__);
    xev.xclient.type = ClientMessage;
    xev.xclient.display = _ecore_x_disp;
@@ -809,9 +948,9 @@ ecore_x_e_comp_sync_cancel_send(Ecore_X_Window win)
    xev.xclient.data.l[2] = 0; // later
    xev.xclient.data.l[3] = 0; // later
    xev.xclient.data.l[4] = 0; // later
-   
+
    XSendEvent(_ecore_x_disp, win, False,
-              NoEventMask, //SubstructureRedirectMask | SubstructureNotifyMask, 
+              NoEventMask, //SubstructureRedirectMask | SubstructureNotifyMask,
               &xev);
 }
 
@@ -819,7 +958,7 @@ EAPI void
 ecore_x_e_comp_flush_send(Ecore_X_Window win)
 {
    XEvent xev;
-   
+
    LOGFN(__FILE__, __LINE__, __FUNCTION__);
    xev.xclient.type = ClientMessage;
    xev.xclient.display = _ecore_x_disp;
@@ -831,9 +970,9 @@ ecore_x_e_comp_flush_send(Ecore_X_Window win)
    xev.xclient.data.l[2] = 0; // later
    xev.xclient.data.l[3] = 0; // later
    xev.xclient.data.l[4] = 0; // later
-   
+
    XSendEvent(_ecore_x_disp, win, False,
-              NoEventMask, //SubstructureRedirectMask | SubstructureNotifyMask, 
+              NoEventMask, //SubstructureRedirectMask | SubstructureNotifyMask,
               &xev);
 }
 
@@ -841,7 +980,7 @@ EAPI void
 ecore_x_e_comp_dump_send(Ecore_X_Window win)
 {
    XEvent xev;
-   
+
    LOGFN(__FILE__, __LINE__, __FUNCTION__);
    xev.xclient.type = ClientMessage;
    xev.xclient.display = _ecore_x_disp;
@@ -853,21 +992,21 @@ ecore_x_e_comp_dump_send(Ecore_X_Window win)
    xev.xclient.data.l[2] = 0; // later
    xev.xclient.data.l[3] = 0; // later
    xev.xclient.data.l[4] = 0; // later
-   
+
    XSendEvent(_ecore_x_disp, win, False,
-              NoEventMask, //SubstructureRedirectMask | SubstructureNotifyMask, 
+              NoEventMask, //SubstructureRedirectMask | SubstructureNotifyMask,
               &xev);
 }
 
-EAPI void 
+EAPI void
 ecore_x_e_comp_pixmap_set(Ecore_X_Window win, Ecore_X_Pixmap pixmap)
 {
    LOGFN(__FILE__, __LINE__, __FUNCTION__);
    if (pixmap)
-     ecore_x_window_prop_xid_set(win, ECORE_X_ATOM_E_COMP_DUMP,
-                                 ECORE_X_ATOM_PIXMAP, &pixmap, 1);
+      ecore_x_window_prop_xid_set(win, ECORE_X_ATOM_E_COMP_DUMP,
+                                  ECORE_X_ATOM_PIXMAP, &pixmap, 1);
    else
-     ecore_x_window_prop_property_del(win, pixmap);
+      ecore_x_window_prop_property_del(win, pixmap);
 }
 
 EAPI Ecore_X_Pixmap
@@ -877,12 +1016,14 @@ ecore_x_e_comp_pixmap_get(Ecore_X_Window win)
    Ecore_X_Pixmap pixmap = 0;
 
    LOGFN(__FILE__, __LINE__, __FUNCTION__);
-   ret = 
-     ecore_x_window_prop_xid_get(win, 
-                                 ECORE_X_ATOM_E_COMP_DUMP,
-                                 ECORE_X_ATOM_PIXMAP,
-                                 &pixmap, 1);
-   if (ret != 1) return 0;
+   ret =
+      ecore_x_window_prop_xid_get(win,
+                                  ECORE_X_ATOM_E_COMP_DUMP,
+                                  ECORE_X_ATOM_PIXMAP,
+                                  &pixmap, 1);
+   if (ret != 1)
+      return 0;
+
    return pixmap;
 }
 
index ccf3822..294d823 100644 (file)
 #include "ecore_x_private.h"
 #include "Ecore_X.h"
 
-static void _ecore_x_error_handle(Display * d, XErrorEvent * ev);
+static void _ecore_x_error_handle(Display *d, XErrorEvent *ev);
 static int  _ecore_x_io_error_handle(Display *d);
 
-static void (*_error_func) (void *data) = NULL;
+static void (*_error_func)(void *data) = NULL;
 static void *_error_data = NULL;
-static void (*_io_error_func) (void *data) = NULL;
+static void (*_io_error_func)(void *data) = NULL;
 static void *_io_error_data = NULL;
-static int   _error_request_code = 0;
-static int   _error_code = 0;
+static int _error_request_code = 0;
+static int _error_code = 0;
 
 /**
  * Set the error handler.
  * @param func The error handler function
  * @param data The data to be passed to the handler function
- * 
+ *
  * Set the X error handler function
  */
 EAPI void
-ecore_x_error_handler_set(void (*func) (void *data), const void *data)
+ecore_x_error_handler_set(void (*func)(void *data), const void *data)
 {
    _error_func = func;
    _error_data = (void *)data;
@@ -41,11 +41,11 @@ ecore_x_error_handler_set(void (*func) (void *data), const void *data)
  * Set the I/O error handler.
  * @param func The I/O error handler function
  * @param data The data to be passed to the handler function
- * 
+ *
  * Set the X I/O error handler function
  */
 EAPI void
-ecore_x_io_error_handler_set(void (*func) (void *data), const void *data)
+ecore_x_io_error_handler_set(void (*func)(void *data), const void *data)
 {
    _io_error_func = func;
    _io_error_data = (void *)data;
@@ -54,7 +54,7 @@ ecore_x_io_error_handler_set(void (*func) (void *data), const void *data)
 /**
  * Get the request code that caused the error.
  * @return The request code causing the X error
- * 
+ *
  * Return the X request code that caused the last X error
  */
 EAPI int
@@ -66,7 +66,7 @@ ecore_x_error_request_get(void)
 /**
  * Get the error code from the error.
  * @return The error code from the X error
- * 
+ *
  * Return the error code from the last X error
  */
 EAPI int
@@ -79,27 +79,31 @@ void
 _ecore_x_error_handler_init(void)
 {
    XSetErrorHandler((XErrorHandler)_ecore_x_error_handle);
-   XSetIOErrorHandler((XIOErrorHandler)_ecore_x_io_error_handle);   
+   XSetIOErrorHandler((XIOErrorHandler)_ecore_x_io_error_handle);
 }
 
 static void
 _ecore_x_error_handle(Display *d, XErrorEvent *ev)
 {
-    if (d == _ecore_x_disp)
+   if (d == _ecore_x_disp)
      {
-       _error_request_code = ev->request_code;
-       _error_code = ev->error_code;
-       if (_error_func) _error_func(_error_data);
+        _error_request_code = ev->request_code;
+        _error_code = ev->error_code;
+        if (_error_func)
+           _error_func(_error_data);
      }
 }
 
 static int
 _ecore_x_io_error_handle(Display *d)
 {
-    if (d == _ecore_x_disp)
+   if (d == _ecore_x_disp)
      {
-       if (_io_error_func) _io_error_func(_io_error_data);
-       else exit(-1);
+        if (_io_error_func)
+           _io_error_func(_io_error_data);
+        else
+           exit(-1);
      }
+
    return 0;
 }
index ede31a1..3997e5a 100644 (file)
 #endif
 
 #if 0
-static void _ecore_x_event_free_window_prop_name_class_change(void *data, void *ev);
+static void _ecore_x_event_free_window_prop_name_class_change(void *data,
+                                                              void *ev);
 static void _ecore_x_event_free_window_prop_title_change(void *data, void *ev);
-static void _ecore_x_event_free_window_prop_visible_title_change(void *data, void *ev);
-static void _ecore_x_event_free_window_prop_icon_name_change(void *data, void *ev);
-static void _ecore_x_event_free_window_prop_visible_icon_name_change(void *data, void *ev);
-static void _ecore_x_event_free_window_prop_client_machine_change(void *data, void *ev);
+static void _ecore_x_event_free_window_prop_visible_title_change(void *data,
+                                                                 void *ev);
+static void _ecore_x_event_free_window_prop_icon_name_change(void *data,
+                                                             void *ev);
+static void _ecore_x_event_free_window_prop_visible_icon_name_change(void *data,
+                                                                     void *ev);
+static void _ecore_x_event_free_window_prop_client_machine_change(void *data,
+                                                                  void *ev);
 #endif
 
 static Window _ecore_x_mouse_down_last_win = 0;
@@ -54,9 +59,10 @@ _ecore_x_event_free_mouse_move(void *data __UNUSED__, void *ev)
    e = ev;
    if (_ecore_x_last_event_mouse_move)
      {
-       _ecore_x_last_event_mouse_move_event = NULL;
-       _ecore_x_last_event_mouse_move = 0;
+        _ecore_x_last_event_mouse_move_event = NULL;
+        _ecore_x_last_event_mouse_move = 0;
      }
+
    free(e);
 }
 
@@ -67,7 +73,9 @@ ecore_x_event_mask_set(Ecore_X_Window w, Ecore_X_Event_Mask mask)
    XSetWindowAttributes s_attr;
 
    LOGFN(__FILE__, __LINE__, __FUNCTION__);
-   if (!w) w = DefaultRootWindow(_ecore_x_disp);
+   if (!w)
+      w = DefaultRootWindow(_ecore_x_disp);
+
    memset(&attr, 0, sizeof(XWindowAttributes));
    XGetWindowAttributes(_ecore_x_disp, w, &attr);
    s_attr.event_mask = mask | attr.your_event_mask;
@@ -81,7 +89,9 @@ ecore_x_event_mask_unset(Ecore_X_Window w, Ecore_X_Event_Mask mask)
    XSetWindowAttributes s_attr;
 
    LOGFN(__FILE__, __LINE__, __FUNCTION__);
-   if (!w) w = DefaultRootWindow(_ecore_x_disp);
+   if (!w)
+      w = DefaultRootWindow(_ecore_x_disp);
+
    memset(&attr, 0, sizeof(XWindowAttributes));
    XGetWindowAttributes(_ecore_x_disp, w, &attr);
    s_attr.event_mask = attr.your_event_mask & ~mask;
@@ -95,9 +105,13 @@ _ecore_x_event_free_window_prop_name_class_change(void *data, void *ev)
    Ecore_X_Event_Window_Prop_Name_Class_Change *e;
 
    e = ev;
-   if (e->name) free(e->name);
-   if (e->clas) free(e->clas);
-   free(e);
+   if (e->name)
+      free(e->name);
+
+   if (e->clas)
+      free(e->clas);
+
+      free(e);
 }
 
 static void
@@ -106,8 +120,10 @@ _ecore_x_event_free_window_prop_title_change(void *data, void *ev)
    Ecore_X_Event_Window_Prop_Title_Change *e;
 
    e = ev;
-   if (e->title) free(e->title);
-   free(e);
+   if (e->title)
+      free(e->title);
+
+      free(e);
 }
 
 static void
@@ -116,8 +132,10 @@ _ecore_x_event_free_window_prop_visible_title_change(void *data, void *ev)
    Ecore_X_Event_Window_Prop_Visible_Title_Change *e;
 
    e = ev;
-   if (e->title) free(e->title);
-   free(e);
+   if (e->title)
+      free(e->title);
+
+      free(e);
 }
 
 static void
@@ -126,8 +144,10 @@ _ecore_x_event_free_window_prop_icon_name_change(void *data, void *ev)
    Ecore_X_Event_Window_Prop_Icon_Name_Change *e;
 
    e = ev;
-   if (e->name) free(e->name);
-   free(e);
+   if (e->name)
+      free(e->name);
+
+      free(e);
 }
 
 static void
@@ -136,8 +156,10 @@ _ecore_x_event_free_window_prop_visible_icon_name_change(void *data, void *ev)
    Ecore_X_Event_Window_Prop_Visible_Icon_Name_Change *e;
 
    e = ev;
-   if (e->name) free(e->name);
-   free(e);
+   if (e->name)
+      free(e->name);
+
+      free(e);
 }
 
 static void
@@ -146,8 +168,10 @@ _ecore_x_event_free_window_prop_client_machine_change(void *data, void *ev)
    Ecore_X_Event_Window_Prop_Client_Machine_Change *e;
 
    e = ev;
-   if (e->name) free(e->name);
-   free(e);
+   if (e->name)
+      free(e->name);
+
+      free(e);
 }
 #endif
 
@@ -159,7 +183,7 @@ _ecore_x_event_free_xdnd_enter(void *data __UNUSED__, void *ev)
 
    e = ev;
    for (i = 0; i < e->num_types; i++)
-     XFree(e->types[i]);
+      XFree(e->types[i]);
    free(e->types);
    free(e);
 }
@@ -172,7 +196,9 @@ _ecore_x_event_free_selection_notify(void *data __UNUSED__, void *ev)
 
    e = ev;
    sel = e->data;
-   if (sel->free) sel->free(sel);
+   if (sel->free)
+      sel->free(sel);
+
    free(e->target);
    free(e);
 }
@@ -180,34 +206,59 @@ _ecore_x_event_free_selection_notify(void *data __UNUSED__, void *ev)
 static unsigned int
 _ecore_x_event_modifiers(unsigned int state)
 {
-   unsigned int        modifiers = 0;
+   unsigned int modifiers = 0;
+
+   if (state & ECORE_X_MODIFIER_SHIFT)
+      modifiers |= ECORE_EVENT_MODIFIER_SHIFT;
+
+   if (state & ECORE_X_MODIFIER_CTRL)
+      modifiers |= ECORE_EVENT_MODIFIER_CTRL;
 
-   if (state & ECORE_X_MODIFIER_SHIFT) modifiers |= ECORE_EVENT_MODIFIER_SHIFT;
-   if (state & ECORE_X_MODIFIER_CTRL) modifiers |= ECORE_EVENT_MODIFIER_CTRL;
-   if (state & ECORE_X_MODIFIER_ALT) modifiers |= ECORE_EVENT_MODIFIER_ALT;
-   if (state & ECORE_X_MODIFIER_WIN) modifiers |= ECORE_EVENT_MODIFIER_WIN;
-   if (state & ECORE_X_LOCK_SCROLL) modifiers |= ECORE_EVENT_LOCK_SCROLL;
-   if (state & ECORE_X_LOCK_NUM) modifiers |= ECORE_EVENT_LOCK_NUM;
-   if (state & ECORE_X_LOCK_CAPS) modifiers |= ECORE_EVENT_LOCK_CAPS;
+   if (state & ECORE_X_MODIFIER_ALT)
+      modifiers |= ECORE_EVENT_MODIFIER_ALT;
+
+   if (state & ECORE_X_MODIFIER_WIN)
+      modifiers |= ECORE_EVENT_MODIFIER_WIN;
+
+   if (state & ECORE_X_LOCK_SCROLL)
+      modifiers |= ECORE_EVENT_LOCK_SCROLL;
+
+   if (state & ECORE_X_LOCK_NUM)
+      modifiers |= ECORE_EVENT_LOCK_NUM;
+
+   if (state & ECORE_X_LOCK_CAPS)
+      modifiers |= ECORE_EVENT_LOCK_CAPS;
 
    return modifiers;
 }
 
 void
-_ecore_mouse_move(unsigned int timestamp, unsigned int xmodifiers,
-                 int x, int y,
-                 int x_root, int y_root,
-                 unsigned int event_window,
-                 unsigned int window,
-                 unsigned int root_win,
-                 int same_screen,
-                  int dev, double radx, double rady, double pressure, double angle, double mx, double my, double mrx, double mry)
+_ecore_mouse_move(unsigned int timestamp,
+                  unsigned int xmodifiers,
+                  int x,
+                  int y,
+                  int x_root,
+                  int y_root,
+                  unsigned int event_window,
+                  unsigned int window,
+                  unsigned int root_win,
+                  int same_screen,
+                  int dev,
+                  double radx,
+                  double rady,
+                  double pressure,
+                  double angle,
+                  double mx,
+                  double my,
+                  double mrx,
+                  double mry)
 {
    Ecore_Event_Mouse_Move *e;
    Ecore_Event *event;
 
    e = malloc(sizeof(Ecore_Event_Mouse_Move));
-   if (!e) return ;
+   if (!e)
+      return;
 
    e->window = window;
    e->root_window = root_win;
@@ -231,8 +282,11 @@ _ecore_mouse_move(unsigned int timestamp, unsigned int xmodifiers,
    e->multi.y = my;
    e->multi.root.x = mrx;
    e->multi.root.y = mry;
-   
-   event = ecore_event_add(ECORE_EVENT_MOUSE_MOVE, e, _ecore_x_event_free_mouse_move, NULL);
+
+   event = ecore_event_add(ECORE_EVENT_MOUSE_MOVE,
+                           e,
+                           _ecore_x_event_free_mouse_move,
+                           NULL);
 
    _ecore_x_event_last_time = timestamp;
    _ecore_x_event_last_win = window;
@@ -258,12 +312,16 @@ _ecore_key_press(int event, XKeyEvent *xevent)
 
    _ecore_x_last_event_mouse_move = 0;
    keyname = XKeysymToString(XKeycodeToKeysym(xevent->display,
-                                             xevent->keycode, 0));
+                                              xevent->keycode, 0));
    if (!keyname)
      {
-       snprintf(keyname_buffer, sizeof(keyname_buffer), "Keycode-%i", xevent->keycode);
-       keyname = keyname_buffer;
-       if (!keyname) return ;
+        snprintf(keyname_buffer,
+                 sizeof(keyname_buffer),
+                 "Keycode-%i",
+                 xevent->keycode);
+        keyname = keyname_buffer;
+        if (!keyname)
+           return;
      }
 
    sym = 0;
@@ -271,74 +329,109 @@ _ecore_key_press(int event, XKeyEvent *xevent)
    compose = NULL;
    if (_ecore_x_ic)
      {
-       Status mbstatus;
+        Status mbstatus;
 #ifdef X_HAVE_UTF8_STRING
-       val = Xutf8LookupString(_ecore_x_ic, (XKeyEvent *)xevent, compose_buffer, sizeof(compose_buffer) - 1, &sym, &mbstatus);
+        val = Xutf8LookupString(_ecore_x_ic,
+                                (XKeyEvent *)xevent,
+                                compose_buffer,
+                                sizeof(compose_buffer) - 1,
+                                &sym,
+                                &mbstatus);
 #else
-       val = XmbLookupString(_ecore_x_ic, (XKeyEvent *)xevent, compose_buffer, sizeof(compose_buffer) - 1, &sym, &mbstatus);
+        val = XmbLookupString(_ecore_x_ic,
+                              (XKeyEvent *)xevent,
+                              compose_buffer,
+                              sizeof(compose_buffer) - 1,
+                              &sym,
+                              &mbstatus);
 #endif
-       if (mbstatus == XBufferOverflow)
-         {
-            tmp = malloc(sizeof (char) * (val + 1));
-            if (!tmp) return ;
+        if (mbstatus == XBufferOverflow)
+          {
+             tmp = malloc(sizeof (char) * (val + 1));
+             if (!tmp)
+                return;
 
-            compose = tmp;
+             compose = tmp;
 
 #ifdef X_HAVE_UTF8_STRING
-            val = Xutf8LookupString(_ecore_x_ic, (XKeyEvent *)xevent, tmp, val, &sym, &mbstatus);
+             val = Xutf8LookupString(_ecore_x_ic,
+                                     (XKeyEvent *)xevent,
+                                     tmp,
+                                     val,
+                                     &sym,
+                                     &mbstatus);
 #else
-            val = XmbLookupString(_ecore_x_ic, (XKeyEvent *)xevent, tmp, val, &sym, &mbstatus);
+             val = XmbLookupString(_ecore_x_ic,
+                                   (XKeyEvent *)xevent,
+                                   tmp,
+                                   val,
+                                   &sym,
+                                   &mbstatus);
 #endif
-            if (val > 0)
-              {
-                 tmp[val] = 0;
+             if (val > 0)
+               {
+                  tmp[val] = 0;
 
 #ifndef X_HAVE_UTF8_STRING
-                 compose = eina_str_convert(nl_langinfo(CODESET), "UTF-8", tmp);
-                 free(tmp);
-                 tmp = compose;
+                  compose = eina_str_convert(nl_langinfo(CODESET), "UTF-8", tmp);
+                  free(tmp);
+                  tmp = compose;
 #endif
-              }
-            else compose = NULL;
-         }
-       else
-         if (val > 0)
-           {
-              compose_buffer[val] = 0;
+               }
+             else
+                compose = NULL;
+          }
+        else
+        if (val > 0)
+          {
+             compose_buffer[val] = 0;
 #ifdef X_HAVE_UTF8_STRING
-              compose = compose_buffer;
+             compose = compose_buffer;
 #else
-              compose = eina_str_convert(nl_langinfo(CODESET), "UTF-8", compose_buffer);
-              tmp = compose;
+             compose = eina_str_convert(nl_langinfo(
+                                           CODESET), "UTF-8", compose_buffer);
+             tmp = compose;
 #endif
-           }
+          }
      }
    else
      {
-       val = XLookupString(xevent, compose_buffer, sizeof(compose_buffer), &sym, &status);
-       if (val > 0)
-         {
-            compose_buffer[val] = 0;
-            compose = eina_str_convert(nl_langinfo(CODESET), "UTF-8", compose_buffer);
-            tmp = compose;
-         }
+        val = XLookupString(xevent,
+                            compose_buffer,
+                            sizeof(compose_buffer),
+                            &sym,
+                            &status);
+        if (val > 0)
+          {
+             compose_buffer[val] = 0;
+             compose = eina_str_convert(nl_langinfo(
+                                           CODESET), "UTF-8", compose_buffer);
+             tmp = compose;
+          }
      }
 
    key = XKeysymToString(sym);
-   if (!key) key = keyname;
-   if (!key) goto on_error;
+   if (!key)
+      key = keyname;
+
+   if (!key)
+      goto on_error;
 
-   e = malloc(sizeof(Ecore_Event_Key) + strlen(key) + strlen(keyname) + (compose ? strlen(compose) : 0) + 3);
-   if (!e) goto on_error;
+   e =
+      malloc(sizeof(Ecore_Event_Key) + strlen(key) + strlen(keyname) +
+             (compose ? strlen(compose) : 0) + 3);
+   if (!e)
+      goto on_error;
 
-   e->keyname = (char*) (e + 1);
+   e->keyname = (char *)(e + 1);
    e->key = e->keyname + strlen(keyname) + 1;
    e->compose = (compose) ? e->key + strlen(key) + 1 : NULL;
    e->string = e->compose;
 
-   strcpy((char *) e->keyname, keyname);
-   strcpy((char *) e->key, key);
-   if (compose) strcpy((char *) e->compose, compose);
+      strcpy((char *)e->keyname, keyname);
+      strcpy((char *)e->key,     key);
+   if (compose)
+      strcpy((char *)e->compose, compose);
 
    e->modifiers = _ecore_x_event_modifiers(xevent->state);
 
@@ -352,26 +445,39 @@ _ecore_key_press(int event, XKeyEvent *xevent)
 
    _ecore_x_event_last_time = e->timestamp;
 
- on_error:
-   if (tmp) free(tmp);
+on_error:
+   if (tmp)
+      free(tmp);
 }
 
 Ecore_Event_Mouse_Button *
 _ecore_mouse_button(int event,
-                   unsigned int timestamp, unsigned int xmodifiers,
-                   unsigned int buttons,
-                   int x, int y,
-                   int x_root, int y_root,
-                   unsigned int event_window,
-                   unsigned int window,
-                   unsigned int root_win,
-                   int same_screen,
-                    int dev, double radx, double rady, double pressure, double angle, double mx, double my, double mrx, double mry)
+                    unsigned int timestamp,
+                    unsigned int xmodifiers,
+                    unsigned int buttons,
+                    int x,
+                    int y,
+                    int x_root,
+                    int y_root,
+                    unsigned int event_window,
+                    unsigned int window,
+                    unsigned int root_win,
+                    int same_screen,
+                    int dev,
+                    double radx,
+                    double rady,
+                    double pressure,
+                    double angle,
+                    double mx,
+                    double my,
+                    double mrx,
+                    double mry)
 {
    Ecore_Event_Mouse_Button *e;
 
    e = malloc(sizeof(Ecore_Event_Mouse_Button));
-   if (!e) return NULL;
+   if (!e)
+      return NULL;
 
    e->window = window;
    e->root_window = root_win;
@@ -390,32 +496,33 @@ _ecore_mouse_button(int event,
 
    if (event_window == window)
      {
-       if (((int)(timestamp - _ecore_x_mouse_down_last_time) <=
-            (int)(1000 * _ecore_x_double_click_time)) &&
-           (window == _ecore_x_mouse_down_last_win) &&
-           (event_window == _ecore_x_mouse_down_last_event_win)
-           )
-         e->double_click = 1;
-       if (((int)(timestamp - _ecore_x_mouse_down_last_last_time) <=
-            (int)(2 * 1000 * _ecore_x_double_click_time)) &&
-           (window == _ecore_x_mouse_down_last_win) &&
-           (window == _ecore_x_mouse_down_last_last_win) &&
-           (event_window == _ecore_x_mouse_down_last_event_win) &&
-           (event_window == _ecore_x_mouse_down_last_last_event_win)
-           )
-         {
-            e->triple_click = 1;
-            _ecore_x_mouse_down_did_triple = 1;
-         }
-       else
-         _ecore_x_mouse_down_did_triple = 0;
+        if (((int)(timestamp - _ecore_x_mouse_down_last_time) <=
+             (int)(1000 * _ecore_x_double_click_time)) &&
+            (window == _ecore_x_mouse_down_last_win) &&
+            (event_window == _ecore_x_mouse_down_last_event_win)
+            )
+           e->double_click = 1;
+
+        if (((int)(timestamp - _ecore_x_mouse_down_last_last_time) <=
+             (int)(2 * 1000 * _ecore_x_double_click_time)) &&
+            (window == _ecore_x_mouse_down_last_win) &&
+            (window == _ecore_x_mouse_down_last_last_win) &&
+            (event_window == _ecore_x_mouse_down_last_event_win) &&
+            (event_window == _ecore_x_mouse_down_last_last_event_win)
+            )
+          {
+             e->triple_click = 1;
+             _ecore_x_mouse_down_did_triple = 1;
+          }
+        else
+           _ecore_x_mouse_down_did_triple = 0;
      }
 
    if (event == ECORE_EVENT_MOUSE_BUTTON_DOWN
        && !e->double_click
        && !e->triple_click)
-     _ecore_x_mouse_up_count = 0;
-   
+      _ecore_x_mouse_up_count = 0;
+
    e->multi.device = dev;
    e->multi.radius = (radx + rady) / 2;
    e->multi.radius_x = radx;
@@ -426,7 +533,7 @@ _ecore_mouse_button(int event,
    e->multi.y = my;
    e->multi.root.x = mrx;
    e->multi.root.y = mry;
-   
+
    _ecore_x_event_last_time = e->timestamp;
    _ecore_x_event_last_win = e->window;
    _ecore_x_event_last_root_x = x_root;
@@ -440,8 +547,8 @@ _ecore_mouse_button(int event,
 void
 _ecore_x_event_handle_any_event(XEvent *xevent)
 {
-   XEventev = malloc(sizeof(XEvent));
-   
+   XEvent *ev = malloc(sizeof(XEvent));
+
    memcpy(ev, xevent, sizeof(XEvent));
    ecore_event_add(ECORE_X_EVENT_ANY, ev, NULL, NULL);
 }
@@ -449,13 +556,13 @@ _ecore_x_event_handle_any_event(XEvent *xevent)
 void
 _ecore_x_event_handle_key_press(XEvent *xevent)
 {
-   _ecore_key_press(ECORE_EVENT_KEY_DOWN, (XKeyEvent *) xevent);
+   _ecore_key_press(ECORE_EVENT_KEY_DOWN, (XKeyEvent *)xevent);
 }
 
 void
 _ecore_x_event_handle_key_release(XEvent *xevent)
 {
-   _ecore_key_press(ECORE_EVENT_KEY_UP, (XKeyEvent *) xevent);
+   _ecore_key_press(ECORE_EVENT_KEY_UP, (XKeyEvent *)xevent);
 }
 
 void
@@ -466,144 +573,175 @@ _ecore_x_event_handle_button_press(XEvent *xevent)
    _ecore_x_last_event_mouse_move = 0;
    if ((xevent->xbutton.button > 3) && (xevent->xbutton.button < 8))
      {
-       Ecore_Event_Mouse_Wheel *e;
-
-       e = malloc(sizeof(Ecore_Event_Mouse_Wheel));
-       if (!e) return;
-
-       e->timestamp = xevent->xbutton.time;
-       e->modifiers = _ecore_x_event_modifiers(xevent->xbutton.state);
-       switch (xevent->xbutton.button)
-         {
-          case 4: e->direction = 0; e->z = -1; break;
-          case 5: e->direction = 0; e->z = 1; break;
-          case 6: e->direction = 1; e->z = -1; break;
-          case 7: e->direction = 1; e->z = 1; break;
+        Ecore_Event_Mouse_Wheel *e;
+
+        e = malloc(sizeof(Ecore_Event_Mouse_Wheel));
+        if (!e)
+           return;
+
+        e->timestamp = xevent->xbutton.time;
+        e->modifiers = _ecore_x_event_modifiers(xevent->xbutton.state);
+        switch (xevent->xbutton.button)
+          {
+           case 4: e->direction = 0; e->z = -1; break;
+
+           case 5: e->direction = 0; e->z = 1; break;
+
+           case 6: e->direction = 1; e->z = -1; break;
+
+           case 7: e->direction = 1; e->z = 1; break;
+
            default: e->direction = 0; e->z = 0; break;
-         }
-
-       e->x = xevent->xbutton.x;
-       e->y = xevent->xbutton.y;
-       e->root.x = xevent->xbutton.x_root;
-       e->root.y = xevent->xbutton.y_root;
-
-       if (xevent->xbutton.subwindow) e->window = xevent->xbutton.subwindow;
-       else e->window = xevent->xbutton.window;
-       e->event_window = xevent->xbutton.window;
-       e->same_screen = xevent->xbutton.same_screen;
-       e->root_window = xevent->xbutton.root;
-
-       _ecore_x_event_last_time = e->timestamp;
-       _ecore_x_event_last_win = e->window;
-       _ecore_x_event_last_root_x = xevent->xbutton.x_root;
-       _ecore_x_event_last_root_y = xevent->xbutton.y_root;
-       ecore_event_add(ECORE_EVENT_MOUSE_WHEEL, e, NULL, NULL);
-
-       for (i = 0; i < _ecore_window_grabs_num; i++)
-         {
-            if ((_ecore_window_grabs[i] == xevent->xbutton.window) ||
-                (_ecore_window_grabs[i] == xevent->xbutton.subwindow))
-              {
-                 Eina_Bool replay = EINA_FALSE;
-
-                 if (_ecore_window_grab_replay_func)
-                   replay = _ecore_window_grab_replay_func(_ecore_window_grab_replay_data,
-                                                           ECORE_EVENT_MOUSE_WHEEL,
-                                                           e);
-                 if (replay)
-                   XAllowEvents(xevent->xbutton.display,
-                                ReplayPointer, xevent->xbutton.time);
-                 else
-                   XAllowEvents(xevent->xbutton.display,
-                                AsyncPointer, xevent->xbutton.time);
-                 break;
-              }
-         }
+          }
+
+        e->x = xevent->xbutton.x;
+        e->y = xevent->xbutton.y;
+        e->root.x = xevent->xbutton.x_root;
+        e->root.y = xevent->xbutton.y_root;
+
+        if (xevent->xbutton.subwindow)
+           e->window = xevent->xbutton.subwindow;
+        else
+           e->window = xevent->xbutton.window;
+
+        e->event_window = xevent->xbutton.window;
+        e->same_screen = xevent->xbutton.same_screen;
+        e->root_window = xevent->xbutton.root;
+
+        _ecore_x_event_last_time = e->timestamp;
+        _ecore_x_event_last_win = e->window;
+        _ecore_x_event_last_root_x = xevent->xbutton.x_root;
+        _ecore_x_event_last_root_y = xevent->xbutton.y_root;
+        ecore_event_add(ECORE_EVENT_MOUSE_WHEEL, e, NULL, NULL);
+
+        for (i = 0; i < _ecore_window_grabs_num; i++)
+          {
+             if ((_ecore_window_grabs[i] == xevent->xbutton.window) ||
+                 (_ecore_window_grabs[i] == xevent->xbutton.subwindow))
+               {
+                  Eina_Bool replay = EINA_FALSE;
+
+                  if (_ecore_window_grab_replay_func)
+                     replay = _ecore_window_grab_replay_func(
+                           _ecore_window_grab_replay_data,
+                           ECORE_EVENT_MOUSE_WHEEL,
+                           e);
+
+                  if (replay)
+                     XAllowEvents(xevent->xbutton.display,
+                                  ReplayPointer, xevent->xbutton.time);
+                  else
+                     XAllowEvents(xevent->xbutton.display,
+                                  AsyncPointer, xevent->xbutton.time);
+
+                  break;
+               }
+          }
      }
    else
      {
-       {
-          _ecore_mouse_move(xevent->xbutton.time, xevent->xbutton.state,
-                            xevent->xbutton.x, xevent->xbutton.y,
-                            xevent->xbutton.x_root, xevent->xbutton.y_root,
-                            xevent->xbutton.window,
-                            (xevent->xbutton.subwindow ? xevent->xbutton.subwindow : xevent->xbutton.window),
-                            xevent->xbutton.root,
-                            xevent->xbutton.same_screen,
+        {
+           _ecore_mouse_move(xevent->xbutton.time, xevent->xbutton.state,
+                             xevent->xbutton.x, xevent->xbutton.y,
+                             xevent->xbutton.x_root, xevent->xbutton.y_root,
+                             xevent->xbutton.window,
+                             (xevent->xbutton.subwindow ? xevent->xbutton.
+                              subwindow : xevent->xbutton.window),
+                             xevent->xbutton.root,
+                             xevent->xbutton.same_screen,
                              0, 1, 1,
                              1.0, // pressure
                              0.0, // angle
                              xevent->xbutton.x, xevent->xbutton.y,
                              xevent->xbutton.x_root, xevent->xbutton.y_root);
-       }
-       {
-          Ecore_Event_Mouse_Button *e;
-          int event_window;
-          int window;
-
-          if (_ecore_x_mouse_down_did_triple)
-            {
-               _ecore_x_mouse_down_last_win = 0;
-               _ecore_x_mouse_down_last_last_win = 0;
-               _ecore_x_mouse_down_last_event_win = 0;
-               _ecore_x_mouse_down_last_last_event_win = 0;
-               _ecore_x_mouse_down_last_time = 0;
-               _ecore_x_mouse_down_last_last_time = 0;
-            }
-
-          window = (xevent->xbutton.subwindow ? xevent->xbutton.subwindow : xevent->xbutton.window);
-          event_window = xevent->xbutton.window;
-
-          e = _ecore_mouse_button(ECORE_EVENT_MOUSE_BUTTON_DOWN,
-                                  xevent->xbutton.time, xevent->xbutton.state,
-                                  xevent->xbutton.button,
-                                  xevent->xbutton.x, xevent->xbutton.y,
-                                  xevent->xbutton.x_root, xevent->xbutton.y_root,
-                                  event_window, window,
-                                  xevent->xbutton.root, xevent->xbutton.same_screen,
-                                   0, 1, 1,
-                                   1.0, // pressure
-                                   0.0, // angle
-                                   xevent->xbutton.x, xevent->xbutton.y,
-                                   xevent->xbutton.x_root, xevent->xbutton.y_root);
-          if (e)
-            for (i = 0; i < _ecore_window_grabs_num; i++)
-              {
-                 if ((_ecore_window_grabs[i] == xevent->xbutton.window) ||
-                     (_ecore_window_grabs[i] == xevent->xbutton.subwindow))
-                   {
-                      Eina_Bool replay = EINA_FALSE;
-
-                      if (_ecore_window_grab_replay_func)
-                        replay = _ecore_window_grab_replay_func(_ecore_window_grab_replay_data,
-                                                                ECORE_EVENT_MOUSE_BUTTON_DOWN,
-                                                                e);
-                      if (replay)
-                        XAllowEvents(xevent->xbutton.display,
-                                     ReplayPointer, xevent->xbutton.time);
-                      else
-                        XAllowEvents(xevent->xbutton.display,
-                                     AsyncPointer, xevent->xbutton.time);
-                      break;
-                   }
-              }
-
-          if (window == event_window)
-            {
-               if (!_ecore_x_mouse_down_did_triple)
-                 {
-                    _ecore_x_mouse_down_last_last_win = _ecore_x_mouse_down_last_win;
-                    if (xevent->xbutton.subwindow)
-                      _ecore_x_mouse_down_last_win = xevent->xbutton.subwindow;
-                    else
-                      _ecore_x_mouse_down_last_win = xevent->xbutton.window;
-                    _ecore_x_mouse_down_last_last_event_win = _ecore_x_mouse_down_last_event_win;
-                    _ecore_x_mouse_down_last_event_win = xevent->xbutton.window;
-                    _ecore_x_mouse_down_last_last_time = _ecore_x_mouse_down_last_time;
-                    _ecore_x_mouse_down_last_time = xevent->xbutton.time;
-                 }
-            }
-       }
+        }
+        {
+           Ecore_Event_Mouse_Button *e;
+           int event_window;
+           int window;
+
+           if (_ecore_x_mouse_down_did_triple)
+             {
+                _ecore_x_mouse_down_last_win = 0;
+                _ecore_x_mouse_down_last_last_win = 0;
+                _ecore_x_mouse_down_last_event_win = 0;
+                _ecore_x_mouse_down_last_last_event_win = 0;
+                _ecore_x_mouse_down_last_time = 0;
+                _ecore_x_mouse_down_last_last_time = 0;
+             }
+
+           window =
+              (xevent->xbutton.subwindow ? xevent->xbutton.subwindow : xevent->
+         xbutton.window);
+           event_window = xevent->xbutton.window;
+
+           e = _ecore_mouse_button(ECORE_EVENT_MOUSE_BUTTON_DOWN,
+                                   xevent->xbutton.time,
+                                   xevent->xbutton.state,
+                                   xevent->xbutton.button,
+                                   xevent->xbutton.x,
+                                   xevent->xbutton.y,
+                                   xevent->xbutton.x_root,
+                                   xevent->xbutton.y_root,
+                                   event_window,
+                                   window,
+                                   xevent->xbutton.root,
+                                   xevent->xbutton.same_screen,
+                                   0,
+                                   1,
+                                   1,
+                                   1.0,
+ // pressure
+                                   0.0,
+ // angle
+                                   xevent->xbutton.x,
+                                   xevent->xbutton.y,
+                                   xevent->xbutton.x_root,
+                                   xevent->xbutton.y_root);
+           if (e)
+              for (i = 0; i < _ecore_window_grabs_num; i++)
+                {
+                   if ((_ecore_window_grabs[i] == xevent->xbutton.window) ||
+                       (_ecore_window_grabs[i] == xevent->xbutton.subwindow))
+                     {
+                        Eina_Bool replay = EINA_FALSE;
+
+                        if (_ecore_window_grab_replay_func)
+                           replay = _ecore_window_grab_replay_func(
+                                 _ecore_window_grab_replay_data,
+                                 ECORE_EVENT_MOUSE_BUTTON_DOWN,
+                                 e);
+
+                        if (replay)
+                           XAllowEvents(xevent->xbutton.display,
+                                        ReplayPointer, xevent->xbutton.time);
+                        else
+                           XAllowEvents(xevent->xbutton.display,
+                                        AsyncPointer, xevent->xbutton.time);
+
+                        break;
+                     }
+                }
+
+           if (window == event_window)
+              if (!_ecore_x_mouse_down_did_triple)
+                {
+                   _ecore_x_mouse_down_last_last_win =
+                      _ecore_x_mouse_down_last_win;
+                   if (xevent->xbutton.subwindow)
+                      _ecore_x_mouse_down_last_win = xevent->xbutton.subwindow;
+                   else
+                      _ecore_x_mouse_down_last_win = xevent->xbutton.window;
+
+                   _ecore_x_mouse_down_last_last_event_win =
+                      _ecore_x_mouse_down_last_event_win;
+                   _ecore_x_mouse_down_last_event_win = xevent->xbutton.window;
+                   _ecore_x_mouse_down_last_last_time =
+                      _ecore_x_mouse_down_last_time;
+                   _ecore_x_mouse_down_last_time = xevent->xbutton.time;
+                }
+
+        }
      }
 }
 
@@ -614,28 +752,30 @@ _ecore_x_event_handle_button_release(XEvent *xevent)
    /* filter out wheel buttons */
    if ((xevent->xbutton.button <= 3) || (xevent->xbutton.button > 7))
      {
-       _ecore_mouse_move(xevent->xbutton.time, xevent->xbutton.state,
-                         xevent->xbutton.x, xevent->xbutton.y,
-                         xevent->xbutton.x_root, xevent->xbutton.y_root,
-                         xevent->xbutton.window,
-                         (xevent->xbutton.subwindow ? xevent->xbutton.subwindow : xevent->xbutton.window),
-                         xevent->xbutton.root,
-                         xevent->xbutton.same_screen,
+        _ecore_mouse_move(xevent->xbutton.time, xevent->xbutton.state,
+                          xevent->xbutton.x, xevent->xbutton.y,
+                          xevent->xbutton.x_root, xevent->xbutton.y_root,
+                          xevent->xbutton.window,
+                          (xevent->xbutton.subwindow ? xevent->xbutton.
+                           subwindow : xevent->xbutton.window),
+                          xevent->xbutton.root,
+                          xevent->xbutton.same_screen,
                           0, 1, 1,
                           1.0, // pressure
                           0.0, // angle
                           xevent->xbutton.x, xevent->xbutton.y,
                           xevent->xbutton.x_root, xevent->xbutton.y_root);
 
-       _ecore_mouse_button(ECORE_EVENT_MOUSE_BUTTON_UP,
-                           xevent->xbutton.time, xevent->xbutton.state,
-                           xevent->xbutton.button,
-                           xevent->xbutton.x, xevent->xbutton.y,
-                           xevent->xbutton.x_root, xevent->xbutton.y_root,
-                           xevent->xbutton.window,
-                           (xevent->xbutton.subwindow ? xevent->xbutton.subwindow : xevent->xbutton.window),
-                           xevent->xbutton.root,
-                           xevent->xbutton.same_screen,
+        _ecore_mouse_button(ECORE_EVENT_MOUSE_BUTTON_UP,
+                            xevent->xbutton.time, xevent->xbutton.state,
+                            xevent->xbutton.button,
+                            xevent->xbutton.x, xevent->xbutton.y,
+                            xevent->xbutton.x_root, xevent->xbutton.y_root,
+                            xevent->xbutton.window,
+                            (xevent->xbutton.subwindow ? xevent->xbutton.
+                             subwindow : xevent->xbutton.window),
+                            xevent->xbutton.root,
+                            xevent->xbutton.same_screen,
                             0, 1, 1,
                             1.0, // pressure
                             0.0, // angle
@@ -647,7 +787,7 @@ _ecore_x_event_handle_button_release(XEvent *xevent)
 void
 _ecore_x_event_handle_motion_notify(XEvent *xevent)
 {
-/*   
+/*
    if (_ecore_x_last_event_mouse_move)
      {
         ecore_event_del(_ecore_x_last_event_mouse_move_event);
@@ -656,12 +796,13 @@ _ecore_x_event_handle_motion_notify(XEvent *xevent)
      }
  */
    _ecore_mouse_move(xevent->xmotion.time, xevent->xmotion.state,
-                    xevent->xmotion.x, xevent->xmotion.y,
-                    xevent->xmotion.x_root, xevent->xmotion.y_root,
-                    xevent->xmotion.window,
-                    (xevent->xmotion.subwindow ? xevent->xmotion.subwindow : xevent->xmotion.window),
-                    xevent->xmotion.root,
-                    xevent->xmotion.same_screen,
+                     xevent->xmotion.x, xevent->xmotion.y,
+                     xevent->xmotion.x_root, xevent->xmotion.y_root,
+                     xevent->xmotion.window,
+                     (xevent->xmotion.subwindow ? xevent->xmotion.subwindow :
+                      xevent->xmotion.window),
+                     xevent->xmotion.root,
+                     xevent->xmotion.same_screen,
                      0, 1, 1,
                      1.0, // pressure
                      0.0, // angle
@@ -671,126 +812,140 @@ _ecore_x_event_handle_motion_notify(XEvent *xevent)
    _ecore_x_last_event_mouse_move = 1;
 
    /* Xdnd handling */
-   _ecore_x_dnd_drag(xevent->xmotion.root, xevent->xmotion.x_root, xevent->xmotion.y_root);
+   _ecore_x_dnd_drag(xevent->xmotion.root,
+                     xevent->xmotion.x_root,
+                     xevent->xmotion.y_root);
 }
 
 void
 _ecore_x_event_handle_enter_notify(XEvent *xevent)
 {
    _ecore_x_last_event_mouse_move = 0;
-     {
-       _ecore_mouse_move(xevent->xcrossing.time, xevent->xcrossing.state,
-                         xevent->xcrossing.x, xevent->xcrossing.y,
-                         xevent->xcrossing.x_root, xevent->xcrossing.y_root,
-                         xevent->xcrossing.window,
-                         (xevent->xcrossing.subwindow ? xevent->xcrossing.subwindow : xevent->xcrossing.window),
-                         xevent->xcrossing.root,
-                         xevent->xcrossing.same_screen,
-                          0, 1, 1,
-                          1.0, // pressure
-                          0.0, // angle
-                          xevent->xcrossing.x, xevent->xcrossing.y,
-                          xevent->xcrossing.x_root, xevent->xcrossing.y_root);
-     }
-     {
-       Ecore_X_Event_Mouse_In *e;
-
-       e = calloc(1, sizeof(Ecore_X_Event_Mouse_In));
-       if (!e) return;
-       e->modifiers = _ecore_x_event_modifiers(xevent->xcrossing.state);
-       e->x = xevent->xcrossing.x;
-       e->y = xevent->xcrossing.y;
-       e->root.x = xevent->xcrossing.x_root;
-       e->root.y = xevent->xcrossing.y_root;
-       if (xevent->xcrossing.subwindow) e->win = xevent->xcrossing.subwindow;
-       else e->win = xevent->xcrossing.window;
-       e->same_screen = xevent->xcrossing.same_screen;
-       e->root_win = xevent->xcrossing.root;
-       e->event_win = xevent->xcrossing.window;
-
-        if (xevent->xcrossing.mode == NotifyNormal) 
-          e->mode = ECORE_X_EVENT_MODE_NORMAL;
-       else if (xevent->xcrossing.mode == NotifyGrab) 
-          e->mode = ECORE_X_EVENT_MODE_GRAB;
-       else if (xevent->xcrossing.mode == NotifyUngrab) 
-          e->mode = ECORE_X_EVENT_MODE_UNGRAB;
-
-       if (xevent->xcrossing.detail == NotifyAncestor) 
-          e->detail = ECORE_X_EVENT_DETAIL_ANCESTOR;
-       else if (xevent->xcrossing.detail == NotifyVirtual) 
-          e->detail = ECORE_X_EVENT_DETAIL_VIRTUAL;
-       else if (xevent->xcrossing.detail == NotifyInferior) 
-          e->detail = ECORE_X_EVENT_DETAIL_INFERIOR;
-       else if (xevent->xcrossing.detail == NotifyNonlinear) 
-          e->detail = ECORE_X_EVENT_DETAIL_NON_LINEAR;
-       else if (xevent->xcrossing.detail == NotifyNonlinearVirtual) 
-          e->detail = ECORE_X_EVENT_DETAIL_NON_LINEAR_VIRTUAL;
-
-       e->time = xevent->xcrossing.time;
-       _ecore_x_event_last_time = e->time;
-       ecore_event_add(ECORE_X_EVENT_MOUSE_IN, e, NULL, NULL);
-     }
+   {
+      _ecore_mouse_move(xevent->xcrossing.time, xevent->xcrossing.state,
+                        xevent->xcrossing.x, xevent->xcrossing.y,
+                        xevent->xcrossing.x_root, xevent->xcrossing.y_root,
+                        xevent->xcrossing.window,
+                        (xevent->xcrossing.subwindow ? xevent->xcrossing.
+                         subwindow : xevent->xcrossing.window),
+                        xevent->xcrossing.root,
+                        xevent->xcrossing.same_screen,
+                        0, 1, 1,
+                        1.0, // pressure
+                        0.0, // angle
+                        xevent->xcrossing.x, xevent->xcrossing.y,
+                        xevent->xcrossing.x_root, xevent->xcrossing.y_root);
+   }
+   {
+      Ecore_X_Event_Mouse_In *e;
+
+      e = calloc(1, sizeof(Ecore_X_Event_Mouse_In));
+      if (!e)
+         return;
+
+      e->modifiers = _ecore_x_event_modifiers(xevent->xcrossing.state);
+      e->x = xevent->xcrossing.x;
+      e->y = xevent->xcrossing.y;
+      e->root.x = xevent->xcrossing.x_root;
+      e->root.y = xevent->xcrossing.y_root;
+      if (xevent->xcrossing.subwindow)
+         e->win = xevent->xcrossing.subwindow;
+      else
+         e->win = xevent->xcrossing.window;
+
+      e->same_screen = xevent->xcrossing.same_screen;
+      e->root_win = xevent->xcrossing.root;
+      e->event_win = xevent->xcrossing.window;
+
+      if (xevent->xcrossing.mode == NotifyNormal)
+         e->mode = ECORE_X_EVENT_MODE_NORMAL;
+      else if (xevent->xcrossing.mode == NotifyGrab)
+         e->mode = ECORE_X_EVENT_MODE_GRAB;
+      else if (xevent->xcrossing.mode == NotifyUngrab)
+         e->mode = ECORE_X_EVENT_MODE_UNGRAB;
+
+      if (xevent->xcrossing.detail == NotifyAncestor)
+         e->detail = ECORE_X_EVENT_DETAIL_ANCESTOR;
+      else if (xevent->xcrossing.detail == NotifyVirtual)
+         e->detail = ECORE_X_EVENT_DETAIL_VIRTUAL;
+      else if (xevent->xcrossing.detail == NotifyInferior)
+         e->detail = ECORE_X_EVENT_DETAIL_INFERIOR;
+      else if (xevent->xcrossing.detail == NotifyNonlinear)
+         e->detail = ECORE_X_EVENT_DETAIL_NON_LINEAR;
+      else if (xevent->xcrossing.detail == NotifyNonlinearVirtual)
+         e->detail = ECORE_X_EVENT_DETAIL_NON_LINEAR_VIRTUAL;
+
+      e->time = xevent->xcrossing.time;
+      _ecore_x_event_last_time = e->time;
+      ecore_event_add(ECORE_X_EVENT_MOUSE_IN, e, NULL, NULL);
+   }
 }
 
 void
 _ecore_x_event_handle_leave_notify(XEvent *xevent)
 {
    _ecore_x_last_event_mouse_move = 0;
-     {
-       _ecore_mouse_move(xevent->xcrossing.time, xevent->xcrossing.state,
-                         xevent->xcrossing.x, xevent->xcrossing.y,
-                         xevent->xcrossing.x_root, xevent->xcrossing.y_root,
-                         xevent->xcrossing.window,
-                         (xevent->xcrossing.subwindow ? xevent->xcrossing.subwindow : xevent->xcrossing.window),
-                         xevent->xcrossing.root,
-                         xevent->xcrossing.same_screen,
-                          0, 1, 1,
-                          1.0, // pressure
-                          0.0, // angle
-                          xevent->xcrossing.x, xevent->xcrossing.y,
-                          xevent->xcrossing.x_root, xevent->xcrossing.y_root);
-     }
-     {
-       Ecore_X_Event_Mouse_Out *e;
-
-       e = calloc(1, sizeof(Ecore_X_Event_Mouse_Out));
-       if (!e) return;
-       e->modifiers = _ecore_x_event_modifiers(xevent->xcrossing.state);
-       e->x = xevent->xcrossing.x;
-       e->y = xevent->xcrossing.y;
-       e->root.x = xevent->xcrossing.x_root;
-       e->root.y = xevent->xcrossing.y_root;
-       if (xevent->xcrossing.subwindow) e->win = xevent->xcrossing.subwindow;
-       else e->win = xevent->xcrossing.window;
-       e->same_screen = xevent->xcrossing.same_screen;
-       e->root_win = xevent->xcrossing.root;
-       e->event_win = xevent->xcrossing.window;
-
-       if (xevent->xcrossing.mode == NotifyNormal) 
-          e->mode = ECORE_X_EVENT_MODE_NORMAL;
-       else if (xevent->xcrossing.mode == NotifyGrab) 
-          e->mode = ECORE_X_EVENT_MODE_GRAB;
-       else if (xevent->xcrossing.mode == NotifyUngrab) 
-          e->mode = ECORE_X_EVENT_MODE_UNGRAB;
-
-       if (xevent->xcrossing.detail == NotifyAncestor) 
-          e->detail = ECORE_X_EVENT_DETAIL_ANCESTOR;
-       else if (xevent->xcrossing.detail == NotifyVirtual) 
-          e->detail = ECORE_X_EVENT_DETAIL_VIRTUAL;
-       else if (xevent->xcrossing.detail == NotifyInferior) 
-          e->detail = ECORE_X_EVENT_DETAIL_INFERIOR;
-       else if (xevent->xcrossing.detail == NotifyNonlinear) 
-          e->detail = ECORE_X_EVENT_DETAIL_NON_LINEAR;
-       else if (xevent->xcrossing.detail == NotifyNonlinearVirtual) 
-          e->detail = ECORE_X_EVENT_DETAIL_NON_LINEAR_VIRTUAL;
-
-       e->time = xevent->xcrossing.time;
-       _ecore_x_event_last_time = e->time;
-       _ecore_x_event_last_win = e->win;
-       _ecore_x_event_last_root_x = e->root.x;
-       _ecore_x_event_last_root_y = e->root.y;
-       ecore_event_add(ECORE_X_EVENT_MOUSE_OUT, e, NULL, NULL);
-     }
+   {
+      _ecore_mouse_move(xevent->xcrossing.time, xevent->xcrossing.state,
+                        xevent->xcrossing.x, xevent->xcrossing.y,
+                        xevent->xcrossing.x_root, xevent->xcrossing.y_root,
+                        xevent->xcrossing.window,
+                        (xevent->xcrossing.subwindow ? xevent->xcrossing.
+                         subwindow : xevent->xcrossing.window),
+                        xevent->xcrossing.root,
+                        xevent->xcrossing.same_screen,
+                        0, 1, 1,
+                        1.0, // pressure
+                        0.0, // angle
+                        xevent->xcrossing.x, xevent->xcrossing.y,
+                        xevent->xcrossing.x_root, xevent->xcrossing.y_root);
+   }
+   {
+      Ecore_X_Event_Mouse_Out *e;
+
+      e = calloc(1, sizeof(Ecore_X_Event_Mouse_Out));
+      if (!e)
+         return;
+
+      e->modifiers = _ecore_x_event_modifiers(xevent->xcrossing.state);
+      e->x = xevent->xcrossing.x;
+      e->y = xevent->xcrossing.y;
+      e->root.x = xevent->xcrossing.x_root;
+      e->root.y = xevent->xcrossing.y_root;
+      if (xevent->xcrossing.subwindow)
+         e->win = xevent->xcrossing.subwindow;
+      else
+         e->win = xevent->xcrossing.window;
+
+      e->same_screen = xevent->xcrossing.same_screen;
+      e->root_win = xevent->xcrossing.root;
+      e->event_win = xevent->xcrossing.window;
+
+      if (xevent->xcrossing.mode == NotifyNormal)
+         e->mode = ECORE_X_EVENT_MODE_NORMAL;
+      else if (xevent->xcrossing.mode == NotifyGrab)
+         e->mode = ECORE_X_EVENT_MODE_GRAB;
+      else if (xevent->xcrossing.mode == NotifyUngrab)
+         e->mode = ECORE_X_EVENT_MODE_UNGRAB;
+
+      if (xevent->xcrossing.detail == NotifyAncestor)
+         e->detail = ECORE_X_EVENT_DETAIL_ANCESTOR;
+      else if (xevent->xcrossing.detail == NotifyVirtual)
+         e->detail = ECORE_X_EVENT_DETAIL_VIRTUAL;
+      else if (xevent->xcrossing.detail == NotifyInferior)
+         e->detail = ECORE_X_EVENT_DETAIL_INFERIOR;
+      else if (xevent->xcrossing.detail == NotifyNonlinear)
+         e->detail = ECORE_X_EVENT_DETAIL_NON_LINEAR;
+      else if (xevent->xcrossing.detail == NotifyNonlinearVirtual)
+         e->detail = ECORE_X_EVENT_DETAIL_NON_LINEAR_VIRTUAL;
+
+      e->time = xevent->xcrossing.time;
+      _ecore_x_event_last_time = e->time;
+      _ecore_x_event_last_win = e->win;
+      _ecore_x_event_last_root_x = e->root.x;
+      _ecore_x_event_last_root_y = e->root.y;
+      ecore_event_add(ECORE_X_EVENT_MOUSE_OUT, e, NULL, NULL);
+   }
 }
 
 void
@@ -801,42 +956,46 @@ _ecore_x_event_handle_focus_in(XEvent *xevent)
    _ecore_x_last_event_mouse_move = 0;
    if (_ecore_x_ic)
      {
-       char *str;
+        char *str;
 
-       XSetICValues(_ecore_x_ic, XNFocusWindow, xevent->xfocus.window, NULL);
-       if ((str = XmbResetIC(_ecore_x_ic)))
-         XFree(str);
-       XSetICFocus(_ecore_x_ic);
+        XSetICValues(_ecore_x_ic, XNFocusWindow, xevent->xfocus.window, NULL);
+        if ((str = XmbResetIC(_ecore_x_ic)))
+           XFree(str);
+
+        XSetICFocus(_ecore_x_ic);
      }
+
    e = calloc(1, sizeof(Ecore_X_Event_Window_Focus_In));
-   if (!e) return;
+   if (!e)
+      return;
+
    e->win = xevent->xfocus.window;
 
-   if (xevent->xfocus.mode == NotifyNormal) 
-     e->mode = ECORE_X_EVENT_MODE_NORMAL;
-   else if (xevent->xfocus.mode == NotifyWhileGrabbed) 
-     e->mode = ECORE_X_EVENT_MODE_WHILE_GRABBED;
-   else if (xevent->xfocus.mode == NotifyGrab) 
-     e->mode = ECORE_X_EVENT_MODE_GRAB;
-   else if (xevent->xfocus.mode == NotifyUngrab) 
-     e->mode = ECORE_X_EVENT_MODE_UNGRAB;
-
-   if (xevent->xfocus.detail == NotifyAncestor) 
-     e->detail = ECORE_X_EVENT_DETAIL_ANCESTOR;
-   else if (xevent->xfocus.detail == NotifyVirtual) 
-     e->detail = ECORE_X_EVENT_DETAIL_VIRTUAL;
-   else if (xevent->xfocus.detail == NotifyInferior) 
-     e->detail = ECORE_X_EVENT_DETAIL_INFERIOR;
-   else if (xevent->xfocus.detail == NotifyNonlinear) 
-     e->detail = ECORE_X_EVENT_DETAIL_NON_LINEAR;
-   else if (xevent->xfocus.detail == NotifyNonlinearVirtual) 
-     e->detail = ECORE_X_EVENT_DETAIL_NON_LINEAR_VIRTUAL;
-   else if (xevent->xfocus.detail == NotifyPointer) 
-     e->detail = ECORE_X_EVENT_DETAIL_POINTER;
-   else if (xevent->xfocus.detail == NotifyPointerRoot) 
-     e->detail = ECORE_X_EVENT_DETAIL_POINTER_ROOT;
-   else if (xevent->xfocus.detail == NotifyDetailNone) 
-     e->detail = ECORE_X_EVENT_DETAIL_DETAIL_NONE;
+   if (xevent->xfocus.mode == NotifyNormal)
+      e->mode = ECORE_X_EVENT_MODE_NORMAL;
+   else if (xevent->xfocus.mode == NotifyWhileGrabbed)
+      e->mode = ECORE_X_EVENT_MODE_WHILE_GRABBED;
+   else if (xevent->xfocus.mode == NotifyGrab)
+      e->mode = ECORE_X_EVENT_MODE_GRAB;
+   else if (xevent->xfocus.mode == NotifyUngrab)
+      e->mode = ECORE_X_EVENT_MODE_UNGRAB;
+
+   if (xevent->xfocus.detail == NotifyAncestor)
+      e->detail = ECORE_X_EVENT_DETAIL_ANCESTOR;
+   else if (xevent->xfocus.detail == NotifyVirtual)
+      e->detail = ECORE_X_EVENT_DETAIL_VIRTUAL;
+   else if (xevent->xfocus.detail == NotifyInferior)
+      e->detail = ECORE_X_EVENT_DETAIL_INFERIOR;
+   else if (xevent->xfocus.detail == NotifyNonlinear)
+      e->detail = ECORE_X_EVENT_DETAIL_NON_LINEAR;
+   else if (xevent->xfocus.detail == NotifyNonlinearVirtual)
+      e->detail = ECORE_X_EVENT_DETAIL_NON_LINEAR_VIRTUAL;
+   else if (xevent->xfocus.detail == NotifyPointer)
+      e->detail = ECORE_X_EVENT_DETAIL_POINTER;
+   else if (xevent->xfocus.detail == NotifyPointerRoot)
+      e->detail = ECORE_X_EVENT_DETAIL_POINTER_ROOT;
+   else if (xevent->xfocus.detail == NotifyDetailNone)
+      e->detail = ECORE_X_EVENT_DETAIL_DETAIL_NONE;
 
    e->time = _ecore_x_event_last_time;
    _ecore_x_event_last_time = e->time;
@@ -849,47 +1008,51 @@ _ecore_x_event_handle_focus_out(XEvent *xevent)
    Ecore_X_Event_Window_Focus_Out *e;
 
    _ecore_x_last_event_mouse_move = 0;
-   if (_ecore_x_ic) XUnsetICFocus(_ecore_x_ic);
+   if (_ecore_x_ic)
+      XUnsetICFocus(_ecore_x_ic);
+
    e = calloc(1, sizeof(Ecore_X_Event_Window_Focus_Out));
-   if (!e) return;
+   if (!e)
+      return;
+
    e->win = xevent->xfocus.window;
 
-   if (xevent->xfocus.mode == NotifyNormal) 
-     e->mode = ECORE_X_EVENT_MODE_NORMAL;
-   else if (xevent->xfocus.mode == NotifyWhileGrabbed) 
-     e->mode = ECORE_X_EVENT_MODE_WHILE_GRABBED;
-   else if (xevent->xfocus.mode == NotifyGrab) 
-     e->mode = ECORE_X_EVENT_MODE_GRAB;
-   else if (xevent->xfocus.mode == NotifyUngrab) 
-     e->mode = ECORE_X_EVENT_MODE_UNGRAB;
-
-   if (xevent->xfocus.detail == NotifyAncestor) 
-     e->detail = ECORE_X_EVENT_DETAIL_ANCESTOR;
-   else if (xevent->xfocus.detail == NotifyVirtual) 
-     e->detail = ECORE_X_EVENT_DETAIL_VIRTUAL;
-   else if (xevent->xfocus.detail == NotifyInferior) 
-     e->detail = ECORE_X_EVENT_DETAIL_INFERIOR;
-   else if (xevent->xfocus.detail == NotifyNonlinear) 
-     e->detail = ECORE_X_EVENT_DETAIL_NON_LINEAR;
-   else if (xevent->xfocus.detail == NotifyNonlinearVirtual) 
-     e->detail = ECORE_X_EVENT_DETAIL_NON_LINEAR_VIRTUAL;
-   else if (xevent->xfocus.detail == NotifyPointer) 
-     e->detail = ECORE_X_EVENT_DETAIL_POINTER;
-   else if (xevent->xfocus.detail == NotifyPointerRoot) 
-     e->detail = ECORE_X_EVENT_DETAIL_POINTER_ROOT;
-   else if (xevent->xfocus.detail == NotifyDetailNone) 
-     e->detail = ECORE_X_EVENT_DETAIL_DETAIL_NONE;
+   if (xevent->xfocus.mode == NotifyNormal)
+      e->mode = ECORE_X_EVENT_MODE_NORMAL;
+   else if (xevent->xfocus.mode == NotifyWhileGrabbed)
+      e->mode = ECORE_X_EVENT_MODE_WHILE_GRABBED;
+   else if (xevent->xfocus.mode == NotifyGrab)
+      e->mode = ECORE_X_EVENT_MODE_GRAB;
+   else if (xevent->xfocus.mode == NotifyUngrab)
+      e->mode = ECORE_X_EVENT_MODE_UNGRAB;
+
+   if (xevent->xfocus.detail == NotifyAncestor)
+      e->detail = ECORE_X_EVENT_DETAIL_ANCESTOR;
+   else if (xevent->xfocus.detail == NotifyVirtual)
+      e->detail = ECORE_X_EVENT_DETAIL_VIRTUAL;
+   else if (xevent->xfocus.detail == NotifyInferior)
+      e->detail = ECORE_X_EVENT_DETAIL_INFERIOR;
+   else if (xevent->xfocus.detail == NotifyNonlinear)
+      e->detail = ECORE_X_EVENT_DETAIL_NON_LINEAR;
+   else if (xevent->xfocus.detail == NotifyNonlinearVirtual)
+      e->detail = ECORE_X_EVENT_DETAIL_NON_LINEAR_VIRTUAL;
+   else if (xevent->xfocus.detail == NotifyPointer)
+      e->detail = ECORE_X_EVENT_DETAIL_POINTER;
+   else if (xevent->xfocus.detail == NotifyPointerRoot)
+      e->detail = ECORE_X_EVENT_DETAIL_POINTER_ROOT;
+   else if (xevent->xfocus.detail == NotifyDetailNone)
+      e->detail = ECORE_X_EVENT_DETAIL_DETAIL_NONE;
 
    e->time = _ecore_x_event_last_time;
    _ecore_x_event_last_time = e->time;
-   ecore_event_add(ECORE_X_EVENT_WINDOW_FOCUS_OUT, e, NULL, NULL);
+      ecore_event_add(ECORE_X_EVENT_WINDOW_FOCUS_OUT, e, NULL, NULL);
 }
 
 void
 _ecore_x_event_handle_keymap_notify(XEvent *xevent __UNUSED__)
 {
    _ecore_x_last_event_mouse_move = 0;
-   /* FIXME: handle this event type */   
+   /* FIXME: handle this event type */
 }
 
 void
@@ -899,7 +1062,9 @@ _ecore_x_event_handle_expose(XEvent *xevent)
 
    _ecore_x_last_event_mouse_move = 0;
    e = calloc(1, sizeof(Ecore_X_Event_Window_Damage));
-   if (!e) return;
+   if (!e)
+      return;
+
    e->win = xevent->xexpose.window;
    e->time = _ecore_x_event_last_time;
    e->x = xevent->xexpose.x;
@@ -907,7 +1072,7 @@ _ecore_x_event_handle_expose(XEvent *xevent)
    e->w = xevent->xexpose.width;
    e->h = xevent->xexpose.height;
    e->count = xevent->xexpose.count;
-   ecore_event_add(ECORE_X_EVENT_WINDOW_DAMAGE, e, NULL, NULL);   
+      ecore_event_add(ECORE_X_EVENT_WINDOW_DAMAGE, e, NULL, NULL);
 }
 
 void
@@ -917,7 +1082,9 @@ _ecore_x_event_handle_graphics_expose(XEvent *xevent)
 
    _ecore_x_last_event_mouse_move = 0;
    e = calloc(1, sizeof(Ecore_X_Event_Window_Damage));
-   if (!e) return;
+   if (!e)
+      return;
+
    e->win = xevent->xgraphicsexpose.drawable;
    e->time = _ecore_x_event_last_time;
    e->x = xevent->xgraphicsexpose.x;
@@ -925,7 +1092,7 @@ _ecore_x_event_handle_graphics_expose(XEvent *xevent)
    e->w = xevent->xgraphicsexpose.width;
    e->h = xevent->xgraphicsexpose.height;
    e->count = xevent->xgraphicsexpose.count;
-   ecore_event_add(ECORE_X_EVENT_WINDOW_DAMAGE, e, NULL, NULL);   
+      ecore_event_add(ECORE_X_EVENT_WINDOW_DAMAGE, e, NULL, NULL);
 }
 
 void
@@ -937,13 +1104,16 @@ _ecore_x_event_handle_visibility_notify(XEvent *xevent)
       Ecore_X_Event_Window_Visibility_Change *e;
 
       e = calloc(1, sizeof(Ecore_X_Event_Window_Visibility_Change));
-      if (!e) return;
+      if (!e)
+         return;
+
       e->win = xevent->xvisibility.window;
       e->time = _ecore_x_event_last_time;
       if (xevent->xvisibility.state == VisibilityFullyObscured)
-        e->fully_obscured = 1;
+         e->fully_obscured = 1;
       else
-        e->fully_obscured = 0;     
+         e->fully_obscured = 0;
+
       ecore_event_add(ECORE_X_EVENT_WINDOW_VISIBILITY_CHANGE, e, NULL, NULL);
    }
 }
@@ -955,20 +1125,23 @@ _ecore_x_event_handle_create_notify(XEvent *xevent)
 
    _ecore_x_last_event_mouse_move = 0;
    e = calloc(1, sizeof(Ecore_X_Event_Window_Create));
-   if (!e) return;
+   if (!e)
+      return;
+
    e->win = xevent->xcreatewindow.window;
    e->parent = xevent->xcreatewindow.parent;
    if (xevent->xcreatewindow.override_redirect)
-     e->override = 1;
+      e->override = 1;
    else
-     e->override = 0;
+      e->override = 0;
+
    e->x = xevent->xcreatewindow.x;
    e->y = xevent->xcreatewindow.y;
    e->w = xevent->xcreatewindow.width;
    e->h = xevent->xcreatewindow.height;
    e->border = xevent->xcreatewindow.border_width;
    e->time = _ecore_x_event_last_time;
-   ecore_event_add(ECORE_X_EVENT_WINDOW_CREATE, e, NULL, NULL);
+      ecore_event_add(ECORE_X_EVENT_WINDOW_CREATE, e, NULL, NULL);
 }
 
 void
@@ -978,12 +1151,16 @@ _ecore_x_event_handle_destroy_notify(XEvent *xevent)
 
    _ecore_x_last_event_mouse_move = 0;
    e = calloc(1, sizeof(Ecore_X_Event_Window_Destroy));
-   if (!e) return;
-   e->win =  xevent->xdestroywindow.window;
+   if (!e)
+      return;
+
+   e->win = xevent->xdestroywindow.window;
    e->event_win = xevent->xdestroywindow.event;
    e->time = _ecore_x_event_last_time;
-   if (e->win == _ecore_x_event_last_win) _ecore_x_event_last_win = 0;
-   ecore_event_add(ECORE_X_EVENT_WINDOW_DESTROY, e, NULL, NULL);   
+   if (e->win == _ecore_x_event_last_win)
+      _ecore_x_event_last_win = 0;
+
+      ecore_event_add(ECORE_X_EVENT_WINDOW_DESTROY, e, NULL, NULL);
 }
 
 void
@@ -993,11 +1170,13 @@ _ecore_x_event_handle_unmap_notify(XEvent *xevent)
 
    _ecore_x_last_event_mouse_move = 0;
    e = calloc(1, sizeof(Ecore_X_Event_Window_Hide));
-   if (!e) return;
+   if (!e)
+      return;
+
    e->win = xevent->xunmap.window;
    e->event_win = xevent->xunmap.event;
    e->time = _ecore_x_event_last_time;
-   ecore_event_add(ECORE_X_EVENT_WINDOW_HIDE, e, NULL, NULL);
+      ecore_event_add(ECORE_X_EVENT_WINDOW_HIDE, e, NULL, NULL);
 }
 
 void
@@ -1007,11 +1186,13 @@ _ecore_x_event_handle_map_notify(XEvent *xevent)
 
    _ecore_x_last_event_mouse_move = 0;
    e = calloc(1, sizeof(Ecore_X_Event_Window_Show));
-   if (!e) return;
+   if (!e)
+      return;
+
    e->win = xevent->xmap.window;
    e->event_win = xevent->xmap.event;
    e->time = _ecore_x_event_last_time;
-   ecore_event_add(ECORE_X_EVENT_WINDOW_SHOW, e, NULL, NULL);
+      ecore_event_add(ECORE_X_EVENT_WINDOW_SHOW, e, NULL, NULL);
 }
 
 void
@@ -1021,11 +1202,13 @@ _ecore_x_event_handle_map_request(XEvent *xevent)
 
    _ecore_x_last_event_mouse_move = 0;
    e = calloc(1, sizeof(Ecore_X_Event_Window_Show_Request));
-   if (!e) return;
+   if (!e)
+      return;
+
    e->win = xevent->xmaprequest.window;
    e->time = _ecore_x_event_last_time;
    e->parent = xevent->xmaprequest.parent;
-   ecore_event_add(ECORE_X_EVENT_WINDOW_SHOW_REQUEST, e, NULL, NULL);
+      ecore_event_add(ECORE_X_EVENT_WINDOW_SHOW_REQUEST, e, NULL, NULL);
 }
 
 void
@@ -1035,12 +1218,14 @@ _ecore_x_event_handle_reparent_notify(XEvent *xevent)
 
    _ecore_x_last_event_mouse_move = 0;
    e = calloc(1, sizeof(Ecore_X_Event_Window_Reparent));
-   if (!e) return;
+   if (!e)
+      return;
+
    e->win = xevent->xreparent.window;
    e->event_win = xevent->xreparent.event;
    e->parent = xevent->xreparent.parent;
    e->time = _ecore_x_event_last_time;
-   ecore_event_add(ECORE_X_EVENT_WINDOW_REPARENT, e, NULL, NULL);
+      ecore_event_add(ECORE_X_EVENT_WINDOW_REPARENT, e, NULL, NULL);
 }
 
 void
@@ -1050,7 +1235,9 @@ _ecore_x_event_handle_configure_notify(XEvent *xevent)
 
    _ecore_x_last_event_mouse_move = 0;
    e = calloc(1, sizeof(Ecore_X_Event_Window_Configure));
-   if (!e) return;
+   if (!e)
+      return;
+
    e->win = xevent->xconfigure.window;
    e->event_win = xevent->xconfigure.event;
    e->abovewin = xevent->xconfigure.above;
@@ -1062,7 +1249,7 @@ _ecore_x_event_handle_configure_notify(XEvent *xevent)
    e->override = xevent->xconfigure.override_redirect;
    e->from_wm = xevent->xconfigure.send_event;
    e->time = _ecore_x_event_last_time;
-   ecore_event_add(ECORE_X_EVENT_WINDOW_CONFIGURE, e, NULL, NULL);      
+      ecore_event_add(ECORE_X_EVENT_WINDOW_CONFIGURE, e, NULL, NULL);
 }
 
 void
@@ -1072,7 +1259,9 @@ _ecore_x_event_handle_configure_request(XEvent *xevent)
 
    _ecore_x_last_event_mouse_move = 0;
    e = calloc(1, sizeof(Ecore_X_Event_Window_Configure_Request));
-   if (!e) return;
+   if (!e)
+      return;
+
    e->win = xevent->xconfigurerequest.window;
    e->parent_win = xevent->xconfigurerequest.parent;
    e->abovewin = xevent->xconfigurerequest.above;
@@ -1085,17 +1274,17 @@ _ecore_x_event_handle_configure_request(XEvent *xevent)
    e->time = _ecore_x_event_last_time;
 
    if (xevent->xconfigurerequest.detail == Above)
-     e->detail = ECORE_X_WINDOW_STACK_ABOVE;
+      e->detail = ECORE_X_WINDOW_STACK_ABOVE;
    else if (xevent->xconfigurerequest.detail == Below)
-     e->detail = ECORE_X_WINDOW_STACK_BELOW;
+      e->detail = ECORE_X_WINDOW_STACK_BELOW;
    else if (xevent->xconfigurerequest.detail == TopIf)
-     e->detail = ECORE_X_WINDOW_STACK_TOP_IF;
+      e->detail = ECORE_X_WINDOW_STACK_TOP_IF;
    else if (xevent->xconfigurerequest.detail == BottomIf)
-     e->detail = ECORE_X_WINDOW_STACK_BOTTOM_IF;
+      e->detail = ECORE_X_WINDOW_STACK_BOTTOM_IF;
    else if (xevent->xconfigurerequest.detail == Opposite)
-     e->detail = ECORE_X_WINDOW_STACK_OPPOSITE;
+      e->detail = ECORE_X_WINDOW_STACK_OPPOSITE;
 
-   ecore_event_add(ECORE_X_EVENT_WINDOW_CONFIGURE_REQUEST, e, NULL, NULL);
+      ecore_event_add(ECORE_X_EVENT_WINDOW_CONFIGURE_REQUEST, e, NULL, NULL);
 }
 
 void
@@ -1112,12 +1301,14 @@ _ecore_x_event_handle_resize_request(XEvent *xevent)
 
    _ecore_x_last_event_mouse_move = 0;
    e = calloc(1, sizeof(Ecore_X_Event_Window_Resize_Request));
-   if (!e) return;
+   if (!e)
+      return;
+
    e->win = xevent->xresizerequest.window;
    e->w = xevent->xresizerequest.width;
    e->h = xevent->xresizerequest.height;
    e->time = _ecore_x_event_last_time;
-   ecore_event_add(ECORE_X_EVENT_WINDOW_RESIZE_REQUEST, e, NULL, NULL);
+      ecore_event_add(ECORE_X_EVENT_WINDOW_RESIZE_REQUEST, e, NULL, NULL);
 }
 
 void
@@ -1127,15 +1318,18 @@ _ecore_x_event_handle_circulate_notify(XEvent *xevent)
 
    _ecore_x_last_event_mouse_move = 0;
    e = calloc(1, sizeof(Ecore_X_Event_Window_Stack));
-   if (!e) return;
+   if (!e)
+      return;
+
    e->win = xevent->xcirculate.window;
    e->event_win = xevent->xcirculate.event;
    if (xevent->xcirculate.place == PlaceOnTop)
-     e->detail = ECORE_X_WINDOW_STACK_ABOVE;
+      e->detail = ECORE_X_WINDOW_STACK_ABOVE;
    else
-     e->detail = ECORE_X_WINDOW_STACK_BELOW; 
+      e->detail = ECORE_X_WINDOW_STACK_BELOW;
+
    e->time = _ecore_x_event_last_time;
-   ecore_event_add(ECORE_X_EVENT_WINDOW_STACK, e, NULL, NULL);
+      ecore_event_add(ECORE_X_EVENT_WINDOW_STACK, e, NULL, NULL);
 }
 
 void
@@ -1145,15 +1339,18 @@ _ecore_x_event_handle_circulate_request(XEvent *xevent)
 
    _ecore_x_last_event_mouse_move = 0;
    e = calloc(1, sizeof(Ecore_X_Event_Window_Stack_Request));
-   if (!e) return;
+   if (!e)
+      return;
+
    e->win = xevent->xcirculaterequest.window;
    e->parent = xevent->xcirculaterequest.parent;
    if (xevent->xcirculaterequest.place == PlaceOnTop)
-     e->detail = ECORE_X_WINDOW_STACK_ABOVE;
+      e->detail = ECORE_X_WINDOW_STACK_ABOVE;
    else
-     e->detail = ECORE_X_WINDOW_STACK_BELOW; 
+      e->detail = ECORE_X_WINDOW_STACK_BELOW;
+
    e->time = _ecore_x_event_last_time;
-   ecore_event_add(ECORE_X_EVENT_WINDOW_STACK_REQUEST, e, NULL, NULL);
+      ecore_event_add(ECORE_X_EVENT_WINDOW_STACK_REQUEST, e, NULL, NULL);
 }
 
 void
@@ -1165,111 +1362,139 @@ _ecore_x_event_handle_property_notify(XEvent *xevent)
        */
    if (xevent->xproperty.atom == ECORE_X_ATOM_WM_CLASS)
      {
-       Ecore_X_Event_Window_Prop_Name_Class_Change *e;
+        Ecore_X_Event_Window_Prop_Name_Class_Change *e;
+
+        e = calloc(1, sizeof(Ecore_X_Event_Window_Prop_Name_Class_Change));
+        if (!e)
+           return;
 
-       e = calloc(1, sizeof(Ecore_X_Event_Window_Prop_Name_Class_Change));
-       if (!e) return;
-       ecore_x_window_prop_name_class_get(xevent->xproperty.window, 
-                                          &(e->name), &(e->clas));
+        ecore_x_window_prop_name_class_get(xevent->xproperty.window,
+                                           &(e->name), &(e->clas));
         e->time = xevent->xproperty.time;
         _ecore_x_event_last_time = e->time;
-       ecore_event_add(ECORE_X_EVENT_WINDOW_PROP_NAME_CLASS_CHANGE, e, 
+        ecore_event_add(ECORE_X_EVENT_WINDOW_PROP_NAME_CLASS_CHANGE, e,
                         _ecore_x_event_free_window_prop_name_class_change, NULL);
      }
-   else if ((xevent->xproperty.atom == ECORE_X_ATOM_WM_NAME) || 
+   else if ((xevent->xproperty.atom == ECORE_X_ATOM_WM_NAME) ||
             (xevent->xproperty.atom == ECORE_X_ATOM_NET_WM_NAME))
      {
-       Ecore_X_Event_Window_Prop_Title_Change *e;
+        Ecore_X_Event_Window_Prop_Title_Change *e;
 
-       e = calloc(1, sizeof(Ecore_X_Event_Window_Prop_Title_Change));
-       if (!e) return;
-       e->title = ecore_x_window_prop_title_get(xevent->xproperty.window);
+        e = calloc(1, sizeof(Ecore_X_Event_Window_Prop_Title_Change));
+        if (!e)
+           return;
+
+        e->title = ecore_x_window_prop_title_get(xevent->xproperty.window);
         e->time = xevent->xproperty.time;
         _ecore_x_event_last_time = e->time;
-       ecore_event_add(ECORE_X_EVENT_WINDOW_PROP_TITLE_CHANGE, e, 
+        ecore_event_add(ECORE_X_EVENT_WINDOW_PROP_TITLE_CHANGE, e,
                         _ecore_x_event_free_window_prop_title_change, NULL);
      }
    else if (xevent->xproperty.atom == ECORE_X_ATOM_NET_WM_VISIBLE_NAME)
      {
-       Ecore_X_Event_Window_Prop_Visible_Title_Change *e;
+        Ecore_X_Event_Window_Prop_Visible_Title_Change *e;
+
+        e = calloc(1, sizeof(Ecore_X_Event_Window_Prop_Visible_Title_Change));
+        if (!e)
+           return;
 
-       e = calloc(1, sizeof(Ecore_X_Event_Window_Prop_Visible_Title_Change));
-       if (!e) return;
-       e->title = ecore_x_window_prop_visible_title_get(xevent->xproperty.window);
+        e->title = ecore_x_window_prop_visible_title_get(
+              xevent->xproperty.window);
         e->time = xevent->xproperty.time;
         _ecore_x_event_last_time = e->time;
-       ecore_event_add(ECORE_X_EVENT_WINDOW_PROP_VISIBLE_TITLE_CHANGE, e, 
-                        _ecore_x_event_free_window_prop_visible_title_change, NULL);
+        ecore_event_add(ECORE_X_EVENT_WINDOW_PROP_VISIBLE_TITLE_CHANGE,
+                        e,
+                        _ecore_x_event_free_window_prop_visible_title_change,
+                        NULL);
      }
-   else if ((xevent->xproperty.atom == ECORE_X_ATOM_WM_ICON_NAME) || 
+   else if ((xevent->xproperty.atom == ECORE_X_ATOM_WM_ICON_NAME) ||
             (xevent->xproperty.atom == ECORE_X_ATOM_NET_WM_ICON_NAME))
      {
-       Ecore_X_Event_Window_Prop_Icon_Name_Change *e;
+        Ecore_X_Event_Window_Prop_Icon_Name_Change *e;
+
+        e = calloc(1, sizeof(Ecore_X_Event_Window_Prop_Icon_Name_Change));
+        if (!e)
+           return;
 
-       e = calloc(1, sizeof(Ecore_X_Event_Window_Prop_Icon_Name_Change));
-       if (!e) return;
-       e->name = ecore_x_window_prop_icon_name_get(xevent->xproperty.window);
+        e->name = ecore_x_window_prop_icon_name_get(xevent->xproperty.window);
         e->time = xevent->xproperty.time;
         _ecore_x_event_last_time = e->time;
-       ecore_event_add(ECORE_X_EVENT_WINDOW_PROP_ICON_NAME_CHANGE, e, 
+        ecore_event_add(ECORE_X_EVENT_WINDOW_PROP_ICON_NAME_CHANGE, e,
                         _ecore_x_event_free_window_prop_icon_name_change, NULL);
      }
    else if (xevent->xproperty.atom == ECORE_X_ATOM_NET_WM_VISIBLE_ICON_NAME)
      {
-       Ecore_X_Event_Window_Prop_Visible_Icon_Name_Change *e;
+        Ecore_X_Event_Window_Prop_Visible_Icon_Name_Change *e;
 
-       e = calloc(1, sizeof(Ecore_X_Event_Window_Prop_Visible_Icon_Name_Change));
-       if (!e) return;
-       e->name = ecore_x_window_prop_visible_icon_name_get(xevent->xproperty.window);
+        e = calloc(1, sizeof(Ecore_X_Event_Window_Prop_Visible_Icon_Name_Change));
+        if (!e)
+           return;
+
+        e->name = ecore_x_window_prop_visible_icon_name_get(
+              xevent->xproperty.window);
         e->time = xevent->xproperty.time;
         _ecore_x_event_last_time = e->time;
-       ecore_event_add(ECORE_X_EVENT_WINDOW_PROP_VISIBLE_ICON_NAME_CHANGE, e, 
-                        _ecore_x_event_free_window_prop_visible_icon_name_change, NULL);
+        ecore_event_add(
+           ECORE_X_EVENT_WINDOW_PROP_VISIBLE_ICON_NAME_CHANGE,
+           e,
+           _ecore_x_event_free_window_prop_visible_icon_name_change,
+           NULL);
      }
    else if (xevent->xproperty.atom == ECORE_X_ATOM_WM_CLIENT_MACHINE)
      {
-       Ecore_X_Event_Window_Prop_Client_Machine_Change *e;
+        Ecore_X_Event_Window_Prop_Client_Machine_Change *e;
+
+        e = calloc(1, sizeof(Ecore_X_Event_Window_Prop_Client_Machine_Change));
+        if (!e)
+           return;
 
-       e = calloc(1, sizeof(Ecore_X_Event_Window_Prop_Client_Machine_Change));
-       if (!e) return;
-       e->name = ecore_x_window_prop_client_machine_get(xevent->xproperty.window);
+        e->name = ecore_x_window_prop_client_machine_get(
+              xevent->xproperty.window);
         e->time = xevent->xproperty.time;
         _ecore_x_event_last_time = e->time;
-       ecore_event_add(ECORE_X_EVENT_WINDOW_PROP_CLIENT_MACHINE_CHANGE, e, 
-                        _ecore_x_event_free_window_prop_client_machine_change, NULL);
+        ecore_event_add(ECORE_X_EVENT_WINDOW_PROP_CLIENT_MACHINE_CHANGE,
+                        e,
+                        _ecore_x_event_free_window_prop_client_machine_change,
+                        NULL);
      }
    else if (xevent->xproperty.atom == ECORE_X_ATOM_NET_WM_PID)
      {
-       Ecore_X_Event_Window_Prop_Pid_Change *e;
+        Ecore_X_Event_Window_Prop_Pid_Change *e;
 
-       e = calloc(1, sizeof(Ecore_X_Event_Window_Prop_Pid_Change));
-       if (!e) return;
-       e->pid = ecore_x_window_prop_pid_get(xevent->xproperty.window);
+        e = calloc(1, sizeof(Ecore_X_Event_Window_Prop_Pid_Change));
+        if (!e)
+           return;
+
+        e->pid = ecore_x_window_prop_pid_get(xevent->xproperty.window);
         e->time = xevent->xproperty.time;
         _ecore_x_event_last_time = e->time;
-       ecore_event_add(ECORE_X_EVENT_WINDOW_PROP_PID_CHANGE, e, NULL, NULL);
+        ecore_event_add(ECORE_X_EVENT_WINDOW_PROP_PID_CHANGE, e, NULL, NULL);
      }
    else if (xevent->xproperty.atom == ECORE_X_ATOM_NET_WM_DESKTOP)
      {
-       Ecore_X_Event_Window_Prop_Desktop_Change *e;
+        Ecore_X_Event_Window_Prop_Desktop_Change *e;
+
+        e = calloc(1, sizeof(Ecore_X_Event_Window_Prop_Desktop_Change));
+        if (!e)
+           return;
 
-       e = calloc(1, sizeof(Ecore_X_Event_Window_Prop_Desktop_Change));
-       if (!e) return;
-       e->desktop = ecore_x_window_prop_desktop_get(xevent->xproperty.window);
-       ecore_event_add(ECORE_X_EVENT_WINDOW_PROP_PID_CHANGE, e, NULL, NULL);
+        e->desktop = ecore_x_window_prop_desktop_get(xevent->xproperty.window);
+        ecore_event_add(ECORE_X_EVENT_WINDOW_PROP_PID_CHANGE, e, NULL, NULL);
      }
-   else 
-#endif     
+   else
+#endif
    {
       Ecore_X_Event_Window_Property *e;
 
       e = calloc(1, sizeof(Ecore_X_Event_Window_Property));
-      if (!e) return;
+      if (!e)
+         return;
+
       e->win = xevent->xproperty.window;
       e->atom = xevent->xproperty.atom;
       e->time = xevent->xproperty.time;
       _ecore_x_event_last_time = e->time;
-      ecore_event_add(ECORE_X_EVENT_WINDOW_PROPERTY, e, NULL, NULL);
+        ecore_event_add(ECORE_X_EVENT_WINDOW_PROPERTY, e, NULL, NULL);
    }
 }
 
@@ -1283,26 +1508,27 @@ _ecore_x_event_handle_selection_clear(XEvent *xevent)
    LOGFN(__FILE__, __LINE__, __FUNCTION__);
    _ecore_x_last_event_mouse_move = 0;
    d = _ecore_x_selection_get(xevent->xselectionclear.selection);
-/* errr..... why? paranoia.  
+/* errr..... why? paranoia.
    if (d && (xevent->xselectionclear.time > d->time))
      {
-       _ecore_x_selection_set(None, NULL, 0, 
-                              xevent->xselectionclear.selection);
+        _ecore_x_selection_set(None, NULL, 0,
+                               xevent->xselectionclear.selection);
      }
  */
-   /* Generate event for app cleanup */
+/* Generate event for app cleanup */
    e = malloc(sizeof(Ecore_X_Event_Selection_Clear));
    e->win = xevent->xselectionclear.window;
    e->time = xevent->xselectionclear.time;
    e->atom = sel = xevent->xselectionclear.selection;
    if (sel == ECORE_X_ATOM_SELECTION_PRIMARY)
-     e->selection = ECORE_X_SELECTION_PRIMARY;
+      e->selection = ECORE_X_SELECTION_PRIMARY;
    else if (sel == ECORE_X_ATOM_SELECTION_SECONDARY)
-     e->selection = ECORE_X_SELECTION_SECONDARY;
+      e->selection = ECORE_X_SELECTION_SECONDARY;
    else if (sel == ECORE_X_ATOM_SELECTION_CLIPBOARD)
-     e->selection = ECORE_X_SELECTION_CLIPBOARD;
+      e->selection = ECORE_X_SELECTION_CLIPBOARD;
    else
-     e->selection = ECORE_X_SELECTION_OTHER;
+      e->selection = ECORE_X_SELECTION_OTHER;
+
    ecore_event_add(ECORE_X_EVENT_SELECTION_CLEAR, e, NULL, NULL);
 }
 
@@ -1332,44 +1558,47 @@ _ecore_x_event_handle_selection_request(XEvent *xevent)
    if ((sd = _ecore_x_selection_get(xevent->xselectionrequest.selection)) &&
        (sd->win == xevent->xselectionrequest.owner))
      {
-       Ecore_X_Selection_Intern *si;
-
-       si = _ecore_x_selection_get(xevent->xselectionrequest.selection);
-       if (si->data)
-         {
-            Ecore_X_Atom property;
-            Ecore_X_Atom type;
-
-            /* Set up defaults for strings first */
-            type = xevent->xselectionrequest.target;
-            typesize = 8;
-            len = sd->length;
-
-            if (!ecore_x_selection_convert(xevent->xselectionrequest.selection,
-                                           xevent->xselectionrequest.target,
-                                           &data, &len, &type, &typesize))
-              {
-                 /* Refuse selection, conversion to requested target failed */
-                 property = None;
-              }
-            else
-              {
-                 /* FIXME: This does not properly handle large data transfers */
-                 ecore_x_window_prop_property_set(xevent->xselectionrequest.requestor,
-                                                  xevent->xselectionrequest.property,
-                                                  type, typesize,
-                                                  data, len);
-                 property = xevent->xselectionrequest.property;
-                 free(data);
-              }
-
-            ecore_x_selection_notify_send(xevent->xselectionrequest.requestor,
-                                          xevent->xselectionrequest.selection,
-                                          xevent->xselectionrequest.target,
-                                          property,
-                                          xevent->xselectionrequest.time);
-         }
+        Ecore_X_Selection_Intern *si;
+
+        si = _ecore_x_selection_get(xevent->xselectionrequest.selection);
+        if (si->data)
+          {
+             Ecore_X_Atom property;
+             Ecore_X_Atom type;
+
+             /* Set up defaults for strings first */
+             type = xevent->xselectionrequest.target;
+             typesize = 8;
+             len = sd->length;
+
+             if (!ecore_x_selection_convert(xevent->xselectionrequest.selection,
+                                            xevent->xselectionrequest.target,
+                                            &data, &len, &type, &typesize))
+                /* Refuse selection, conversion to requested target failed */
+                property = None;
+             else
+               {
+                  /* FIXME: This does not properly handle large data transfers */
+                  ecore_x_window_prop_property_set(
+                     xevent->xselectionrequest.requestor,
+                     xevent->xselectionrequest.
+                     property,
+                     type,
+                     typesize,
+                     data,
+                     len);
+                  property = xevent->xselectionrequest.property;
+                  free(data);
+               }
+
+             ecore_x_selection_notify_send(xevent->xselectionrequest.requestor,
+                                           xevent->xselectionrequest.selection,
+                                           xevent->xselectionrequest.target,
+                                           property,
+                                           xevent->xselectionrequest.time);
+          }
      }
+
    return;
 }
 
@@ -1387,41 +1616,45 @@ _ecore_x_event_handle_selection_notify(XEvent *xevent)
 
    if (xevent->xselection.target == ECORE_X_ATOM_SELECTION_TARGETS)
      {
-       format = ecore_x_window_prop_property_get(xevent->xselection.requestor,
-                                               xevent->xselection.property,
-                                               XA_ATOM, 32, &data, &num_ret);
-       if (!format) return;
+        format = ecore_x_window_prop_property_get(xevent->xselection.requestor,
+                                                  xevent->xselection.property,
+                                                  XA_ATOM, 32, &data, &num_ret);
+        if (!format)
+           return;
      }
    else
      {
-       format = ecore_x_window_prop_property_get(xevent->xselection.requestor,
-                                               xevent->xselection.property,
-                                               AnyPropertyType, 8, &data,
-                                               &num_ret);
-       if (!format) return;
+        format = ecore_x_window_prop_property_get(xevent->xselection.requestor,
+                                                  xevent->xselection.property,
+                                                  AnyPropertyType, 8, &data,
+                                                  &num_ret);
+        if (!format)
+           return;
      }
 
    e = calloc(1, sizeof(Ecore_X_Event_Selection_Notify));
-   if (!e) return;
+   if (!e)
+      return;
+
    e->win = xevent->xselection.requestor;
    e->time = xevent->xselection.time;
    e->atom = selection;
    e->target = _ecore_x_selection_target_get(xevent->xselection.target);
 
    if (selection == ECORE_X_ATOM_SELECTION_PRIMARY)
-     e->selection = ECORE_X_SELECTION_PRIMARY;
+      e->selection = ECORE_X_SELECTION_PRIMARY;
    else if (selection == ECORE_X_ATOM_SELECTION_SECONDARY)
-     e->selection = ECORE_X_SELECTION_SECONDARY;
+      e->selection = ECORE_X_SELECTION_SECONDARY;
    else if (selection == ECORE_X_ATOM_SELECTION_XDND)
-     e->selection = ECORE_X_SELECTION_XDND;
+      e->selection = ECORE_X_SELECTION_XDND;
    else if (selection == ECORE_X_ATOM_SELECTION_CLIPBOARD)
-     e->selection = ECORE_X_SELECTION_CLIPBOARD;
+      e->selection = ECORE_X_SELECTION_CLIPBOARD;
    else
-     e->selection = ECORE_X_SELECTION_OTHER;
+      e->selection = ECORE_X_SELECTION_OTHER;
 
    e->data = _ecore_x_selection_parse(e->target, data, num_ret, format);
 
-   ecore_event_add(ECORE_X_EVENT_SELECTION_NOTIFY, e, 
+        ecore_event_add(ECORE_X_EVENT_SELECTION_NOTIFY, e,
                    _ecore_x_event_free_selection_notify, NULL);
 }
 
@@ -1432,7 +1665,9 @@ _ecore_x_event_handle_colormap_notify(XEvent *xevent)
 
    _ecore_x_last_event_mouse_move = 0;
    e = calloc(1,sizeof(Ecore_X_Event_Window_Colormap));
-   if (!e) return;
+   if (!e)
+      return;
+
    e->win = xevent->xcolormap.window;
    e->cmap = xevent->xcolormap.colormap;
    e->time = _ecore_x_event_last_time;
@@ -1440,7 +1675,8 @@ _ecore_x_event_handle_colormap_notify(XEvent *xevent)
       e->installed = 1;
    else
       e->installed = 0;
-   ecore_event_add(ECORE_X_EVENT_WINDOW_COLORMAP, e, NULL, NULL);
+
+        ecore_event_add(ECORE_X_EVENT_WINDOW_COLORMAP, e, NULL, NULL);
 }
 
 void
@@ -1455,415 +1691,438 @@ _ecore_x_event_handle_client_message(XEvent *xevent)
        (xevent->xclient.format == 32) &&
        (xevent->xclient.data.l[0] == (long)ECORE_X_ATOM_WM_DELETE_WINDOW))
      {
-       Ecore_X_Event_Window_Delete_Request *e;
+        Ecore_X_Event_Window_Delete_Request *e;
 
-       e = calloc(1, sizeof(Ecore_X_Event_Window_Delete_Request));
-       if (!e) return;
-       e->win = xevent->xclient.window;
-       e->time = _ecore_x_event_last_time;
-       ecore_event_add(ECORE_X_EVENT_WINDOW_DELETE_REQUEST, e, NULL, NULL);
-     }
+        e = calloc(1, sizeof(Ecore_X_Event_Window_Delete_Request));
+        if (!e)
+           return;
 
+        e->win = xevent->xclient.window;
+        e->time = _ecore_x_event_last_time;
+        ecore_event_add(ECORE_X_EVENT_WINDOW_DELETE_REQUEST, e, NULL, NULL);
+     }
    else if ((xevent->xclient.message_type == ECORE_X_ATOM_NET_WM_MOVERESIZE) &&
-           (xevent->xclient.format == 32) &&
-           /* Ignore move and resize with keyboard */
-           (xevent->xclient.data.l[2] < 9))
+            (xevent->xclient.format == 32) &&
+/* Ignore move and resize with keyboard */
+            (xevent->xclient.data.l[2] < 9))
      {
-       Ecore_X_Event_Window_Move_Resize_Request *e;
-
-       e = calloc(1, sizeof(Ecore_X_Event_Window_Move_Resize_Request));
-       if (!e) return;
-       e->win = xevent->xclient.window;
-       e->x = xevent->xclient.data.l[0];
-       e->y = xevent->xclient.data.l[1];
-       e->direction = xevent->xclient.data.l[2];
-       e->button = xevent->xclient.data.l[3];
-       e->source = xevent->xclient.data.l[4];
-       ecore_event_add(ECORE_X_EVENT_WINDOW_MOVE_RESIZE_REQUEST, e, NULL, NULL);
+        Ecore_X_Event_Window_Move_Resize_Request *e;
+
+        e = calloc(1, sizeof(Ecore_X_Event_Window_Move_Resize_Request));
+        if (!e)
+           return;
+
+        e->win = xevent->xclient.window;
+        e->x = xevent->xclient.data.l[0];
+        e->y = xevent->xclient.data.l[1];
+        e->direction = xevent->xclient.data.l[2];
+        e->button = xevent->xclient.data.l[3];
+        e->source = xevent->xclient.data.l[4];
+        ecore_event_add(ECORE_X_EVENT_WINDOW_MOVE_RESIZE_REQUEST, e, NULL, NULL);
      }
-
    /* Xdnd Client Message Handling Begin */
    /* Message Type: XdndEnter target */
    else if (xevent->xclient.message_type == ECORE_X_ATOM_XDND_ENTER)
      {
-       Ecore_X_Event_Xdnd_Enter *e;
-       Ecore_X_DND_Target *target;
+        Ecore_X_Event_Xdnd_Enter *e;
+        Ecore_X_DND_Target *target;
 
-       e = calloc(1, sizeof(Ecore_X_Event_Xdnd_Enter));
-       if (!e) return;
+        e = calloc(1, sizeof(Ecore_X_Event_Xdnd_Enter));
+        if (!e)
+           return;
 
         LOGFN(__FILE__, __LINE__, __FUNCTION__);
-       target = _ecore_x_dnd_target_get();
-       target->state = ECORE_X_DND_TARGET_ENTERED;
-       target->source = xevent->xclient.data.l[0];
-       target->win = xevent->xclient.window;
-       target->version = (int) (xevent->xclient.data.l[1] >> 24);
-       if (target->version > ECORE_X_DND_VERSION)
-         {
-            WRN("DND: Requested version %d, we only support up to %d", 
-                    target->version, ECORE_X_DND_VERSION);
-            return;
-         }
-
-       if (xevent->xclient.data.l[1] & 0x1UL)
-         {
-            /* source supports more than 3 types, fetch property */
-            unsigned char *data;
-            Ecore_X_Atom *types;
-            int i, num_ret;
+        target = _ecore_x_dnd_target_get();
+        target->state = ECORE_X_DND_TARGET_ENTERED;
+        target->source = xevent->xclient.data.l[0];
+        target->win = xevent->xclient.window;
+        target->version = (int)(xevent->xclient.data.l[1] >> 24);
+        if (target->version > ECORE_X_DND_VERSION)
+          {
+             WRN("DND: Requested version %d, we only support up to %d",
+                 target->version, ECORE_X_DND_VERSION);
+             return;
+          }
+
+        if (xevent->xclient.data.l[1] & 0x1UL)
+          {
+             /* source supports more than 3 types, fetch property */
+             unsigned char *data;
+             Ecore_X_Atom *types;
+             int i, num_ret;
 
              LOGFN(__FILE__, __LINE__, __FUNCTION__);
-            if (!(ecore_x_window_prop_property_get(target->source, 
-                                                   ECORE_X_ATOM_XDND_TYPE_LIST,
-                                                   XA_ATOM,
-                                                   32, &data, &num_ret)))
-              {
-                 WRN("DND: Could not fetch data type list from source window, aborting.");
-                 return;
-              }
-            types = (Ecore_X_Atom *)data;
-            e->types = calloc(num_ret, sizeof(char *));
-            if (e->types)
-              {
+             if (!(ecore_x_window_prop_property_get(target->source,
+                                                    ECORE_X_ATOM_XDND_TYPE_LIST,
+                                                    XA_ATOM,
+                                                    32, &data, &num_ret)))
+               {
+                  WRN(
+                     "DND: Could not fetch data type list from source window, aborting.");
+                  return;
+               }
+
+             types = (Ecore_X_Atom *)data;
+             e->types = calloc(num_ret, sizeof(char *));
+             if (e->types)
+               {
                   LOGFN(__FILE__, __LINE__, __FUNCTION__);
-                 for (i = 0; i < num_ret; i++)
-                   e->types[i] = XGetAtomName(_ecore_x_disp, types[i]);
-              }
-            e->num_types = num_ret;
-         }
-       else
-         {
-            int i = 0;
-
-            e->types = calloc(3, sizeof(char *));
-            if (e->types)
-              {
+                  for (i = 0; i < num_ret; i++)
+                     e->types[i] = XGetAtomName(_ecore_x_disp, types[i]);
+               }
+
+             e->num_types = num_ret;
+          }
+        else
+          {
+             int i = 0;
+
+             e->types = calloc(3, sizeof(char *));
+             if (e->types)
+               {
                   LOGFN(__FILE__, __LINE__, __FUNCTION__);
-                 while ((i < 3) && (xevent->xclient.data.l[i + 2]))
-                   {
-                      e->types[i] = XGetAtomName(_ecore_x_disp, xevent->xclient.data.l[i + 2]);
-                      i++;
-                   }
-              }
-            e->num_types = i;
-         }
-
-       e->win = target->win;
-       e->source = target->source;
-       ecore_event_add(ECORE_X_EVENT_XDND_ENTER, e, 
+                  while ((i < 3) && (xevent->xclient.data.l[i + 2]))
+                    {
+                       e->types[i] = XGetAtomName(_ecore_x_disp,
+                                                  xevent->xclient.data.l[i + 2]);
+                       i++;
+                    }
+               }
+
+             e->num_types = i;
+          }
+
+        e->win = target->win;
+        e->source = target->source;
+        ecore_event_add(ECORE_X_EVENT_XDND_ENTER, e,
                         _ecore_x_event_free_xdnd_enter, NULL);
      }
-
    /* Message Type: XdndPosition target */
    else if (xevent->xclient.message_type == ECORE_X_ATOM_XDND_POSITION)
      {
-       Ecore_X_Event_Xdnd_Position *e;
-       Ecore_X_DND_Target *target;
+        Ecore_X_Event_Xdnd_Position *e;
+        Ecore_X_DND_Target *target;
 
         LOGFN(__FILE__, __LINE__, __FUNCTION__);
-       target = _ecore_x_dnd_target_get();
-       if ((target->source != (Ecore_X_Window)xevent->xclient.data.l[0]) ||
-           (target->win != xevent->xclient.window))
-         return;
-
-       target->pos.x = xevent->xclient.data.l[2] >> 16;
-       target->pos.y = xevent->xclient.data.l[2] & 0xFFFFUL;
-       target->action = xevent->xclient.data.l[4]; /* Version 2 */
-
-       target->time = (target->version >= 1) ? 
-          (Time)xevent->xclient.data.l[3] : CurrentTime;
-
-       e = calloc(1, sizeof(Ecore_X_Event_Xdnd_Position));
-       if (!e) return;
-       e->win = target->win;
-       e->source = target->source;
-       e->position.x = target->pos.x;
-       e->position.y = target->pos.y;
-       e->action = target->action;
-       ecore_event_add(ECORE_X_EVENT_XDND_POSITION, e, NULL, NULL);
+        target = _ecore_x_dnd_target_get();
+        if ((target->source != (Ecore_X_Window)xevent->xclient.data.l[0]) ||
+            (target->win != xevent->xclient.window))
+           return;
+
+        target->pos.x = xevent->xclient.data.l[2] >> 16;
+        target->pos.y = xevent->xclient.data.l[2] & 0xFFFFUL;
+        target->action = xevent->xclient.data.l[4]; /* Version 2 */
+
+        target->time = (target->version >= 1) ?
+           (Time)xevent->xclient.data.l[3] : CurrentTime;
+
+        e = calloc(1, sizeof(Ecore_X_Event_Xdnd_Position));
+        if (!e)
+           return;
+
+        e->win = target->win;
+        e->source = target->source;
+        e->position.x = target->pos.x;
+        e->position.y = target->pos.y;
+        e->action = target->action;
+        ecore_event_add(ECORE_X_EVENT_XDND_POSITION, e, NULL, NULL);
      }
-
    /* Message Type: XdndStatus source */
    else if (xevent->xclient.message_type == ECORE_X_ATOM_XDND_STATUS)
      {
-       Ecore_X_Event_Xdnd_Status *e;
-       Ecore_X_DND_Source *source;
+        Ecore_X_Event_Xdnd_Status *e;
+        Ecore_X_DND_Source *source;
 
         LOGFN(__FILE__, __LINE__, __FUNCTION__);
-       source = _ecore_x_dnd_source_get();
-       /* Make sure source/target match */
-       if ((source->win != xevent->xclient.window ) ||
-           (source->dest != (Window)xevent->xclient.data.l[0]))
-         return;
-
-       source->await_status = 0;
-
-       source->will_accept = xevent->xclient.data.l[1] & 0x1UL;
-       source->suppress = (xevent->xclient.data.l[1] & 0x2UL) ? 0 : 1;
-
-       source->rectangle.x = xevent->xclient.data.l[2] >> 16;
-       source->rectangle.y = xevent->xclient.data.l[2] & 0xFFFFUL;
-       source->rectangle.width = xevent->xclient.data.l[3] >> 16;
-       source->rectangle.height = xevent->xclient.data.l[3] & 0xFFFFUL;
-
-       source->accepted_action = xevent->xclient.data.l[4];
-
-       e = calloc(1, sizeof(Ecore_X_Event_Xdnd_Status));
-       if (!e) return;
-       e->win = source->win;
-       e->target = source->dest;
-       e->will_accept = source->will_accept;
-       e->rectangle.x = source->rectangle.x;
-       e->rectangle.y = source->rectangle.y;
-       e->rectangle.width = source->rectangle.width;
-       e->rectangle.height = source->rectangle.height;
-       e->action = source->accepted_action;
-
-       ecore_event_add(ECORE_X_EVENT_XDND_STATUS, e, NULL, NULL);
+        source = _ecore_x_dnd_source_get();
+        /* Make sure source/target match */
+        if ((source->win != xevent->xclient.window) ||
+            (source->dest != (Window)xevent->xclient.data.l[0]))
+           return;
+
+        source->await_status = 0;
+
+        source->will_accept = xevent->xclient.data.l[1] & 0x1UL;
+        source->suppress = (xevent->xclient.data.l[1] & 0x2UL) ? 0 : 1;
+
+        source->rectangle.x = xevent->xclient.data.l[2] >> 16;
+        source->rectangle.y = xevent->xclient.data.l[2] & 0xFFFFUL;
+        source->rectangle.width = xevent->xclient.data.l[3] >> 16;
+        source->rectangle.height = xevent->xclient.data.l[3] & 0xFFFFUL;
+
+        source->accepted_action = xevent->xclient.data.l[4];
+
+        e = calloc(1, sizeof(Ecore_X_Event_Xdnd_Status));
+        if (!e)
+           return;
+
+        e->win = source->win;
+        e->target = source->dest;
+        e->will_accept = source->will_accept;
+        e->rectangle.x = source->rectangle.x;
+        e->rectangle.y = source->rectangle.y;
+        e->rectangle.width = source->rectangle.width;
+        e->rectangle.height = source->rectangle.height;
+        e->action = source->accepted_action;
+
+        ecore_event_add(ECORE_X_EVENT_XDND_STATUS, e, NULL, NULL);
      }
-
    /* Message Type: XdndLeave target */
    /* Pretend the whole thing never happened, sort of */
    else if (xevent->xclient.message_type == ECORE_X_ATOM_XDND_LEAVE)
      {
-       Ecore_X_Event_Xdnd_Leave *e;
-       Ecore_X_DND_Target *target;
+        Ecore_X_Event_Xdnd_Leave *e;
+        Ecore_X_DND_Target *target;
 
         LOGFN(__FILE__, __LINE__, __FUNCTION__);
-       target = _ecore_x_dnd_target_get();
-       if ((target->source != (Ecore_X_Window)xevent->xclient.data.l[0]) ||
-           (target->win != xevent->xclient.window))
-         return;
-
-       target->state = ECORE_X_DND_TARGET_IDLE;
-
-       e = calloc(1, sizeof(Ecore_X_Event_Xdnd_Leave));
-       if (!e) return;
-       e->win = xevent->xclient.window;
-       e->source = (Window)xevent->xclient.data.l[0];
-       ecore_event_add(ECORE_X_EVENT_XDND_LEAVE, e, NULL, NULL);
-     }
+        target = _ecore_x_dnd_target_get();
+        if ((target->source != (Ecore_X_Window)xevent->xclient.data.l[0]) ||
+            (target->win != xevent->xclient.window))
+           return;
+
+        target->state = ECORE_X_DND_TARGET_IDLE;
+
+        e = calloc(1, sizeof(Ecore_X_Event_Xdnd_Leave));
+        if (!e)
+           return;
 
+        e->win = xevent->xclient.window;
+        e->source = (Window)xevent->xclient.data.l[0];
+        ecore_event_add(ECORE_X_EVENT_XDND_LEAVE, e, NULL, NULL);
+     }
    /* Message Type: XdndDrop target */
    else if (xevent->xclient.message_type == ECORE_X_ATOM_XDND_DROP)
      {
-       Ecore_X_Event_Xdnd_Drop *e;
-       Ecore_X_DND_Target *target;
+        Ecore_X_Event_Xdnd_Drop *e;
+        Ecore_X_DND_Target *target;
 
         LOGFN(__FILE__, __LINE__, __FUNCTION__);
-       target = _ecore_x_dnd_target_get();
-       /* Match source/target */
-       if ((target->source != (Window)xevent->xclient.data.l[0]) ||
-           (target->win != xevent->xclient.window))
-         return;
-
-       target->time = (target->version >= 1) ? 
-          (Time)xevent->xclient.data.l[2] : _ecore_x_event_last_time;
-
-       e = calloc(1, sizeof(Ecore_X_Event_Xdnd_Drop));
-       if (!e) return;
-       e->win = target->win;
-       e->source = target->source;
-       e->action = target->action;
-       e->position.x = target->pos.x;
-       e->position.y = target->pos.y;
-       ecore_event_add(ECORE_X_EVENT_XDND_DROP, e, NULL, NULL);
+        target = _ecore_x_dnd_target_get();
+        /* Match source/target */
+        if ((target->source != (Window)xevent->xclient.data.l[0]) ||
+            (target->win != xevent->xclient.window))
+           return;
+
+        target->time = (target->version >= 1) ?
+           (Time)xevent->xclient.data.l[2] : _ecore_x_event_last_time;
+
+        e = calloc(1, sizeof(Ecore_X_Event_Xdnd_Drop));
+        if (!e)
+           return;
+
+        e->win = target->win;
+        e->source = target->source;
+        e->action = target->action;
+        e->position.x = target->pos.x;
+        e->position.y = target->pos.y;
+        ecore_event_add(ECORE_X_EVENT_XDND_DROP, e, NULL, NULL);
      }
-
-  /* Message Type: XdndFinished source */
+   /* Message Type: XdndFinished source */
    else if (xevent->xclient.message_type == ECORE_X_ATOM_XDND_FINISHED)
      {
-       Ecore_X_Event_Xdnd_Finished *e;
-       Ecore_X_DND_Source *source;
-       int completed = 1;
+        Ecore_X_Event_Xdnd_Finished *e;
+        Ecore_X_DND_Source *source;
+        int completed = 1;
 
-        LOGFN(__FILE__, __LINE__, __FUNCTION__);
-       source = _ecore_x_dnd_source_get();
-       /* Match source/target */
-       if ((source->win != xevent->xclient.window) ||
-           (source->dest != (Window)xevent->xclient.data.l[0]))
-         return;
-
-       if ((source->version < 5) || (xevent->xclient.data.l[1] & 0x1UL))
-         {
              LOGFN(__FILE__, __LINE__, __FUNCTION__);
-            /* Target successfully performed drop action */
-            ecore_x_selection_xdnd_clear();
-            source->state = ECORE_X_DND_SOURCE_IDLE;
-         }
-       else if (source->version >= 5)
-         {
-              completed = 0;
-              source->state = ECORE_X_DND_SOURCE_CONVERTING;
-
-              /* FIXME: Probably need to add a timer to switch back to idle 
-               * and discard the selection data */
-         } 
-
-       e = calloc(1, sizeof(Ecore_X_Event_Xdnd_Finished));
-       if (!e) return;
-       e->win = source->win;
-       e->target = source->dest;
-       e->completed = completed;
-       if (source->version >= 5)
-         {
-            source->accepted_action = xevent->xclient.data.l[2];
-            e->action = source->accepted_action;
-         }
-       else
-         {
-            source->accepted_action = 0;
-            e->action = source->action;
-         }
-
-       ecore_event_add(ECORE_X_EVENT_XDND_FINISHED, e, NULL, NULL);
+        source = _ecore_x_dnd_source_get();
+        /* Match source/target */
+        if ((source->win != xevent->xclient.window) ||
+            (source->dest != (Window)xevent->xclient.data.l[0]))
+           return;
+
+        if ((source->version < 5) || (xevent->xclient.data.l[1] & 0x1UL))
+          {
+             LOGFN(__FILE__, __LINE__, __FUNCTION__);
+             /* Target successfully performed drop action */
+             ecore_x_selection_xdnd_clear();
+             source->state = ECORE_X_DND_SOURCE_IDLE;
+          }
+        else if (source->version >= 5)
+          {
+             completed = 0;
+             source->state = ECORE_X_DND_SOURCE_CONVERTING;
+
+             /* FIXME: Probably need to add a timer to switch back to idle
+              * and discard the selection data */
+          }
+
+        e = calloc(1, sizeof(Ecore_X_Event_Xdnd_Finished));
+        if (!e)
+           return;
+
+        e->win = source->win;
+        e->target = source->dest;
+        e->completed = completed;
+        if (source->version >= 5)
+          {
+             source->accepted_action = xevent->xclient.data.l[2];
+             e->action = source->accepted_action;
+          }
+        else
+          {
+             source->accepted_action = 0;
+             e->action = source->action;
+          }
+
+        ecore_event_add(ECORE_X_EVENT_XDND_FINISHED, e, NULL, NULL);
      }
    else if (xevent->xclient.message_type == ECORE_X_ATOM_NET_WM_STATE)
      {
-       Ecore_X_Event_Window_State_Request *e;
-
-       e = calloc(1, sizeof(Ecore_X_Event_Window_State_Request));
-       if (!e) return;
-       e->win = xevent->xclient.window;
-       if (xevent->xclient.data.l[0] == 0)
-         e->action = ECORE_X_WINDOW_STATE_ACTION_REMOVE;
-       else if (xevent->xclient.data.l[0] == 1)
-         e->action = ECORE_X_WINDOW_STATE_ACTION_ADD;
-       else if (xevent->xclient.data.l[0] == 2)
-         e->action = ECORE_X_WINDOW_STATE_ACTION_TOGGLE;
-       else
-         {
-            free(e);
-            return;
-         }
-        LOGFN(__FILE__, __LINE__, __FUNCTION__);
-       e->state[0] = _ecore_x_netwm_state_get(xevent->xclient.data.l[1]);
-       if (e->state[0] == ECORE_X_WINDOW_STATE_UNKNOWN)
-         {
-//          char *name;
+        Ecore_X_Event_Window_State_Request *e;
+
+        e = calloc(1, sizeof(Ecore_X_Event_Window_State_Request));
+        if (!e)
+           return;
+
+        e->win = xevent->xclient.window;
+        if (xevent->xclient.data.l[0] == 0)
+           e->action = ECORE_X_WINDOW_STATE_ACTION_REMOVE;
+        else if (xevent->xclient.data.l[0] == 1)
+           e->action = ECORE_X_WINDOW_STATE_ACTION_ADD;
+        else if (xevent->xclient.data.l[0] == 2)
+           e->action = ECORE_X_WINDOW_STATE_ACTION_TOGGLE;
+        else
+          {
+             free(e);
+             return;
+          }
 
-             LOGFN(__FILE__, __LINE__, __FUNCTION__);
+           LOGFN(__FILE__, __LINE__, __FUNCTION__);
+        e->state[0] = _ecore_x_netwm_state_get(xevent->xclient.data.l[1]);
+        if (e->state[0] == ECORE_X_WINDOW_STATE_UNKNOWN)
+//          char *name;
+           LOGFN(__FILE__, __LINE__, __FUNCTION__);
 //          name = XGetAtomName(_ecore_x_disp, xevent->xclient.data.l[1]);
 //          if (name) ERR("Unknown state: %s", name);
 //          XFree(name);
-         }
-       e->state[1] = _ecore_x_netwm_state_get(xevent->xclient.data.l[2]);
-       if (e->state[1] == ECORE_X_WINDOW_STATE_UNKNOWN)
-         {
-//          char *name;
 
-             LOGFN(__FILE__, __LINE__, __FUNCTION__);
+        e->state[1] = _ecore_x_netwm_state_get(xevent->xclient.data.l[2]);
+        if (e->state[1] == ECORE_X_WINDOW_STATE_UNKNOWN)
+//          char *name;
+           LOGFN(__FILE__, __LINE__, __FUNCTION__);
 //          name = XGetAtomName(_ecore_x_disp, xevent->xclient.data.l[2]);
 //          if (name) ERR("Unknown state: %s", name);
 //          XFree(name);
-         }
-       e->source = xevent->xclient.data.l[3];
 
-       ecore_event_add(ECORE_X_EVENT_WINDOW_STATE_REQUEST, e, NULL, NULL);
+        e->source = xevent->xclient.data.l[3];
+
+             ecore_event_add(ECORE_X_EVENT_WINDOW_STATE_REQUEST, e, NULL, NULL);
      }
    else if ((xevent->xclient.message_type == ECORE_X_ATOM_WM_CHANGE_STATE)
-           && (xevent->xclient.format == 32)
-           && (xevent->xclient.data.l[0] == IconicState))
+            && (xevent->xclient.format == 32)
+            && (xevent->xclient.data.l[0] == IconicState))
      {
-       Ecore_X_Event_Window_State_Request *e;
+        Ecore_X_Event_Window_State_Request *e;
 
-       e = calloc(1, sizeof(Ecore_X_Event_Window_State_Request));
-       if (!e) return;
-       e->win = xevent->xclient.window;
-       e->action = ECORE_X_WINDOW_STATE_ACTION_ADD;
-       e->state[0] = ECORE_X_WINDOW_STATE_ICONIFIED;
+        e = calloc(1, sizeof(Ecore_X_Event_Window_State_Request));
+        if (!e)
+           return;
 
-       ecore_event_add(ECORE_X_EVENT_WINDOW_STATE_REQUEST, e, NULL, NULL);
+        e->win = xevent->xclient.window;
+        e->action = ECORE_X_WINDOW_STATE_ACTION_ADD;
+        e->state[0] = ECORE_X_WINDOW_STATE_ICONIFIED;
+
+             ecore_event_add(ECORE_X_EVENT_WINDOW_STATE_REQUEST, e, NULL, NULL);
      }
    else if ((xevent->xclient.message_type == ECORE_X_ATOM_NET_WM_DESKTOP)
-           && (xevent->xclient.format == 32))
+            && (xevent->xclient.format == 32))
      {
-       Ecore_X_Event_Desktop_Change *e;
+        Ecore_X_Event_Desktop_Change *e;
+
+        e = calloc(1, sizeof(Ecore_X_Event_Desktop_Change));
+        if (!e)
+           return;
 
-       e = calloc(1, sizeof(Ecore_X_Event_Desktop_Change));
-       if (!e) return;
-       e->win = xevent->xclient.window;
-       e->desk = xevent->xclient.data.l[0];
-       e->source = xevent->xclient.data.l[1];
+        e->win = xevent->xclient.window;
+        e->desk = xevent->xclient.data.l[0];
+        e->source = xevent->xclient.data.l[1];
 
-       ecore_event_add(ECORE_X_EVENT_DESKTOP_CHANGE, e, NULL, NULL);
+             ecore_event_add(ECORE_X_EVENT_DESKTOP_CHANGE, e, NULL, NULL);
      }
-   else if ((xevent->xclient.message_type == ECORE_X_ATOM_NET_REQUEST_FRAME_EXTENTS))
+   else if ((xevent->xclient.message_type ==
+             ECORE_X_ATOM_NET_REQUEST_FRAME_EXTENTS))
      {
-       Ecore_X_Event_Frame_Extents_Request *e;
+        Ecore_X_Event_Frame_Extents_Request *e;
 
-       e = calloc(1, sizeof(Ecore_X_Event_Frame_Extents_Request));
-       if (!e) return;
-       e->win = xevent->xclient.window;
+        e = calloc(1, sizeof(Ecore_X_Event_Frame_Extents_Request));
+        if (!e)
+           return;
 
-       ecore_event_add(ECORE_X_EVENT_FRAME_EXTENTS_REQUEST, e, NULL, NULL);
+        e->win = xevent->xclient.window;
+
+             ecore_event_add(ECORE_X_EVENT_FRAME_EXTENTS_REQUEST, e, NULL, NULL);
      }
    else if ((xevent->xclient.message_type == ECORE_X_ATOM_WM_PROTOCOLS)
-           && ((Ecore_X_Atom)xevent->xclient.data.l[0] == ECORE_X_ATOM_NET_WM_PING)
-           && (xevent->xclient.format == 32))
+            && ((Ecore_X_Atom)xevent->xclient.data.l[0] ==
+                ECORE_X_ATOM_NET_WM_PING)
+            && (xevent->xclient.format == 32))
      {
-       Ecore_X_Event_Ping *e;
+        Ecore_X_Event_Ping *e;
         Ecore_X_Window root = 0;
 
-       e = calloc(1, sizeof(Ecore_X_Event_Ping));
-       if (!e) return;
-       e->win = xevent->xclient.window;
-       e->time = xevent->xclient.data.l[1];
-       e->event_win = xevent->xclient.data.l[2];
+        e = calloc(1, sizeof(Ecore_X_Event_Ping));
+        if (!e)
+           return;
+
+        e->win = xevent->xclient.window;
+        e->time = xevent->xclient.data.l[1];
+        e->event_win = xevent->xclient.data.l[2];
 
         /* send a reply anyway - we are alive... eventloop at least */
-       ecore_event_add(ECORE_X_EVENT_PING, e, NULL, NULL);
+             ecore_event_add(ECORE_X_EVENT_PING, e, NULL, NULL);
         if (ScreenCount(_ecore_x_disp) > 1)
           {
              LOGFN(__FILE__, __LINE__, __FUNCTION__);
              root = ecore_x_window_root_get(e->win);
           }
         else
-          root = DefaultRootWindow(_ecore_x_disp);
+           root = DefaultRootWindow(_ecore_x_disp);
 
         if (xevent->xclient.window != root)
           {
              xevent->xclient.window = root;
-             XSendEvent(_ecore_x_disp, root, False, 
-                        SubstructureRedirectMask | SubstructureNotifyMask, 
+             XSendEvent(_ecore_x_disp, root, False,
+                        SubstructureRedirectMask | SubstructureNotifyMask,
                         xevent);
           }
      }
-   else if ((xevent->xclient.message_type == ECORE_X_ATOM_NET_STARTUP_INFO_BEGIN) &&
-           (xevent->xclient.format == 8))
-     {
-       _ecore_x_netwm_startup_info_begin(xevent->xclient.window, xevent->xclient.data.b);
-     }
+   else if ((xevent->xclient.message_type ==
+             ECORE_X_ATOM_NET_STARTUP_INFO_BEGIN) &&
+            (xevent->xclient.format == 8))
+      _ecore_x_netwm_startup_info_begin(xevent->xclient.window,
+                                        xevent->xclient.data.b);
    else if ((xevent->xclient.message_type == ECORE_X_ATOM_NET_STARTUP_INFO) &&
-           (xevent->xclient.format == 8))
-     {
-       _ecore_x_netwm_startup_info(xevent->xclient.window, xevent->xclient.data.b);
-     }
+            (xevent->xclient.format == 8))
+      _ecore_x_netwm_startup_info(xevent->xclient.window,
+                                  xevent->xclient.data.b);
    else if ((xevent->xclient.message_type == 27777)
-           && (xevent->xclient.data.l[0] == 0x7162534)
-           && (xevent->xclient.format == 32)
-           && (xevent->xclient.window == _ecore_x_private_win))
+            && (xevent->xclient.data.l[0] == 0x7162534)
+            && (xevent->xclient.format == 32)
+            && (xevent->xclient.window == _ecore_x_private_win))
      {
-       /* a grab sync marker */
-       if (xevent->xclient.data.l[1] == 0x10000001)
-         _ecore_x_window_grab_remove(xevent->xclient.data.l[2]);
-       else if (xevent->xclient.data.l[1] == 0x10000002)
-         _ecore_x_key_grab_remove(xevent->xclient.data.l[2]);
+        /* a grab sync marker */
+        if (xevent->xclient.data.l[1] == 0x10000001)
+           _ecore_x_window_grab_remove(xevent->xclient.data.l[2]);
+        else if (xevent->xclient.data.l[1] == 0x10000002)
+           _ecore_x_key_grab_remove(xevent->xclient.data.l[2]);
      }
    else
      {
-       Ecore_X_Event_Client_Message *e;
-       int i;
-
-       e = calloc(1, sizeof(Ecore_X_Event_Client_Message));
-       if (!e) return;
-       e->win = xevent->xclient.window;
-       e->message_type = xevent->xclient.message_type;
-       e->format = xevent->xclient.format;
-       for (i = 0; i < 5; i++) 
-         e->data.l[i] = xevent->xclient.data.l[i];
-
-       ecore_event_add(ECORE_X_EVENT_CLIENT_MESSAGE, e, NULL, NULL);
+        Ecore_X_Event_Client_Message *e;
+        int i;
+
+        e = calloc(1, sizeof(Ecore_X_Event_Client_Message));
+        if (!e)
+           return;
+
+        e->win = xevent->xclient.window;
+        e->message_type = xevent->xclient.message_type;
+        e->format = xevent->xclient.format;
+        for (i = 0; i < 5; i++)
+           e->data.l[i] = xevent->xclient.data.l[i];
+
+        ecore_event_add(ECORE_X_EVENT_CLIENT_MESSAGE, e, NULL, NULL);
      }
 }
 
@@ -1883,7 +2142,9 @@ _ecore_x_event_handle_shape_change(XEvent *xevent)
    _ecore_x_last_event_mouse_move = 0;
    shape_event = (XShapeEvent *)xevent;
    e = calloc(1, sizeof(Ecore_X_Event_Window_Shape));
-   if (!e) return;
+   if (!e)
+      return;
+
    e->win = shape_event->window;
    e->time = shape_event->time;
    ecore_event_add(ECORE_X_EVENT_WINDOW_SHAPE, e, NULL, NULL);
@@ -1899,17 +2160,20 @@ _ecore_x_event_handle_screensaver_notify(XEvent *xevent)
    _ecore_x_last_event_mouse_move = 0;
    screensaver_event = (XScreenSaverNotifyEvent *)xevent;
    e = calloc(1, sizeof(Ecore_X_Event_Screensaver_Notify));
-   if (!e) return;
+   if (!e)
+      return;
+
    e->win = screensaver_event->window;
    if (screensaver_event->state == ScreenSaverOn)
-     e->on = 1;
-  else 
-     e->on = 0;
+      e->on = 1;
+   else
+      e->on = 0;
+
    e->time = screensaver_event->time;
    ecore_event_add(ECORE_X_EVENT_SCREENSAVER_NOTIFY, e, NULL, NULL);
 #else
    xevent = NULL;
-#endif   
+#endif
 }
 
 void
@@ -1921,7 +2185,9 @@ _ecore_x_event_handle_sync_counter(XEvent *xevent)
    _ecore_x_last_event_mouse_move = 0;
    sync_counter_event = (XSyncCounterNotifyEvent *)xevent;
    e = calloc(1, sizeof(Ecore_X_Event_Sync_Counter));
-   if (!e) return;
+   if (!e)
+      return;
+
    e->time = sync_counter_event->time;
    ecore_event_add(ECORE_X_EVENT_SYNC_COUNTER, e, NULL, NULL);
 }
@@ -1936,7 +2202,9 @@ _ecore_x_event_handle_sync_alarm(XEvent *xevent)
    sync_alarm_event = (XSyncAlarmNotifyEvent *)xevent;
 
    e = calloc(1, sizeof(Ecore_X_Event_Sync_Alarm));
-   if (!e) return;
+   if (!e)
+      return;
+
    e->time = sync_alarm_event->time;
    e->alarm = sync_alarm_event->alarm;
    ecore_event_add(ECORE_X_EVENT_SYNC_ALARM, e, NULL, NULL);
@@ -1952,10 +2220,12 @@ _ecore_x_event_handle_randr_change(XEvent *xevent)
    _ecore_x_last_event_mouse_move = 0;
    randr_event = (XRRScreenChangeNotifyEvent *)xevent;
    if (!XRRUpdateConfiguration(xevent))
-     ERR("Can't update RR config!");
+      ERR("Can't update RR config!");
 
    e = calloc(1, sizeof(Ecore_X_Event_Screen_Change));
-   if (!e) return;
+   if (!e)
+      return;
+
    e->win = randr_event->window;
    e->root = randr_event->root;
    e->width = randr_event->width;
@@ -1978,7 +2248,9 @@ _ecore_x_event_handle_randr_notify_crtc_change(const XRRNotifyEvent *xevent)
    randr_event = (const XRRCrtcChangeNotifyEvent *)xevent;
 
    e = calloc(1, sizeof(Ecore_X_Event_Randr_Crtc_Change));
-   if (!e) return;
+   if (!e)
+      return;
+
    e->win = randr_event->window;
    e->crtc = randr_event->crtc;
    e->mode = randr_event->mode;
@@ -1999,7 +2271,9 @@ _ecore_x_event_handle_randr_notify_output_change(const XRRNotifyEvent *xevent)
    randr_event = (const XRROutputChangeNotifyEvent *)xevent;
 
    e = calloc(1, sizeof(Ecore_X_Event_Randr_Output_Change));
-   if (!e) return;
+   if (!e)
+      return;
+
    e->win = randr_event->window;
    e->output = randr_event->output;
    e->crtc = randr_event->crtc;
@@ -2019,7 +2293,9 @@ _ecore_x_event_handle_randr_notify_output_property(const XRRNotifyEvent *xevent)
    randr_event = (const XRROutputPropertyNotifyEvent *)xevent;
 
    e = calloc(1, sizeof(Ecore_X_Event_Randr_Output_Property_Notify));
-   if (!e) return;
+   if (!e)
+      return;
+
    e->win = randr_event->window;
    e->output = randr_event->output;
    e->property = randr_event->property;
@@ -2039,18 +2315,21 @@ _ecore_x_event_handle_randr_notify(XEvent *xevent)
    switch (randr_event->subtype)
      {
       case RRNotify_CrtcChange:
-        _ecore_x_event_handle_randr_notify_crtc_change(randr_event);
-        break;
+         _ecore_x_event_handle_randr_notify_crtc_change(randr_event);
+         break;
+
       case RRNotify_OutputChange:
-        _ecore_x_event_handle_randr_notify_output_change(randr_event);
-        break;
+         _ecore_x_event_handle_randr_notify_output_change(randr_event);
+         break;
+
       case RRNotify_OutputProperty:
-        _ecore_x_event_handle_randr_notify_output_property(randr_event);
-        break;
+         _ecore_x_event_handle_randr_notify_output_property(randr_event);
+         break;
+
       default:
-        ERR("Unknown XRandR RRNotify subtype: %d.",
-            randr_event->subtype);
-        break;
+         ERR("Unknown XRandR RRNotify subtype: %d.",
+             randr_event->subtype);
+         break;
      }
 }
 #endif
@@ -2076,7 +2355,8 @@ _ecore_x_event_handle_damage_notify(XEvent *event)
    damage_event = (XDamageNotifyEvent *)event;
 
    e = calloc(1, sizeof(Ecore_X_Event_Damage));
-   if (!e) return;
+   if (!e)
+      return;
 
    e->level = damage_event->level;
    e->drawable = damage_event->drawable;
@@ -2100,13 +2380,12 @@ static void
 _ecore_x_event_free_generic_event(void *data, void *ev)
 {
 #ifdef ECORE_XI2
-   Ecore_X_Event_Generic *e = (Ecore_X_Event_Generic*)ev;
-   
+   Ecore_X_Event_Generic *e = (Ecore_X_Event_Generic *)ev;
+
    if (e->data)
-     {
-        XFreeEventData(_ecore_x_disp, (XGenericEventCookie *)data);
-     }
-#endif   
+      XFreeEventData(_ecore_x_disp, (XGenericEventCookie *)data);
+
+#endif
 }
 
 void
@@ -2115,13 +2394,14 @@ _ecore_x_event_handle_generic_event(XEvent *event)
 #ifdef ECORE_XI2
    XGenericEvent *generic_event;
    Ecore_X_Event_Generic *e;
-   
+
    LOGFN(__FILE__, __LINE__, __FUNCTION__);
    generic_event = (XGenericEvent *)event;
-   
+
    e = calloc(1, sizeof(Ecore_X_Event_Generic));
-   if (!e) return;
-   
+   if (!e)
+      return;
+
    if (XGetEventData(_ecore_x_disp, &event->xcookie))
      {
         e->cookie = event->xcookie.cookie;
@@ -2132,15 +2412,16 @@ _ecore_x_event_handle_generic_event(XEvent *event)
         e->cookie = 0;
         e->data = NULL;
      }
-   
+
    e->extension = generic_event->extension;
    e->evtype = generic_event->evtype;
-   
+
    if (e->extension == _ecore_x_xi2_opcode)
-     {
-        _ecore_x_input_handler(event);
-     }
-   
-   ecore_event_add(ECORE_X_EVENT_GENERIC, e, _ecore_x_event_free_generic_event, event);
-#endif   
+      _ecore_x_input_handler(event);
+
+   ecore_event_add(ECORE_X_EVENT_GENERIC,
+                   e,
+                   _ecore_x_event_free_generic_event,
+                   event);
+#endif
 }
index ce2d19d..c5cae07 100644 (file)
@@ -25,9 +25,10 @@ _ecore_x_fixes_init(void)
 
    LOGFN(__FILE__, __LINE__, __FUNCTION__);
    if (XFixesQueryVersion(_ecore_x_disp, &_fixes_major, &_fixes_minor))
-     _fixes_available = 1;
+      _fixes_available = 1;
    else
-     _fixes_available = 0;
+      _fixes_available = 0;
+
 #else
    _fixes_available = 0;
 #endif
@@ -41,16 +42,19 @@ _ecore_x_rectangle_ecore_to_x(Ecore_X_Rectangle *rects, int num)
    XRectangle *xrect;
    int i;
 
-   if (num == 0) return NULL;
+   if (num == 0)
+      return NULL;
 
    xrect = malloc(sizeof(XRectangle) * num);
-   if (!xrect) return NULL;
+   if (!xrect)
+      return NULL;
+
    for (i = 0; i < num; i++)
      {
-       xrect[i].x = rects[i].x;
-       xrect[i].y = rects[i].y;
-       xrect[i].width = rects[i].width;
-       xrect[i].height = rects[i].height;
+        xrect[i].x = rects[i].x;
+        xrect[i].y = rects[i].y;
+        xrect[i].width = rects[i].width;
+        xrect[i].height = rects[i].height;
      }
    return xrect;
 }
@@ -61,15 +65,19 @@ _ecore_x_rectangle_x_to_ecore(XRectangle *xrect, int num)
    Ecore_X_Rectangle *rects;
    int i;
 
-   if (num == 0) return NULL;
+   if (num == 0)
+      return NULL;
+
    rects = malloc(sizeof(Ecore_X_Rectangle) * num);
-   if (!rects) return NULL;
+   if (!rects)
+      return NULL;
+
    for (i = 0; i < num; i++)
      {
-       rects[i].x = xrect[i].x;
-       rects[i].y = xrect[i].y;
-       rects[i].width = xrect[i].width;
-       rects[i].height = xrect[i].height;
+        rects[i].x = xrect[i].x;
+        rects[i].y = xrect[i].y;
+        rects[i].width = xrect[i].width;
+        rects[i].height = xrect[i].height;
      }
    return rects;
 }
@@ -177,7 +185,9 @@ ecore_x_region_copy(Ecore_X_Region dest, Ecore_X_Region source)
 }
 
 EAPI void
-ecore_x_region_combine(Ecore_X_Region dest, Ecore_X_Region source1, Ecore_X_Region source2)
+ecore_x_region_combine(Ecore_X_Region dest,
+                       Ecore_X_Region source1,
+                       Ecore_X_Region source2)
 {
 #ifdef ECORE_XFIXES
    LOGFN(__FILE__, __LINE__, __FUNCTION__);
@@ -186,7 +196,9 @@ ecore_x_region_combine(Ecore_X_Region dest, Ecore_X_Region source1, Ecore_X_Regi
 }
 
 EAPI void
-ecore_x_region_intersect(Ecore_X_Region dest, Ecore_X_Region source1, Ecore_X_Region source2)
+ecore_x_region_intersect(Ecore_X_Region dest,
+                         Ecore_X_Region source1,
+                         Ecore_X_Region source2)
 {
 #ifdef ECORE_XFIXES
    LOGFN(__FILE__, __LINE__, __FUNCTION__);
@@ -195,7 +207,9 @@ ecore_x_region_intersect(Ecore_X_Region dest, Ecore_X_Region source1, Ecore_X_Re
 }
 
 EAPI void
-ecore_x_region_subtract(Ecore_X_Region dest, Ecore_X_Region source1, Ecore_X_Region source2)
+ecore_x_region_subtract(Ecore_X_Region dest,
+                        Ecore_X_Region source1,
+                        Ecore_X_Region source2)
 {
 #ifdef ECORE_XFIXES
    LOGFN(__FILE__, __LINE__, __FUNCTION__);
@@ -204,7 +218,9 @@ ecore_x_region_subtract(Ecore_X_Region dest, Ecore_X_Region source1, Ecore_X_Reg
 }
 
 EAPI void
-ecore_x_region_invert(Ecore_X_Region dest, Ecore_X_Rectangle *bounds, Ecore_X_Region source)
+ecore_x_region_invert(Ecore_X_Region dest,
+                      Ecore_X_Rectangle *bounds,
+                      Ecore_X_Region source)
 {
 #ifdef ECORE_XFIXES
    XRectangle *xbound;
@@ -237,11 +253,12 @@ ecore_x_region_extents(Ecore_X_Region dest, Ecore_X_Region source)
 }
 
 EAPI Ecore_X_Rectangle *
-ecore_x_region_fetch(Ecore_X_Region region, int *num, Ecore_X_Rectangle *bounds){
+ecore_x_region_fetch(Ecore_X_Region region, int *num,
+                     Ecore_X_Rectangle *bounds){
 #ifdef ECORE_XFIXES
    Ecore_X_Rectangle *rects;
    XRectangle *xrect, xbound;
-   
+
    LOGFN(__FILE__, __LINE__, __FUNCTION__);
    xrect = XFixesFetchRegionAndBounds(_ecore_x_disp, region, num, &xbound);
    rects = _ecore_x_rectangle_x_to_ecore(xrect, *num);
@@ -256,7 +273,12 @@ ecore_x_region_fetch(Ecore_X_Region region, int *num, Ecore_X_Rectangle *bounds)
 }
 
 EAPI void
-ecore_x_region_expand(Ecore_X_Region dest, Ecore_X_Region source, unsigned int left, unsigned int right, unsigned int top, unsigned int bottom)
+ecore_x_region_expand(Ecore_X_Region dest,
+                      Ecore_X_Region source,
+                      unsigned int left,
+                      unsigned int right,
+                      unsigned int top,
+                      unsigned int bottom)
 {
 #ifdef ECORE_XFIXES
    LOGFN(__FILE__, __LINE__, __FUNCTION__);
@@ -265,7 +287,10 @@ ecore_x_region_expand(Ecore_X_Region dest, Ecore_X_Region source, unsigned int l
 }
 
 EAPI void
-ecore_x_region_gc_clip_set(Ecore_X_Region region, Ecore_X_GC gc, int x_origin, int y_origin)
+ecore_x_region_gc_clip_set(Ecore_X_Region region,
+                           Ecore_X_GC gc,
+                           int x_origin,
+                           int y_origin)
 {
 #ifdef ECORE_XFIXES
    LOGFN(__FILE__, __LINE__, __FUNCTION__);
@@ -274,20 +299,36 @@ ecore_x_region_gc_clip_set(Ecore_X_Region region, Ecore_X_GC gc, int x_origin, i
 }
 
 EAPI void
-ecore_x_region_window_shape_set(Ecore_X_Region region, Ecore_X_Window win, Ecore_X_Shape_Type type, int x_offset, int y_offset)
+ecore_x_region_window_shape_set(Ecore_X_Region region,
+                                Ecore_X_Window win,
+                                Ecore_X_Shape_Type type,
+                                int x_offset,
+                                int y_offset)
 {
 #ifdef ECORE_XFIXES
    LOGFN(__FILE__, __LINE__, __FUNCTION__);
-   XFixesSetWindowShapeRegion(_ecore_x_disp, win, type, x_offset, y_offset, region);
+   XFixesSetWindowShapeRegion(_ecore_x_disp,
+                              win,
+                              type,
+                              x_offset,
+                              y_offset,
+                              region);
 #endif
 }
 
 EAPI void
-ecore_x_region_picture_clip_set(Ecore_X_Region region, Ecore_X_Picture picture, int x_origin, int y_origin)
+ecore_x_region_picture_clip_set(Ecore_X_Region region,
+                                Ecore_X_Picture picture,
+                                int x_origin,
+                                int y_origin)
 {
 #ifdef ECORE_XFIXES
    LOGFN(__FILE__, __LINE__, __FUNCTION__);
-   XFixesSetPictureClipRegion(_ecore_x_disp, picture, x_origin, y_origin, region);
+   XFixesSetPictureClipRegion(_ecore_x_disp,
+                              picture,
+                              x_origin,
+                              y_origin,
+                              region);
 #endif
 }
 
index 7f527e7..a8d2d68 100644 (file)
  * @return The new default graphics context.
  */
 EAPI Ecore_X_GC
-ecore_x_gc_new(Ecore_X_Drawable draw, Ecore_X_GC_Value_Mask value_mask, const unsigned int *value_list)
+ecore_x_gc_new(Ecore_X_Drawable draw,
+               Ecore_X_GC_Value_Mask value_mask,
+               const unsigned int *value_list)
 {
    XGCValues gcv;
-   int       mask;
-   int       index;
-   int       i;
+   int mask;
+   int index;
+   int i;
 
    LOGFN(__FILE__, __LINE__, __FUNCTION__);
-   if (!draw) draw = DefaultRootWindow(_ecore_x_disp);
+   if (!draw)
+      draw = DefaultRootWindow(_ecore_x_disp);
 
    memset(&gcv, 0, sizeof (gcv));
 
@@ -43,90 +46,112 @@ ecore_x_gc_new(Ecore_X_Drawable draw, Ecore_X_GC_Value_Mask value_mask, const un
               gcv.function = value_list[index];
               index++;
               break;
+
            case ECORE_X_GC_VALUE_MASK_PLANE_MASK:
               gcv.plane_mask = value_list[index];
               index++;
               break;
+
            case ECORE_X_GC_VALUE_MASK_FOREGROUND:
               gcv.foreground = value_list[index];
               index++;
               break;
+
            case ECORE_X_GC_VALUE_MASK_BACKGROUND:
               gcv.background = value_list[index];
               index++;
               break;
+
            case ECORE_X_GC_VALUE_MASK_LINE_WIDTH:
               gcv.line_width = value_list[index];
               index++;
               break;
+
            case ECORE_X_GC_VALUE_MASK_LINE_STYLE:
               gcv.line_style = value_list[index];
               index++;
               break;
+
            case ECORE_X_GC_VALUE_MASK_CAP_STYLE:
               gcv.cap_style = value_list[index];
               index++;
               break;
+
            case ECORE_X_GC_VALUE_MASK_JOIN_STYLE:
               gcv.join_style = value_list[index];
               index++;
               break;
+
            case ECORE_X_GC_VALUE_MASK_FILL_STYLE:
               gcv.fill_style = value_list[index];
               index++;
               break;
+
            case ECORE_X_GC_VALUE_MASK_FILL_RULE:
               gcv.fill_rule = value_list[index];
               index++;
               break;
+
            case ECORE_X_GC_VALUE_MASK_TILE:
               gcv.tile = value_list[index];
               index++;
               break;
+
            case ECORE_X_GC_VALUE_MASK_STIPPLE:
               gcv.stipple = value_list[index];
               index++;
               break;
+
            case ECORE_X_GC_VALUE_MASK_TILE_STIPPLE_ORIGIN_X:
               gcv.ts_x_origin = value_list[index];
               index++;
               break;
+
            case ECORE_X_GC_VALUE_MASK_TILE_STIPPLE_ORIGIN_Y:
               gcv.ts_y_origin = value_list[index];
               index++;
               break;
+
            case ECORE_X_GC_VALUE_MASK_FONT:
               gcv.font = value_list[index];
               index++;
               break;
+
            case ECORE_X_GC_VALUE_MASK_SUBWINDOW_MODE:
               gcv.subwindow_mode = value_list[index];
               index++;
               break;
+
            case ECORE_X_GC_VALUE_MASK_GRAPHICS_EXPOSURES:
               gcv.graphics_exposures = value_list[index];
               index++;
               break;
+
            case ECORE_X_GC_VALUE_MASK_CLIP_ORIGIN_X:
               gcv.clip_x_origin = value_list[index];
               index++;
               break;
+
            case ECORE_X_GC_VALUE_MASK_CLIP_ORIGIN_Y:
               gcv.clip_y_origin = value_list[index];
               index++;
               break;
+
            case ECORE_X_GC_VALUE_MASK_CLIP_MASK:
               gcv.clip_mask = value_list[index];
               index++;
               break;
+
            case ECORE_X_GC_VALUE_MASK_DASH_OFFSET:
               gcv.dash_offset = value_list[index];
               index++;
               break;
+
            case ECORE_X_GC_VALUE_MASK_DASH_LIST:
               gcv.dashes = value_list[index];
               index++;
               break;
+
            case ECORE_X_GC_VALUE_MASK_ARC_MODE:
               gcv.arc_mode = value_list[index];
               index++;
index 5afaab4..4946fdf 100644 (file)
@@ -31,7 +31,7 @@ ecore_x_icccm_init(void)
 EAPI void
 ecore_x_icccm_state_set(Ecore_X_Window win, Ecore_X_Window_State_Hint state)
 {
-   unsigned long       c[2];
+   unsigned long c[2];
 
    LOGFN(__FILE__, __LINE__, __FUNCTION__);
    if (state == ECORE_X_WINDOW_STATE_HINT_WITHDRAWN)
@@ -40,40 +40,41 @@ ecore_x_icccm_state_set(Ecore_X_Window win, Ecore_X_Window_State_Hint state)
       c[0] = NormalState;
    else if (state == ECORE_X_WINDOW_STATE_HINT_ICONIC)
       c[0] = IconicState;
+
    c[1] = None;
    XChangeProperty(_ecore_x_disp, win, ECORE_X_ATOM_WM_STATE,
-                  ECORE_X_ATOM_WM_STATE, 32, PropModeReplace,
-                  (unsigned char *)c, 2);
+                   ECORE_X_ATOM_WM_STATE, 32, PropModeReplace,
+                   (unsigned char *)c, 2);
 }
 
 EAPI Ecore_X_Window_State_Hint
 ecore_x_icccm_state_get(Ecore_X_Window win)
 {
    unsigned char *prop_ret = NULL;
-   Atom           type_ret;
-   unsigned long  bytes_after, num_ret;
-   int            format_ret;
+   Atom type_ret;
+   unsigned long bytes_after, num_ret;
+   int format_ret;
    Ecore_X_Window_State_Hint hint;
 
    LOGFN(__FILE__, __LINE__, __FUNCTION__);
    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,
-                     &prop_ret);
+                      0, 0x7fffffff, False, ECORE_X_ATOM_WM_STATE,
+                      &type_ret, &format_ret, &num_ret, &bytes_after,
+                      &prop_ret);
    if ((prop_ret) && (num_ret == 2))
      {
-       if (prop_ret[0] == WithdrawnState)
-         hint = ECORE_X_WINDOW_STATE_HINT_WITHDRAWN;
-       else if (prop_ret[0] == NormalState)
-         hint = ECORE_X_WINDOW_STATE_HINT_NORMAL;
-       else if (prop_ret[0] == IconicState)
-         hint = ECORE_X_WINDOW_STATE_HINT_ICONIC;
+        if (prop_ret[0] == WithdrawnState)
+           hint = ECORE_X_WINDOW_STATE_HINT_WITHDRAWN;
+        else if (prop_ret[0] == NormalState)
+           hint = ECORE_X_WINDOW_STATE_HINT_NORMAL;
+        else if (prop_ret[0] == IconicState)
+           hint = ECORE_X_WINDOW_STATE_HINT_ICONIC;
      }
 
    if (prop_ret)
-     XFree(prop_ret);
-   
+      XFree(prop_ret);
+
    return hint;
 }
 
@@ -82,9 +83,9 @@ ecore_x_icccm_delete_window_send(Ecore_X_Window win, Ecore_X_Time t)
 {
    LOGFN(__FILE__, __LINE__, __FUNCTION__);
    ecore_x_client_message32_send(win, ECORE_X_ATOM_WM_PROTOCOLS,
-                                ECORE_X_EVENT_MASK_NONE,
-                                ECORE_X_ATOM_WM_DELETE_WINDOW,
-                                t, 0, 0, 0);
+                                 ECORE_X_EVENT_MASK_NONE,
+                                 ECORE_X_ATOM_WM_DELETE_WINDOW,
+                                 t, 0, 0, 0);
 }
 
 EAPI void
@@ -92,9 +93,9 @@ ecore_x_icccm_take_focus_send(Ecore_X_Window win, Ecore_X_Time t)
 {
    LOGFN(__FILE__, __LINE__, __FUNCTION__);
    ecore_x_client_message32_send(win, ECORE_X_ATOM_WM_PROTOCOLS,
-                                ECORE_X_EVENT_MASK_NONE,
-                                ECORE_X_ATOM_WM_TAKE_FOCUS,
-                                t, 0, 0, 0);
+                                 ECORE_X_EVENT_MASK_NONE,
+                                 ECORE_X_ATOM_WM_TAKE_FOCUS,
+                                 t, 0, 0, 0);
 }
 
 EAPI void
@@ -102,9 +103,9 @@ ecore_x_icccm_save_yourself_send(Ecore_X_Window win, Ecore_X_Time t)
 {
    LOGFN(__FILE__, __LINE__, __FUNCTION__);
    ecore_x_client_message32_send(win, ECORE_X_ATOM_WM_PROTOCOLS,
-                                ECORE_X_EVENT_MASK_NONE,
-                                ECORE_X_ATOM_WM_SAVE_YOURSELF,
-                                t, 0, 0, 0);
+                                 ECORE_X_EVENT_MASK_NONE,
+                                 ECORE_X_ATOM_WM_SAVE_YOURSELF,
+                                 t, 0, 0, 0);
 }
 
 EAPI void
@@ -129,14 +130,14 @@ ecore_x_icccm_move_resize_send(Ecore_X_Window win, int x, int y, int w, int h)
 
 EAPI void
 ecore_x_icccm_hints_set(Ecore_X_Window win,
-                       int accepts_focus,
-                       Ecore_X_Window_State_Hint initial_state,
-                       Ecore_X_Pixmap icon_pixmap,
-                       Ecore_X_Pixmap icon_mask,
-                       Ecore_X_Window icon_window,
-                       Ecore_X_Window window_group, int is_urgent)
+                        int accepts_focus,
+                        Ecore_X_Window_State_Hint initial_state,
+                        Ecore_X_Pixmap icon_pixmap,
+                        Ecore_X_Pixmap icon_mask,
+                        Ecore_X_Window icon_window,
+                        Ecore_X_Window window_group, int is_urgent)
 {
-   XWMHints           *hints;
+   XWMHints *hints;
 
    hints = XAllocWMHints();
    if (!hints)
@@ -151,280 +152,310 @@ ecore_x_icccm_hints_set(Ecore_X_Window win,
       hints->initial_state = NormalState;
    else if (initial_state == ECORE_X_WINDOW_STATE_HINT_ICONIC)
       hints->initial_state = IconicState;
+
    if (icon_pixmap != 0)
      {
-       hints->icon_pixmap = icon_pixmap;
-       hints->flags |= IconPixmapHint;
+        hints->icon_pixmap = icon_pixmap;
+        hints->flags |= IconPixmapHint;
      }
+
    if (icon_mask != 0)
      {
-       hints->icon_mask = icon_mask;
-       hints->flags |= IconMaskHint;
+        hints->icon_mask = icon_mask;
+        hints->flags |= IconMaskHint;
      }
+
    if (icon_window != 0)
      {
-       hints->icon_window = icon_window;
-       hints->flags |= IconWindowHint;
+        hints->icon_window = icon_window;
+        hints->flags |= IconWindowHint;
      }
+
    if (window_group != 0)
      {
-       hints->window_group = window_group;
-       hints->flags |= WindowGroupHint;
+        hints->window_group = window_group;
+        hints->flags |= WindowGroupHint;
      }
+
    if (is_urgent)
       hints->flags |= XUrgencyHint;
+
    XSetWMHints(_ecore_x_disp, win, hints);
    XFree(hints);
 }
 
 EAPI int
 ecore_x_icccm_hints_get(Ecore_X_Window win,
-                       int *accepts_focus,
-                       Ecore_X_Window_State_Hint *initial_state,
-                       Ecore_X_Pixmap *icon_pixmap,
-                       Ecore_X_Pixmap *icon_mask,
-                       Ecore_X_Window *icon_window,
-                       Ecore_X_Window *window_group, int *is_urgent)
+                        int *accepts_focus,
+                        Ecore_X_Window_State_Hint *initial_state,
+                        Ecore_X_Pixmap *icon_pixmap,
+                        Ecore_X_Pixmap *icon_mask,
+                        Ecore_X_Window *icon_window,
+                        Ecore_X_Window *window_group, int *is_urgent)
 {
    XWMHints *hints;
 
    LOGFN(__FILE__, __LINE__, __FUNCTION__);
    if (accepts_focus)
       *accepts_focus = 1;
+
    if (initial_state)
       *initial_state = ECORE_X_WINDOW_STATE_HINT_NORMAL;
+
    if (icon_pixmap)
       *icon_pixmap = 0;
+
    if (icon_mask)
       *icon_mask = 0;
+
    if (icon_window)
       *icon_window = 0;
+
    if (window_group)
       *window_group = 0;
+
    if (is_urgent)
       *is_urgent = 0;
+
    hints = XGetWMHints(_ecore_x_disp, win);
    if (hints)
      {
-       if ((hints->flags & InputHint) && (accepts_focus))
-         {
-            if (hints->input)
-               *accepts_focus = 1;
-            else
-               *accepts_focus = 0;
-         }
-       if ((hints->flags & StateHint) && (initial_state))
-         {
-            if (hints->initial_state == WithdrawnState)
-               *initial_state = ECORE_X_WINDOW_STATE_HINT_WITHDRAWN;
-            else if (hints->initial_state == NormalState)
-               *initial_state = ECORE_X_WINDOW_STATE_HINT_NORMAL;
-            else if (hints->initial_state == IconicState)
-               *initial_state = ECORE_X_WINDOW_STATE_HINT_ICONIC;
-         }
-       if ((hints->flags & IconPixmapHint) && (icon_pixmap))
-         {
-            *icon_pixmap = hints->icon_pixmap;
-         }
-       if ((hints->flags & IconMaskHint) && (icon_mask))
-         {
-            *icon_mask = hints->icon_mask;
-         }
-       if ((hints->flags & IconWindowHint) && (icon_window))
-         {
-            *icon_window = hints->icon_window;
-         }
-       if ((hints->flags & WindowGroupHint) && (window_group))
-         {
-            *window_group = hints->window_group;
-         }
-       if ((hints->flags & XUrgencyHint) && (is_urgent))
-         {
-            *is_urgent = 1;
-         }
-       XFree(hints);
-       return 1;
+        if ((hints->flags & InputHint) && (accepts_focus))
+          {
+             if (hints->input)
+                *accepts_focus = 1;
+             else
+                *accepts_focus = 0;
+          }
+
+        if ((hints->flags & StateHint) && (initial_state))
+          {
+             if (hints->initial_state == WithdrawnState)
+                *initial_state = ECORE_X_WINDOW_STATE_HINT_WITHDRAWN;
+             else if (hints->initial_state == NormalState)
+                *initial_state = ECORE_X_WINDOW_STATE_HINT_NORMAL;
+             else if (hints->initial_state == IconicState)
+                *initial_state = ECORE_X_WINDOW_STATE_HINT_ICONIC;
+          }
+
+        if ((hints->flags & IconPixmapHint) && (icon_pixmap))
+           *icon_pixmap = hints->icon_pixmap;
+
+        if ((hints->flags & IconMaskHint) && (icon_mask))
+           *icon_mask = hints->icon_mask;
+
+        if ((hints->flags & IconWindowHint) && (icon_window))
+           *icon_window = hints->icon_window;
+
+        if ((hints->flags & WindowGroupHint) && (window_group))
+           *window_group = hints->window_group;
+
+        if ((hints->flags & XUrgencyHint) && (is_urgent))
+           *is_urgent = 1;
+
+        XFree(hints);
+        return 1;
      }
+
    return 0;
 }
 
 EAPI void
 ecore_x_icccm_size_pos_hints_set(Ecore_X_Window win,
-                                int request_pos,
-                                Ecore_X_Gravity gravity,
-                                int min_w, int min_h,
-                                int max_w, int max_h,
-                                int base_w, int base_h,
-                                int step_x, int step_y,
-                                double min_aspect, double max_aspect)
+                                 int request_pos,
+                                 Ecore_X_Gravity gravity,
+                                 int min_w, int min_h,
+                                 int max_w, int max_h,
+                                 int base_w, int base_h,
+                                 int step_x, int step_y,
+                                 double min_aspect, double max_aspect)
 {
-   XSizeHints  hint;
-   long        mask;
+   XSizeHints hint;
+   long mask;
 
    LOGFN(__FILE__, __LINE__, __FUNCTION__);
    if (!XGetWMNormalHints(_ecore_x_disp, win, &hint, &mask))
-     {
-       memset(&hint, 0, sizeof(XSizeHints));
-     }
+      memset(&hint, 0, sizeof(XSizeHints));
 
    hint.flags = 0;
    if (request_pos)
-     {
-       hint.flags |= USPosition;
-     }
+      hint.flags |= USPosition;
+
    if (gravity != ECORE_X_GRAVITY_NW)
      {
-       hint.flags |= PWinGravity;
-       hint.win_gravity = gravity;
+        hint.flags |= PWinGravity;
+        hint.win_gravity = gravity;
      }
+
    if ((min_w > 0) || (min_h > 0))
      {
-       hint.flags |= PMinSize;
-       hint.min_width = min_w;
-       hint.min_height = min_h;
+        hint.flags |= PMinSize;
+        hint.min_width = min_w;
+        hint.min_height = min_h;
      }
+
    if ((max_w > 0) || (max_h > 0))
      {
-       hint.flags |= PMaxSize;
-       hint.max_width = max_w;
-       hint.max_height = max_h;
+        hint.flags |= PMaxSize;
+        hint.max_width = max_w;
+        hint.max_height = max_h;
      }
+
    if ((base_w > 0) || (base_h > 0))
      {
-       hint.flags |= PBaseSize;
-       hint.base_width = base_w;
-       hint.base_height = base_h;
+        hint.flags |= PBaseSize;
+        hint.base_width = base_w;
+        hint.base_height = base_h;
      }
+
    if ((step_x > 1) || (step_y > 1))
      {
-       hint.flags |= PResizeInc;
-       hint.width_inc = step_x;
-       hint.height_inc = step_y;
+        hint.flags |= PResizeInc;
+        hint.width_inc = step_x;
+        hint.height_inc = step_y;
      }
+
    if ((min_aspect > 0.0) || (max_aspect > 0.0))
      {
-       hint.flags |= PAspect;
-       hint.min_aspect.x = min_aspect * 10000;
-       hint.min_aspect.y = 10000;
-       hint.max_aspect.x = max_aspect * 10000;
-       hint.max_aspect.y = 10000;
+        hint.flags |= PAspect;
+        hint.min_aspect.x = min_aspect * 10000;
+        hint.min_aspect.y = 10000;
+        hint.max_aspect.x = max_aspect * 10000;
+        hint.max_aspect.y = 10000;
      }
+
    XSetWMNormalHints(_ecore_x_disp, win, &hint);
 }
 
 EAPI int
 ecore_x_icccm_size_pos_hints_get(Ecore_X_Window win,
-                                int *request_pos,
-                                Ecore_X_Gravity *gravity,
-                                int *min_w, int *min_h,
-                                int *max_w, int *max_h,
-                                int *base_w, int *base_h,
-                                int *step_x, int *step_y,
-                                double *min_aspect, double *max_aspect)
+                                 int *request_pos,
+                                 Ecore_X_Gravity *gravity,
+                                 int *min_w, int *min_h,
+                                 int *max_w, int *max_h,
+                                 int *base_w, int *base_h,
+                                 int *step_x, int *step_y,
+                                 double *min_aspect, double *max_aspect)
 {
-   XSizeHints          hint;
-   long                mask;
+   XSizeHints hint;
+   long mask;
 
-   int                 minw = 0, minh = 0;
-   int                 maxw = 32767, maxh = 32767;
-   int                 basew = -1, baseh = -1;
-   int                 stepx = -1, stepy = -1;
-   double              mina = 0.0, maxa = 0.0;
+   int minw = 0, minh = 0;
+   int maxw = 32767, maxh = 32767;
+   int basew = -1, baseh = -1;
+   int stepx = -1, stepy = -1;
+   double mina = 0.0, maxa = 0.0;
 
    LOGFN(__FILE__, __LINE__, __FUNCTION__);
    if (!XGetWMNormalHints(_ecore_x_disp, win, &hint, &mask))
-     return 0;
+      return 0;
 
    if ((hint.flags & USPosition) || ((hint.flags & PPosition)))
      {
-       if (request_pos)
-          *request_pos = 1;
-     }
-   else
-     {
-       if (request_pos)
-          *request_pos = 0;
+        if (request_pos)
+           *request_pos = 1;
      }
+   else if (request_pos)
+      *request_pos = 0;
+
    if (hint.flags & PWinGravity)
      {
-       if (gravity)
-          *gravity = hint.win_gravity;
-     }
-   else
-     {
-       if (gravity)
-          *gravity = ECORE_X_GRAVITY_NW;
+        if (gravity)
+           *gravity = hint.win_gravity;
      }
+   else if (gravity)
+      *gravity = ECORE_X_GRAVITY_NW;
+
    if (hint.flags & PMinSize)
      {
-       minw = hint.min_width;
-       minh = hint.min_height;
+        minw = hint.min_width;
+        minh = hint.min_height;
      }
+
    if (hint.flags & PMaxSize)
      {
-       maxw = hint.max_width;
-       maxh = hint.max_height;
-       if (maxw < minw)
-          maxw = minw;
-       if (maxh < minh)
-          maxh = minh;
+        maxw = hint.max_width;
+        maxh = hint.max_height;
+        if (maxw < minw)
+           maxw = minw;
+
+        if (maxh < minh)
+           maxh = minh;
      }
+
    if (hint.flags & PBaseSize)
      {
-       basew = hint.base_width;
-       baseh = hint.base_height;
-       if (basew > minw)
-          minw = basew;
-       if (baseh > minh)
-          minh = baseh;
+        basew = hint.base_width;
+        baseh = hint.base_height;
+        if (basew > minw)
+           minw = basew;
+
+        if (baseh > minh)
+           minh = baseh;
      }
+
    if (hint.flags & PResizeInc)
      {
-       stepx = hint.width_inc;
-       stepy = hint.height_inc;
-       if (stepx < 1)
-          stepx = 1;
-       if (stepy < 1)
-          stepy = 1;
+        stepx = hint.width_inc;
+        stepy = hint.height_inc;
+        if (stepx < 1)
+           stepx = 1;
+
+        if (stepy < 1)
+           stepy = 1;
      }
+
    if (hint.flags & PAspect)
      {
-       if (hint.min_aspect.y > 0)
-          mina = ((double)hint.min_aspect.x) / ((double)hint.min_aspect.y);
-       if (hint.max_aspect.y > 0)
-          maxa = ((double)hint.max_aspect.x) / ((double)hint.max_aspect.y);
+        if (hint.min_aspect.y > 0)
+           mina = ((double)hint.min_aspect.x) / ((double)hint.min_aspect.y);
+
+        if (hint.max_aspect.y > 0)
+           maxa = ((double)hint.max_aspect.x) / ((double)hint.max_aspect.y);
      }
+
    if (min_w)
       *min_w = minw;
+
    if (min_h)
       *min_h = minh;
+
    if (max_w)
       *max_w = maxw;
+
    if (max_h)
       *max_h = maxh;
+
    if (base_w)
       *base_w = basew;
+
    if (base_h)
       *base_h = baseh;
+
    if (step_x)
       *step_x = stepx;
+
    if (step_y)
       *step_y = stepy;
+
    if (min_aspect)
       *min_aspect = mina;
+
    if (max_aspect)
       *max_aspect = maxa;
+
    return 1;
 }
 
 EAPI void
 ecore_x_icccm_title_set(Ecore_X_Window win, const char *t)
 {
-   char               *list[1];
-   XTextProperty       xprop;
-   int                 ret;
+   char *list[1];
+   XTextProperty xprop;
+   int ret;
 
-   if (!t) return;
+   if (!t)
+      return;
 
    LOGFN(__FILE__, __LINE__, __FUNCTION__);
    xprop.value = NULL;
@@ -432,78 +463,76 @@ ecore_x_icccm_title_set(Ecore_X_Window win, const char *t)
    list[0] = strdup(t);
    ret =
       Xutf8TextListToTextProperty(_ecore_x_disp, list, 1, XUTF8StringStyle,
-                                 &xprop);
+                                  &xprop);
 #else
    list[0] = strdup(t);
    ret =
       XmbTextListToTextProperty(_ecore_x_disp, list, 1, XStdICCTextStyle,
-                               &xprop);
+                                &xprop);
 #endif
    if (ret >= Success)
      {
-       XSetWMName(_ecore_x_disp, win, &xprop);
-       if (xprop.value) XFree(xprop.value);
+        XSetWMName(_ecore_x_disp, win, &xprop);
+        if (xprop.value)
+           XFree(xprop.value);
      }
-   else
+   else if (XStringListToTextProperty(list, 1, &xprop) >= Success)
      {
-       if (XStringListToTextProperty(list, 1, &xprop) >= Success)
-         {
-            XSetWMName(_ecore_x_disp, win, &xprop);
-            if (xprop.value) XFree(xprop.value);
-         }
+        XSetWMName(_ecore_x_disp, win, &xprop);
+        if (xprop.value)
+           XFree(xprop.value);
      }
+
    free(list[0]);
 }
 
 EAPI char *
 ecore_x_icccm_title_get(Ecore_X_Window win)
 {
-   XTextProperty       xprop;
+   XTextProperty xprop;
 
    LOGFN(__FILE__, __LINE__, __FUNCTION__);
    xprop.value = NULL;
    if (XGetWMName(_ecore_x_disp, win, &xprop) >= Success)
      {
-       if (xprop.value)
-         {
-            char **list = NULL;
-            char *t = NULL;
-            int num = 0;
-            int ret;
-
-            if (xprop.encoding == ECORE_X_ATOM_UTF8_STRING)
-              {
-                 t = strdup((char *)xprop.value);
-              }
-            else
-              {
-
-                 /* convert to utf8 */
+        if (xprop.value)
+          {
+             char **list = NULL;
+             char *t = NULL;
+             int num = 0;
+             int ret;
+
+             if (xprop.encoding == ECORE_X_ATOM_UTF8_STRING)
+                t = strdup((char *)xprop.value);
+             else
+               {
+
+                  /* convert to utf8 */
 #ifdef X_HAVE_UTF8_STRING
-                 ret = Xutf8TextPropertyToTextList(_ecore_x_disp, &xprop,
-                                                   &list, &num);
+                  ret = Xutf8TextPropertyToTextList(_ecore_x_disp, &xprop,
+                                                    &list, &num);
 #else
-                 ret = XmbTextPropertyToTextList(_ecore_x_disp, &xprop,
-                                                 &list, &num);
+                  ret = XmbTextPropertyToTextList(_ecore_x_disp, &xprop,
+                                                  &list, &num);
 #endif
 
-                 if ((ret == XLocaleNotSupported) ||
-                     (ret == XNoMemory) || (ret == XConverterNotFound))
-                   {
-                      t = strdup((char *)xprop.value);
-                   }
-                 else if ((ret >= Success) && (num > 0))
-                   {
-                      t = strdup(list[0]);
-                   }
-                 if (list)
-                   XFreeStringList(list);
-              }
-            
-            if (xprop.value) XFree(xprop.value);
-            return t;
-         }
+                  if ((ret == XLocaleNotSupported) ||
+                      (ret == XNoMemory) || (ret == XConverterNotFound))
+                     t = strdup((char *)xprop.value);
+                  else if ((ret >= Success) && (num > 0))
+                     t = strdup(list[0]);
+
+                  if (list)
+                     XFreeStringList(list);
+               }
+
+             if (xprop.value)
+                XFree(xprop.value);
+
+             return t;
+          }
      }
+
    return NULL;
 }
 
@@ -514,13 +543,15 @@ ecore_x_icccm_title_get(Ecore_X_Window win)
  * @param num the number of members of the array
  */
 EAPI void
-ecore_x_icccm_protocol_atoms_set(Ecore_X_Window win, Ecore_X_Atom *protos, int num)
+ecore_x_icccm_protocol_atoms_set(Ecore_X_Window win,
+                                 Ecore_X_Atom *protos,
+                                 int num)
 {
    LOGFN(__FILE__, __LINE__, __FUNCTION__);
    if (num > 0)
-     XSetWMProtocols(_ecore_x_disp, win, (Atom *)(protos), num);
+      XSetWMProtocols(_ecore_x_disp, win, (Atom *)(protos), num);
    else
-     XDeleteProperty(_ecore_x_disp, win, ECORE_X_ATOM_WM_PROTOCOLS);
+      XDeleteProperty(_ecore_x_disp, win, ECORE_X_ATOM_WM_PROTOCOLS);
 }
 
 /**
@@ -531,13 +562,13 @@ ecore_x_icccm_protocol_atoms_set(Ecore_X_Window win, Ecore_X_Atom *protos, int n
  */
 EAPI void
 ecore_x_icccm_protocol_set(Ecore_X_Window win,
-                          Ecore_X_WM_Protocol protocol, int on)
+                           Ecore_X_WM_Protocol protocol, int on)
 {
-   Atom               *protos = NULL;
-   Atom                proto;
-   int                 protos_count = 0;
-   int                 already_set = 0;
-   int                 i;
+   Atom *protos = NULL;
+   Atom proto;
+   int protos_count = 0;
+   int already_set = 0;
+   int i;
 
    /* Check for invalid values */
    if (protocol >= ECORE_X_WM_PROTOCOL_NUM)
@@ -548,61 +579,64 @@ ecore_x_icccm_protocol_set(Ecore_X_Window win,
 
    if (!XGetWMProtocols(_ecore_x_disp, win, &protos, &protos_count))
      {
-       protos = NULL;
-       protos_count = 0;
+        protos = NULL;
+        protos_count = 0;
      }
 
    for (i = 0; i < protos_count; i++)
      {
-       if (protos[i] == proto)
-         {
-            already_set = 1;
-            break;
-         }
+        if (protos[i] == proto)
+          {
+             already_set = 1;
+             break;
+          }
      }
 
    if (on)
      {
-       Atom *new_protos = NULL;
-
-       if (already_set)
-          goto leave;
-       new_protos = malloc((protos_count + 1) * sizeof(Atom));
-       if (!new_protos)
-          goto leave;
-       for (i = 0; i < protos_count; i++)
-          new_protos[i] = protos[i];
-       new_protos[protos_count] = proto;
-       XSetWMProtocols(_ecore_x_disp, win, new_protos, protos_count + 1);
-       free(new_protos);
+        Atom *new_protos = NULL;
+
+        if (already_set)
+           goto leave;
+
+        new_protos = malloc((protos_count + 1) * sizeof(Atom));
+        if (!new_protos)
+           goto leave;
+
+        for (i = 0; i < protos_count; i++)
+           new_protos[i] = protos[i];
+        new_protos[protos_count] = proto;
+        XSetWMProtocols(_ecore_x_disp, win, new_protos, protos_count + 1);
+        free(new_protos);
      }
    else
      {
-       if (!already_set)
-          goto leave;
-       for (i = 0; i < protos_count; i++)
-         {
-            if (protos[i] == proto)
-              {
-                 int                 j;
-
-                 for (j = i + 1; j < protos_count; j++)
-                    protos[j - 1] = protos[j];
-                 if (protos_count > 1)
-                    XSetWMProtocols(_ecore_x_disp, win, protos,
-                                    protos_count - 1);
-                 else
-                    XDeleteProperty(_ecore_x_disp, win,
-                                    ECORE_X_ATOM_WM_PROTOCOLS);
-                 goto leave;
-              }
-         }
+        if (!already_set)
+           goto leave;
+
+        for (i = 0; i < protos_count; i++)
+          {
+             if (protos[i] == proto)
+               {
+                  int j;
+
+                  for (j = i + 1; j < protos_count; j++)
+                     protos[j - 1] = protos[j];
+                  if (protos_count > 1)
+                     XSetWMProtocols(_ecore_x_disp, win, protos,
+                                     protos_count - 1);
+                  else
+                     XDeleteProperty(_ecore_x_disp, win,
+                                     ECORE_X_ATOM_WM_PROTOCOLS);
+
+                  goto leave;
+               }
+          }
      }
 
- leave:
+leave:
    if (protos)
-     XFree(protos);
-
+      XFree(protos);
 }
 
 /**
@@ -614,8 +648,8 @@ ecore_x_icccm_protocol_set(Ecore_X_Window win,
 EAPI int
 ecore_x_icccm_protocol_isset(Ecore_X_Window win, Ecore_X_WM_Protocol protocol)
 {
-   Atom                proto, *protos = NULL;
-   int                 i, ret = 0, protos_count = 0;
+   Atom proto, *protos = NULL;
+   int i, ret = 0, protos_count = 0;
 
    /* check for invalid values */
    if (protocol >= ECORE_X_WM_PROTOCOL_NUM)
@@ -629,12 +663,14 @@ ecore_x_icccm_protocol_isset(Ecore_X_Window win, Ecore_X_WM_Protocol protocol)
 
    for (i = 0; i < protos_count; i++)
       if (protos[i] == proto)
-       {
-          ret = 1;
-          break;
-       }
+        {
+           ret = 1;
+           break;
+        }
+
+   if (protos)
+      XFree(protos);
 
-   if (protos) XFree(protos);
    return ret;
 
 }
@@ -644,17 +680,18 @@ ecore_x_icccm_protocol_isset(Ecore_X_Window win, Ecore_X_WM_Protocol protocol)
  * @param win The window
  * @param n The name string
  * @param c The class string
- * 
+ *
  * Set a window name * class
  */
 EAPI void
 ecore_x_icccm_name_class_set(Ecore_X_Window win, const char *n, const char *c)
 {
-   XClassHint         *xch;
+   XClassHint *xch;
 
    xch = XAllocClassHint();
    if (!xch)
       return;
+
    LOGFN(__FILE__, __LINE__, __FUNCTION__);
    xch->res_name = (char *)n;
    xch->res_class = (char *)c;
@@ -667,31 +704,35 @@ ecore_x_icccm_name_class_set(Ecore_X_Window win, const char *n, const char *c)
  * @param win The window
  * @param n The name string
  * @param c The class string
- * 
+ *
  * Get a window name * class
  */
 EAPI void
 ecore_x_icccm_name_class_get(Ecore_X_Window win, char **n, char **c)
 {
-   XClassHint          xch;
-   
+   XClassHint xch;
+
    LOGFN(__FILE__, __LINE__, __FUNCTION__);
-   if (n) *n = NULL;
-   if (c) *c = NULL;
+   if (n)
+      *n = NULL;
+
+   if (c)
+      *c = NULL;
+
    xch.res_name = NULL;
    xch.res_class = NULL;
    if (XGetClassHint(_ecore_x_disp, win, &xch))
      {
-       if (n)
-         {
-            if (xch.res_name) *n = strdup(xch.res_name);
-         }
-       if (c)
-         {
-            if (xch.res_class) *c = strdup(xch.res_class);
-         }
-       XFree(xch.res_name);
-       XFree(xch.res_class);
+        if (n)
+           if (xch.res_name)
+              *n = strdup(xch.res_name);
+
+        if (c)
+           if (xch.res_class)
+              *c = strdup(xch.res_class);
+
+        XFree(xch.res_name);
+        XFree(xch.res_class);
      }
 }
 
@@ -699,13 +740,13 @@ ecore_x_icccm_name_class_get(Ecore_X_Window win, char **n, char **c)
  * Get a window client machine string.
  * @param win The window
  * @return The windows client machine string
- * 
+ *
  * Return the client machine of a window. String must be free'd when done with.
  */
-EAPI char               *
+EAPI char *
 ecore_x_icccm_client_machine_get(Ecore_X_Window win)
 {
-   char               *name;
+   char *name;
 
    LOGFN(__FILE__, __LINE__, __FUNCTION__);
    name = ecore_x_window_prop_string_get(win, ECORE_X_ATOM_WM_CLIENT_MACHINE);
@@ -714,7 +755,7 @@ ecore_x_icccm_client_machine_get(Ecore_X_Window win)
 
 /**
  * Sets the WM_COMMAND property for @a win.
- * 
+ *
  * @param win  The window.
  * @param argc Number of arguments.
  * @param argv Arguments.
@@ -741,78 +782,89 @@ ecore_x_icccm_command_get(Ecore_X_Window win, int *argc, char ***argv)
    int i, c;
    char **v;
 
-   if (argc) *argc = 0;
-   if (argv) *argv = NULL;
+   if (argc)
+      *argc = 0;
+
+   if (argv)
+      *argv = NULL;
 
    LOGFN(__FILE__, __LINE__, __FUNCTION__);
    if (!XGetCommand(_ecore_x_disp, win, &v, &c))
-     return;
+      return;
+
    if (c < 1)
      {
-       if (v)
-         XFreeStringList(v);
-               return;
+        if (v)
+             XFreeStringList(v);
+
+        return;
      }
 
-   if (argc) *argc = c;
+   if (argc)
+      *argc = c;
+
    if (argv)
      {
-       (*argv) = malloc(c * sizeof(char *));
-       if (!*argv)
-         { 
-            XFreeStringList(v);
-            if (argc) *argc = 0;
-            return;
-         }
-       for (i = 0; i < c; i++)
-         {
-            if (v[i])
-              (*argv)[i] = strdup(v[i]);
-            else
-              (*argv)[i] = strdup("");
-         }
+        (*argv) = malloc(c * sizeof(char *));
+        if (!*argv)
+          {
+             XFreeStringList(v);
+             if (argc)
+                *argc = 0;
+
+             return;
+          }
+
+        for (i = 0; i < c; i++)
+          {
+             if (v[i])
+                (*argv)[i] = strdup(v[i]);
+             else
+                (*argv)[i] = strdup("");
+          }
      }
-   XFreeStringList(v);
+
+             XFreeStringList(v);
 }
 
 /**
  * Set a window icon name.
  * @param win The window
  * @param t The icon name string
- * 
+ *
  * Set a window icon name
  */
 EAPI void
 ecore_x_icccm_icon_name_set(Ecore_X_Window win, const char *t)
 {
-   char               *list[1];
-   XTextProperty       xprop;
-   int                 ret;
+   char *list[1];
+   XTextProperty xprop;
+   int ret;
 
    LOGFN(__FILE__, __LINE__, __FUNCTION__);
    xprop.value = NULL;
 #ifdef X_HAVE_UTF8_STRING
    list[0] = strdup(t);
    ret = Xutf8TextListToTextProperty(_ecore_x_disp, list, 1,
-                                    XUTF8StringStyle, &xprop);
+                                     XUTF8StringStyle, &xprop);
 #else
    list[0] = strdup(t);
    ret = XmbTextListToTextProperty(_ecore_x_disp, list, 1,
-                                  XStdICCTextStyle, &xprop);
+                                   XStdICCTextStyle, &xprop);
 #endif
    if (ret >= Success)
      {
-       XSetWMIconName(_ecore_x_disp, win, &xprop);
-       if (xprop.value) XFree(xprop.value);
+        XSetWMIconName(_ecore_x_disp, win, &xprop);
+        if (xprop.value)
+           XFree(xprop.value);
      }
-   else
+   else if (XStringListToTextProperty(list, 1, &xprop) >= Success)
      {
-       if (XStringListToTextProperty(list, 1, &xprop) >= Success)
-         {
-            XSetWMIconName(_ecore_x_disp, win, &xprop);
-            if (xprop.value) XFree(xprop.value);
-         }
+        XSetWMIconName(_ecore_x_disp, win, &xprop);
+        if (xprop.value)
+           XFree(xprop.value);
      }
+
    free(list[0]);
 }
 
@@ -820,61 +872,59 @@ ecore_x_icccm_icon_name_set(Ecore_X_Window win, const char *t)
  * Get a window icon name.
  * @param win The window
  * @return The windows icon name string
- * 
+ *
  * Return the icon name of a window. String must be free'd when done with.
  */
-EAPI char               *
+EAPI char *
 ecore_x_icccm_icon_name_get(Ecore_X_Window win)
 {
-   XTextProperty       xprop;
+   XTextProperty xprop;
 
    LOGFN(__FILE__, __LINE__, __FUNCTION__);
    xprop.value = NULL;
    if (XGetWMIconName(_ecore_x_disp, win, &xprop) >= Success)
      {
-       if (xprop.value)
-         {
-            char              **list = NULL;
-            char               *t = NULL;
-            int                 num = 0;
-            int                 ret;
-
-            if (xprop.encoding == ECORE_X_ATOM_UTF8_STRING)
-              {
-                 t = strdup((char *)xprop.value);
-              }
-            else
-              {
-
-                 /* convert to utf8 */
+        if (xprop.value)
+          {
+             char **list = NULL;
+             char *t = NULL;
+             int num = 0;
+             int ret;
+
+             if (xprop.encoding == ECORE_X_ATOM_UTF8_STRING)
+                t = strdup((char *)xprop.value);
+             else
+               {
+
+                  /* convert to utf8 */
 #ifdef X_HAVE_UTF8_STRING
-                 ret = Xutf8TextPropertyToTextList(_ecore_x_disp, &xprop,
-                                                   &list, &num);
+                  ret = Xutf8TextPropertyToTextList(_ecore_x_disp, &xprop,
+                                                    &list, &num);
 #else
-                 ret = XmbTextPropertyToTextList(_ecore_x_disp, &xprop,
-                                                 &list, &num);
+                  ret = XmbTextPropertyToTextList(_ecore_x_disp, &xprop,
+                                                  &list, &num);
 #endif
 
-                 if ((ret == XLocaleNotSupported) ||
-                     (ret == XNoMemory) || (ret == XConverterNotFound))
-                   {
-                      t = strdup((char *)xprop.value);
-                   }
-                 else if (ret >= Success)
-                   {
-                      if ((num >= 1) && (list))
-                        {
-                           t = strdup(list[0]);
-                        }
-                      if (list)
-                        XFreeStringList(list);
-                   }
-              }
-            
-            if (xprop.value) XFree(xprop.value);
-            return t;
-         }
+                  if ((ret == XLocaleNotSupported) ||
+                      (ret == XNoMemory) || (ret == XConverterNotFound))
+                     t = strdup((char *)xprop.value);
+                  else if (ret >= Success)
+                    {
+                       if ((num >= 1) && (list))
+                          t = strdup(list[0]);
+
+                       if (list)
+                          XFreeStringList(list);
+                    }
+               }
+
+             if (xprop.value)
+                XFree(xprop.value);
+
+             return t;
+          }
      }
+
    return NULL;
 }
 
@@ -886,51 +936,57 @@ ecore_x_icccm_icon_name_get(Ecore_X_Window win)
 EAPI void
 ecore_x_icccm_colormap_window_set(Ecore_X_Window win, Ecore_X_Window subwin)
 {
-   int                 num = 0, i;
-   unsigned char      *old_data = NULL;
-   unsigned char      *data = NULL;
-   Window             *oldset = NULL;
-   Window             *newset = NULL;
+   int num = 0, i;
+   unsigned char *old_data = NULL;
+   unsigned char *data = NULL;
+   Window *oldset = NULL;
+   Window *newset = NULL;
 
    LOGFN(__FILE__, __LINE__, __FUNCTION__);
    if (!ecore_x_window_prop_property_get(win,
-                                        ECORE_X_ATOM_WM_COLORMAP_WINDOWS,
-                                        XA_WINDOW, 32, &old_data, &num))
+                                         ECORE_X_ATOM_WM_COLORMAP_WINDOWS,
+                                         XA_WINDOW, 32, &old_data, &num))
      {
-       newset = calloc(1, sizeof(Window));
-       if (!newset)
-          return;
-       newset[0] = subwin;
-       num = 1;
-       data = (unsigned char *)newset;
+        newset = calloc(1, sizeof(Window));
+        if (!newset)
+           return;
+
+        newset[0] = subwin;
+        num = 1;
+        data = (unsigned char *)newset;
      }
    else
      {
-       newset = calloc(num + 1, sizeof(Window));
-       oldset = (Window *) old_data;
-       if (!newset)
-          return;
-       for (i = 0; i < num; ++i)
-         {
-            if (oldset[i] == subwin)
-              {
-                 if (old_data) XFree(old_data);
-                 old_data = NULL;
-                 free(newset);
-                 return;
-              }
-
-            newset[i] = oldset[i];
-         }
-
-       newset[num++] = subwin;
-       if (old_data) XFree(old_data);
-       data = (unsigned char *)newset;
+        newset = calloc(num + 1, sizeof(Window));
+        oldset = (Window *)old_data;
+        if (!newset)
+           return;
+
+        for (i = 0; i < num; ++i)
+          {
+             if (oldset[i] == subwin)
+               {
+                  if (old_data)
+                     XFree(old_data);
+
+                  old_data = NULL;
+                  free(newset);
+                  return;
+               }
+
+             newset[i] = oldset[i];
+          }
+
+        newset[num++] = subwin;
+        if (old_data)
+           XFree(old_data);
+
+        data = (unsigned char *)newset;
      }
 
    ecore_x_window_prop_property_set(win,
-                                   ECORE_X_ATOM_WM_COLORMAP_WINDOWS,
-                                   XA_WINDOW, 32, data, num);
+                                    ECORE_X_ATOM_WM_COLORMAP_WINDOWS,
+                                    XA_WINDOW, 32, data, num);
    free(newset);
 }
 
@@ -942,50 +998,60 @@ ecore_x_icccm_colormap_window_set(Ecore_X_Window win, Ecore_X_Window subwin)
 EAPI void
 ecore_x_icccm_colormap_window_unset(Ecore_X_Window win, Ecore_X_Window subwin)
 {
-   int                 num = 0, i, j, k = 0;
-   unsigned char      *old_data = NULL;
-   unsigned char      *data = NULL;
-   Window             *oldset = NULL;
-   Window             *newset = NULL;
+   int num = 0, i, j, k = 0;
+   unsigned char *old_data = NULL;
+   unsigned char *data = NULL;
+   Window *oldset = NULL;
+   Window *newset = NULL;
 
    LOGFN(__FILE__, __LINE__, __FUNCTION__);
    if (!ecore_x_window_prop_property_get(win,
-                                        ECORE_X_ATOM_WM_COLORMAP_WINDOWS,
-                                        XA_WINDOW, 32, &old_data, &num))
+                                         ECORE_X_ATOM_WM_COLORMAP_WINDOWS,
+                                         XA_WINDOW, 32, &old_data, &num))
       return;
 
-   oldset = (Window *) old_data;
+   oldset = (Window *)old_data;
    for (i = 0; i < num; i++)
      {
-       if (oldset[i] == subwin)
-         {
-            if (num == 1)
-              {
-                 XDeleteProperty(_ecore_x_disp,
-                                 win, ECORE_X_ATOM_WM_COLORMAP_WINDOWS);
-                 if (old_data) XFree(old_data);
-                 old_data = NULL;
-                 return;
-              }
-            else
-              {
-                 newset = calloc(num - 1, sizeof(Window));
-                 data = (unsigned char *)newset;
-                 for (j = 0; j < num; ++j)
-                    if (oldset[j] != subwin)
-                       newset[k++] = oldset[j];
-                 ecore_x_window_prop_property_set(win,
-                                                  ECORE_X_ATOM_WM_COLORMAP_WINDOWS,
-                                                  XA_WINDOW, 32, data, k);
-                 if (old_data) XFree(old_data);
-                 old_data = NULL;
-                 free(newset);
-                 return;
-              }
-         }
+        if (oldset[i] == subwin)
+          {
+             if (num == 1)
+               {
+                  XDeleteProperty(_ecore_x_disp,
+                                  win, ECORE_X_ATOM_WM_COLORMAP_WINDOWS);
+                  if (old_data)
+                     XFree(old_data);
+
+                  old_data = NULL;
+                  return;
+               }
+             else
+               {
+                  newset = calloc(num - 1, sizeof(Window));
+                  data = (unsigned char *)newset;
+                  for (j = 0; j < num; ++j)
+                     if (oldset[j] != subwin)
+                        newset[k++] = oldset[j];
+
+                  ecore_x_window_prop_property_set(
+                     win,
+                     ECORE_X_ATOM_WM_COLORMAP_WINDOWS,
+                     XA_WINDOW,
+                     32,
+                     data,
+                     k);
+                  if (old_data)
+                     XFree(old_data);
+
+                  old_data = NULL;
+                  free(newset);
+                  return;
+               }
+          }
      }
 
-   if (old_data) XFree(old_data);
+   if (old_data)
+      XFree(old_data);
 }
 
 /**
@@ -1019,14 +1085,13 @@ ecore_x_icccm_transient_for_unset(Ecore_X_Window win)
 EAPI Ecore_X_Window
 ecore_x_icccm_transient_for_get(Ecore_X_Window win)
 {
-   Window              forwin;
+   Window forwin;
 
    LOGFN(__FILE__, __LINE__, __FUNCTION__);
    if (XGetTransientForHint(_ecore_x_disp, win, &forwin))
-     return (Ecore_X_Window) forwin;
+      return (Ecore_X_Window)forwin;
    else
-     return 0;
-
+      return 0;
 }
 
 /**
@@ -1039,7 +1104,7 @@ ecore_x_icccm_window_role_set(Ecore_X_Window win, const char *role)
 {
    LOGFN(__FILE__, __LINE__, __FUNCTION__);
    ecore_x_window_prop_string_set(win, ECORE_X_ATOM_WM_WINDOW_ROLE,
-                                 (char *)role);
+                                  (char *)role);
 }
 
 /**
@@ -1047,7 +1112,7 @@ ecore_x_icccm_window_role_set(Ecore_X_Window win, const char *role)
  * @param win The window
  * @return The window's role string.
  */
-EAPI char               *
+EAPI char *
 ecore_x_icccm_window_role_get(Ecore_X_Window win)
 {
    LOGFN(__FILE__, __LINE__, __FUNCTION__);
@@ -1067,7 +1132,7 @@ ecore_x_icccm_client_leader_set(Ecore_X_Window win, Ecore_X_Window l)
 {
    LOGFN(__FILE__, __LINE__, __FUNCTION__);
    ecore_x_window_prop_window_set(win, ECORE_X_ATOM_WM_CLIENT_LEADER,
-                                 &l, 1);
+                                  &l, 1);
 }
 
 /**
@@ -1077,12 +1142,13 @@ ecore_x_icccm_client_leader_set(Ecore_X_Window win, Ecore_X_Window l)
 EAPI Ecore_X_Window
 ecore_x_icccm_client_leader_get(Ecore_X_Window win)
 {
-   Ecore_X_Window      l;
+   Ecore_X_Window l;
 
    LOGFN(__FILE__, __LINE__, __FUNCTION__);
    if (ecore_x_window_prop_window_get(win, ECORE_X_ATOM_WM_CLIENT_LEADER,
-                                     &l, 1) > 0)
-     return l;
+                                      &l, 1) > 0)
+      return l;
+
    return 0;
 }
 
@@ -1091,9 +1157,12 @@ ecore_x_icccm_iconic_request_send(Ecore_X_Window win, Ecore_X_Window root)
 {
    XEvent xev;
 
-   if (!win) return;
+   if (!win)
+      return;
+
    LOGFN(__FILE__, __LINE__, __FUNCTION__);
-   if (!root) root = DefaultRootWindow(_ecore_x_disp);
+   if (!root)
+      root = DefaultRootWindow(_ecore_x_disp);
 
    xev.xclient.type = ClientMessage;
    xev.xclient.serial = 0;
index aaa4ba0..9e473a7 100644 (file)
@@ -19,7 +19,7 @@ static int _ecore_x_image_shm_can = -1;
 static int _ecore_x_image_err = 0;
 
 static void
-_ecore_x_image_error_handler(Display * d __UNUSED__, XErrorEvent * ev __UNUSED__)
+_ecore_x_image_error_handler(Display *d __UNUSED__, XErrorEvent *ev __UNUSED__)
 {
    _ecore_x_image_err = 1;
 }
@@ -30,18 +30,19 @@ _ecore_x_image_shm_check(void)
    XErrorHandler ph;
    XShmSegmentInfo shminfo;
    XImage *xim;
-   
-   if (_ecore_x_image_shm_can != -1) return;
-   
+
+   if (_ecore_x_image_shm_can != -1)
+      return;
+
    XSync(_ecore_x_disp, False);
    _ecore_x_image_err = 0;
-   
-   xim = XShmCreateImage(_ecore_x_disp, 
-                         DefaultVisual(_ecore_x_disp, 
-                                       DefaultScreen(_ecore_x_disp)), 
-                         DefaultDepth(_ecore_x_disp, 
+
+   xim = XShmCreateImage(_ecore_x_disp,
+                         DefaultVisual(_ecore_x_disp,
+                                       DefaultScreen(_ecore_x_disp)),
+                         DefaultDepth(_ecore_x_disp,
                                       DefaultScreen(_ecore_x_disp)),
-                         ZPixmap, NULL, 
+                         ZPixmap, NULL,
                          &shminfo, 1, 1);
    if (!xim)
      {
@@ -57,21 +58,21 @@ _ecore_x_image_shm_check(void)
         _ecore_x_image_shm_can = 0;
         return;
      }
-   
+
    shminfo.readOnly = False;
-   shminfo.shmaddr  = shmat(shminfo.shmid, 0, 0);
+   shminfo.shmaddr = shmat(shminfo.shmid, 0, 0);
    xim->data = shminfo.shmaddr;
-   
+
    if (xim->data == (char *)-1)
      {
         XDestroyImage(xim);
         _ecore_x_image_shm_can = 0;
         return;
      }
-   
+
    ph = XSetErrorHandler((XErrorHandler)_ecore_x_image_error_handler);
    XShmAttach(_ecore_x_disp, &shminfo);
-   XShmGetImage(_ecore_x_disp, DefaultRootWindow(_ecore_x_disp), 
+   XShmGetImage(_ecore_x_disp, DefaultRootWindow(_ecore_x_disp),
                 xim, 0, 0, 0xffffffff);
    XSync(_ecore_x_disp, False);
    XSetErrorHandler((XErrorHandler)ph);
@@ -79,17 +80,17 @@ _ecore_x_image_shm_check(void)
      {
         XShmDetach(_ecore_x_disp, &shminfo);
         XDestroyImage(xim);
-        shmdt(shminfo.shmaddr); 
+        shmdt(shminfo.shmaddr);
         shmctl(shminfo.shmid, IPC_RMID, 0);
         _ecore_x_image_shm_can = 0;
         return;
      }
-   
+
    XShmDetach(_ecore_x_disp, &shminfo);
    XDestroyImage(xim);
    shmdt(shminfo.shmaddr);
    shmctl(shminfo.shmid, IPC_RMID, 0);
-   
+
    _ecore_x_image_shm_can = 1;
 }
 
@@ -109,9 +110,11 @@ EAPI Ecore_X_Image *
 ecore_x_image_new(int w, int h, Ecore_X_Visual vis, int depth)
 {
    Ecore_X_Image *im;
-   
+
    im = calloc(1, sizeof(Ecore_X_Image));
-   if (!im) return NULL;
+   if (!im)
+      return NULL;
+
    LOGFN(__FILE__, __LINE__, __FUNCTION__);
    im->w = w;
    im->h = h;
@@ -136,15 +139,13 @@ ecore_x_image_free(Ecore_X_Image *im)
              shmctl(im->shminfo.shmid, IPC_RMID, 0);
           }
      }
-   else
+   else if (im->xim)
      {
-        if (im->xim)
-         {
-            free(im->xim->data);
-            im->xim->data = NULL;
-            XDestroyImage(im->xim);
-         }
+        free(im->xim->data);
+        im->xim->data = NULL;
+        XDestroyImage(im->xim);
      }
+
    free(im);
 }
 
@@ -152,11 +153,12 @@ static void
 _ecore_x_image_shm_create(Ecore_X_Image *im)
 {
    im->xim = XShmCreateImage(_ecore_x_disp, im->vis, im->depth,
-                             ZPixmap, NULL, &(im->shminfo), 
+                             ZPixmap, NULL, &(im->shminfo),
                              im->w, im->h);
-   if (!im->xim) return;
+   if (!im->xim)
+      return;
 
-   im->shminfo.shmid = shmget(IPC_PRIVATE, 
+   im->shminfo.shmid = shmget(IPC_PRIVATE,
                               im->xim->bytes_per_line * im->xim->height,
                               IPC_CREAT | 0666);
    if (im->shminfo.shmid == -1)
@@ -164,8 +166,9 @@ _ecore_x_image_shm_create(Ecore_X_Image *im)
         XDestroyImage(im->xim);
         return;
      }
+
    im->shminfo.readOnly = False;
-   im->shminfo.shmaddr  = shmat(im->shminfo.shmid, 0, 0);
+   im->shminfo.shmaddr = shmat(im->shminfo.shmid, 0, 0);
    im->xim->data = im->shminfo.shmaddr;
    if ((im->xim->data == (char *)-1) ||
        (im->xim->data == NULL))
@@ -174,41 +177,50 @@ _ecore_x_image_shm_create(Ecore_X_Image *im)
         shmctl(im->shminfo.shmid, IPC_RMID, 0);
         XDestroyImage(im->xim);
         return;
-     } 
+     }
+
    XShmAttach(_ecore_x_disp, &im->shminfo);
-   
+
    im->data = (unsigned char *)im->xim->data;
 
    im->bpl = im->xim->bytes_per_line;
    im->rows = im->xim->height;
-   if (im->xim->bits_per_pixel <= 8) im->bpp = 1;
-   else if (im->xim->bits_per_pixel <= 16) im->bpp = 2;
-   else im->bpp = 4;
+   if (im->xim->bits_per_pixel <= 8)
+      im->bpp = 1;
+   else if (im->xim->bits_per_pixel <= 16)
+      im->bpp = 2;
+   else
+      im->bpp = 4;
 }
 
 EAPI Eina_Bool
-ecore_x_image_get(Ecore_X_Image *im, Ecore_X_Drawable draw, 
+ecore_x_image_get(Ecore_X_Image *im, Ecore_X_Drawable draw,
                   int x, int y, int sx, int sy, int w, int h)
 {
    int ret = 1;
    XErrorHandler ph;
-   
+
    LOGFN(__FILE__, __LINE__, __FUNCTION__);
    if (im->shm)
      {
-        if (!im->xim) _ecore_x_image_shm_create(im);
-        if (!im->xim) return 0;
+        if (!im->xim)
+           _ecore_x_image_shm_create(im);
+
+        if (!im->xim)
+           return 0;
+
         _ecore_x_image_err = 0;
         // optimised path
         ph = XSetErrorHandler((XErrorHandler)_ecore_x_image_error_handler);
         if ((sx == 0) && (w == im->w))
           {
              im->xim->data = (char *)
-               im->data + (im->xim->bytes_per_line * sy) + (sx * im->bpp);
+                im->data + (im->xim->bytes_per_line * sy) + (sx * im->bpp);
              im->xim->width = w;
              im->xim->height = h;
              if (!XShmGetImage(_ecore_x_disp, draw, im->xim, x, y, 0xffffffff))
-               ret = 0;
+                ret = 0;
+
              ecore_x_sync();
           }
         // unavoidable thanks to mit-shm get api - tmp shm buf + copy into it
@@ -218,14 +230,17 @@ ecore_x_image_get(Ecore_X_Image *im, Ecore_X_Drawable draw,
              unsigned char *spixels, *sp, *pixels, *p;
              int bpp, bpl, rows, sbpp, sbpl, srows;
              int r;
-             
+
              tim = ecore_x_image_new(w, h, im->vis, im->depth);
              if (tim)
                {
                   ret = ecore_x_image_get(tim, draw, x, y, 0, 0, w, h);
                   if (ret)
                     {
-                       spixels = ecore_x_image_data_get(tim, &sbpl, &srows, &sbpp);
+                       spixels = ecore_x_image_data_get(tim,
+                                                        &sbpl,
+                                                        &srows,
+                                                        &sbpp);
                        pixels = ecore_x_image_data_get(im, &bpl, &rows, &bpp);
                        if ((pixels) && (spixels))
                          {
@@ -239,22 +254,33 @@ ecore_x_image_get(Ecore_X_Image *im, Ecore_X_Drawable draw,
                               }
                          }
                     }
+
                   ecore_x_image_free(tim);
                }
           }
+
         XSetErrorHandler((XErrorHandler)ph);
-        if (_ecore_x_image_err) ret = 0;
+        if (_ecore_x_image_err)
+           ret = 0;
      }
    else
      {
         printf("currently unimplemented ecore_x_image_get without shm\n");
         ret = 0;
      }
+
    return ret;
 }
 
 EAPI void
-ecore_x_image_put(Ecore_X_Image *im __UNUSED__, Ecore_X_Drawable draw __UNUSED__, int x __UNUSED__, int y __UNUSED__, int sx __UNUSED__, int sy __UNUSED__, int w __UNUSED__, int h __UNUSED__)
+ecore_x_image_put(Ecore_X_Image *im __UNUSED__,
+                  Ecore_X_Drawable draw __UNUSED__,
+                  int x __UNUSED__,
+                  int y __UNUSED__,
+                  int sx __UNUSED__,
+                  int sy __UNUSED__,
+                  int w __UNUSED__,
+                  int h __UNUSED__)
 {
    LOGFN(__FILE__, __LINE__, __FUNCTION__);
    printf("ecore_x_image_put: unimplemented!\n");
@@ -264,11 +290,20 @@ EAPI void *
 ecore_x_image_data_get(Ecore_X_Image *im, int *bpl, int *rows, int *bpp)
 {
    LOGFN(__FILE__, __LINE__, __FUNCTION__);
-   if (!im->xim) _ecore_x_image_shm_create(im);
-   if (!im->xim) return NULL;
-   
-   if (bpl) *bpl = im->bpl;
-   if (rows) *rows = im->rows;
-   if (bpp) *bpp = im->bpp;
+   if (!im->xim)
+      _ecore_x_image_shm_create(im);
+
+   if (!im->xim)
+      return NULL;
+
+   if (bpl)
+      *bpl = im->bpl;
+
+   if (rows)
+      *rows = im->rows;
+
+   if (bpp)
+      *bpp = im->bpp;
+
    return im->data;
 }
index d580da9..d06028e 100644 (file)
 
 typedef struct _mwmhints
 {
-   CARD32              flags;
-   CARD32              functions;
-   CARD32              decorations;
-   INT32               inputmode;
-   CARD32              status;
+   CARD32 flags;
+   CARD32 functions;
+   CARD32 decorations;
+   INT32 inputmode;
+   CARD32 status;
 }
 MWMHints;
 
 EAPI int
 ecore_x_mwm_hints_get(Ecore_X_Window win,
-                     Ecore_X_MWM_Hint_Func * fhint,
-                     Ecore_X_MWM_Hint_Decor * dhint,
-                     Ecore_X_MWM_Hint_Input * ihint)
+                      Ecore_X_MWM_Hint_Func *fhint,
+                      Ecore_X_MWM_Hint_Decor *dhint,
+                      Ecore_X_MWM_Hint_Input *ihint)
 {
-   unsigned char      *p = NULL;
-   MWMHints           *mwmhints = NULL;
-   int                 num;
-   int                 ret;
+   unsigned char *p = NULL;
+   MWMHints *mwmhints = NULL;
+   int num;
+   int ret;
 
    LOGFN(__FILE__, __LINE__, __FUNCTION__);
    ret = 0;
    if (!ecore_x_window_prop_property_get(win,
-                                        ECORE_X_ATOM_MOTIF_WM_HINTS,
-                                        ECORE_X_ATOM_MOTIF_WM_HINTS,
-                                        32, &p, &num))
+                                         ECORE_X_ATOM_MOTIF_WM_HINTS,
+                                         ECORE_X_ATOM_MOTIF_WM_HINTS,
+                                         32, &p, &num))
       return 0;
-   mwmhints = (MWMHints *) p;
+
+   mwmhints = (MWMHints *)p;
    if (mwmhints)
      {
-       if (num >= 4)
-         {
-            if (dhint)
-              {
-                 if (mwmhints->flags & ECORE_X_MWM_HINTS_DECORATIONS)
-                    *dhint = mwmhints->decorations;
-                 else
-                    *dhint = ECORE_X_MWM_HINT_DECOR_ALL;
-              }
-            if (fhint)
-              {
-                 if (mwmhints->flags & ECORE_X_MWM_HINTS_FUNCTIONS)
-                    *fhint = mwmhints->functions;
-                 else
-                    *fhint = ECORE_X_MWM_HINT_FUNC_ALL;
-              }
-            if (ihint)
-              {
-                 if (mwmhints->flags & ECORE_X_MWM_HINTS_INPUT_MODE)
-                    *ihint = mwmhints->inputmode;
-                 else
-                    *ihint = ECORE_X_MWM_HINT_INPUT_MODELESS;
-              }
-            ret = 1;
-         }
-       free(mwmhints);
+        if (num >= 4)
+          {
+             if (dhint)
+               {
+                  if (mwmhints->flags & ECORE_X_MWM_HINTS_DECORATIONS)
+                     *dhint = mwmhints->decorations;
+                  else
+                     *dhint = ECORE_X_MWM_HINT_DECOR_ALL;
+               }
+
+             if (fhint)
+               {
+                  if (mwmhints->flags & ECORE_X_MWM_HINTS_FUNCTIONS)
+                     *fhint = mwmhints->functions;
+                  else
+                     *fhint = ECORE_X_MWM_HINT_FUNC_ALL;
+               }
+
+             if (ihint)
+               {
+                  if (mwmhints->flags & ECORE_X_MWM_HINTS_INPUT_MODE)
+                     *ihint = mwmhints->inputmode;
+                  else
+                     *ihint = ECORE_X_MWM_HINT_INPUT_MODELESS;
+               }
+
+             ret = 1;
+          }
+
+        free(mwmhints);
      }
+
    return ret;
 }
 
@@ -93,11 +99,11 @@ ecore_x_mwm_borderless_set(Ecore_X_Window win, int borderless)
 
    data[0] = 2; /* just set the decorations hint! */
    data[2] = !borderless;
-   
+
    LOGFN(__FILE__, __LINE__, __FUNCTION__);
-   ecore_x_window_prop_property_set(win, 
-                                   ECORE_X_ATOM_MOTIF_WM_HINTS,
-                                   ECORE_X_ATOM_MOTIF_WM_HINTS,
-                                   32, (void *)data, 5);
+   ecore_x_window_prop_property_set(win,
+                                    ECORE_X_ATOM_MOTIF_WM_HINTS,
+                                    ECORE_X_ATOM_MOTIF_WM_HINTS,
+                                    32, (void *)data, 5);
 }
 
index 363c886..0221b90 100644 (file)
@@ -23,40 +23,50 @@ struct _Ecore_X_Startup_Info
 {
    Ecore_X_Window win;
 
-   int   init;
+   int init;
 
-   int   buffer_size;
+   int buffer_size;
    char *buffer;
 
-   int   length;
+   int length;
 
    /* These are the sequence info fields */
    char *id;
    char *name;
-   int   screen;
+   int screen;
    char *bin;
    char *icon;
-   int   desktop;
-   int   timestamp;
+   int desktop;
+   int timestamp;
    char *description;
    char *wmclass;
-   int   silent;
+   int silent;
 };
 
-static void  _ecore_x_window_prop_string_utf8_set(Ecore_X_Window win, Ecore_X_Atom atom, const char *str);
-static char *_ecore_x_window_prop_string_utf8_get(Ecore_X_Window win, Ecore_X_Atom atom);
+static void  _ecore_x_window_prop_string_utf8_set(Ecore_X_Window win,
+                                                  Ecore_X_Atom atom,
+                                                  const char *str);
+static char *_ecore_x_window_prop_string_utf8_get(Ecore_X_Window win,
+                                                  Ecore_X_Atom atom);
 #if 0 /* Unused */
-static int _ecore_x_netwm_startup_info_process(Ecore_X_Startup_Info *info);
-static int _ecore_x_netwm_startup_info_parse(Ecore_X_Startup_Info *info, char *data);
+static int   _ecore_x_netwm_startup_info_process(Ecore_X_Startup_Info *info);
+static int   _ecore_x_netwm_startup_info_parse(Ecore_X_Startup_Info *info,
+                                               char *data);
 #endif
-static void _ecore_x_netwm_startup_info_free(void *data);
+static void  _ecore_x_netwm_startup_info_free(void *data);
 
 /*
  * Convenience macros
  */
 #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)
+   XChangeProperty(_ecore_x_disp, \
+                   win, \
+                   atom, \
+                   ECORE_X_ATOM_UTF8_STRING, \
+                   8, \
+                   PropModeReplace, \
+                   (unsigned char *)string, \
+                   cnt)
 
 /*
  * Local variables
@@ -67,16 +77,18 @@ static Eina_Hash *startup_info = NULL;
 EAPI void
 ecore_x_netwm_init(void)
 {
-   LOGFN(__FILE__, __LINE__, __FUNCTION__);
-   startup_info = eina_hash_string_superfast_new(_ecore_x_netwm_startup_info_free);
+      LOGFN(__FILE__, __LINE__, __FUNCTION__);
+   startup_info = eina_hash_string_superfast_new(
+         _ecore_x_netwm_startup_info_free);
 }
 
 EAPI void
 ecore_x_netwm_shutdown(void)
 {
-   LOGFN(__FILE__, __LINE__, __FUNCTION__);
+      LOGFN(__FILE__, __LINE__, __FUNCTION__);
    if (startup_info)
-     eina_hash_free(startup_info);
+      eina_hash_free(startup_info);
+
    startup_info = NULL;
 }
 
@@ -85,41 +97,63 @@ ecore_x_netwm_shutdown(void)
  */
 EAPI void
 ecore_x_netwm_wm_identify(Ecore_X_Window root, Ecore_X_Window check,
-                         const char *wm_name)
+                          const char *wm_name)
 {
    LOGFN(__FILE__, __LINE__, __FUNCTION__);
-   ecore_x_window_prop_window_set(root, ECORE_X_ATOM_NET_SUPPORTING_WM_CHECK, &check, 1);
-   ecore_x_window_prop_window_set(check, ECORE_X_ATOM_NET_SUPPORTING_WM_CHECK, &check, 1);
-   _ecore_x_window_prop_string_utf8_set(check, ECORE_X_ATOM_NET_WM_NAME, wm_name);
+   ecore_x_window_prop_window_set(root,
+                                  ECORE_X_ATOM_NET_SUPPORTING_WM_CHECK,
+                                  &check,
+                                  1);
+   ecore_x_window_prop_window_set(check,
+                                  ECORE_X_ATOM_NET_SUPPORTING_WM_CHECK,
+                                  &check,
+                                  1);
+   _ecore_x_window_prop_string_utf8_set(check,
+                                        ECORE_X_ATOM_NET_WM_NAME,
+                                        wm_name);
    /* This one isn't mandatory */
-   _ecore_x_window_prop_string_utf8_set(root, ECORE_X_ATOM_NET_WM_NAME, wm_name);
+   _ecore_x_window_prop_string_utf8_set(root,
+                                        ECORE_X_ATOM_NET_WM_NAME,
+                                        wm_name);
 }
 
 /*
  * Set supported atoms
  */
 EAPI void
-ecore_x_netwm_supported_set(Ecore_X_Window root, Ecore_X_Atom *supported, int num)
+ecore_x_netwm_supported_set(Ecore_X_Window root,
+                            Ecore_X_Atom *supported,
+                            int num)
 {
    LOGFN(__FILE__, __LINE__, __FUNCTION__);
-   ecore_x_window_prop_atom_set(root, ECORE_X_ATOM_NET_SUPPORTED, supported, num);
+   ecore_x_window_prop_atom_set(root,
+                                ECORE_X_ATOM_NET_SUPPORTED,
+                                supported,
+                                num);
 }
 
 EAPI int
-ecore_x_netwm_supported_get(Ecore_X_Window root, Ecore_X_Atom **supported, int *num)
+ecore_x_netwm_supported_get(Ecore_X_Window root,
+                            Ecore_X_Atom **supported,
+                            int *num)
 {
    int num_ret;
 
-   if (num) *num = 0;
-   if (supported) *supported = NULL;
+   if (num)
+      *num = 0;
+
+   if (supported)
+      *supported = NULL;
 
    LOGFN(__FILE__, __LINE__, __FUNCTION__);
    num_ret = ecore_x_window_prop_atom_list_get(root, ECORE_X_ATOM_NET_SUPPORTED,
-                                              supported);
+                                               supported);
    if (num_ret <= 0)
       return 0;
 
-   if (num) *num = num_ret;
+   if (num)
+      *num = num_ret;
+
    return 1;
 }
 
@@ -131,20 +165,23 @@ ecore_x_netwm_desk_count_set(Ecore_X_Window root, unsigned int n_desks)
 {
    LOGFN(__FILE__, __LINE__, __FUNCTION__);
    ecore_x_window_prop_card32_set(root, ECORE_X_ATOM_NET_NUMBER_OF_DESKTOPS,
-                                 &n_desks, 1);
+                                  &n_desks, 1);
 }
 
 EAPI void
 ecore_x_netwm_desk_roots_set(Ecore_X_Window root,
-                            Ecore_X_Window *vroots, unsigned int n_desks)
+                             Ecore_X_Window *vroots, unsigned int n_desks)
 {
    LOGFN(__FILE__, __LINE__, __FUNCTION__);
-   ecore_x_window_prop_window_set(root, ECORE_X_ATOM_NET_VIRTUAL_ROOTS, vroots, n_desks);
+   ecore_x_window_prop_window_set(root,
+                                  ECORE_X_ATOM_NET_VIRTUAL_ROOTS,
+                                  vroots,
+                                  n_desks);
 }
 
 EAPI void
 ecore_x_netwm_desk_names_set(Ecore_X_Window root,
-                            const char **names, unsigned int n_desks)
+                             const char **names, unsigned int n_desks)
 {
    char ss[32], *buf;
    const char *s;
@@ -157,18 +194,18 @@ ecore_x_netwm_desk_names_set(Ecore_X_Window root,
 
    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;
+        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(root, ECORE_X_ATOM_NET_DESKTOP_NAMES, buf, len);
@@ -178,7 +215,7 @@ ecore_x_netwm_desk_names_set(Ecore_X_Window root,
 
 EAPI void
 ecore_x_netwm_desk_size_set(Ecore_X_Window root, unsigned int width,
-                           unsigned int height)
+                            unsigned int height)
 {
    unsigned int size[2];
 
@@ -186,22 +223,22 @@ ecore_x_netwm_desk_size_set(Ecore_X_Window root, unsigned int width,
    size[0] = width;
    size[1] = height;
    ecore_x_window_prop_card32_set(root, ECORE_X_ATOM_NET_DESKTOP_GEOMETRY, size,
-                                 2);
+                                  2);
 }
 
 EAPI void
 ecore_x_netwm_desk_viewports_set(Ecore_X_Window root,
-                                unsigned int *origins, unsigned int n_desks)
+                                 unsigned int *origins, unsigned int n_desks)
 {
    LOGFN(__FILE__, __LINE__, __FUNCTION__);
    ecore_x_window_prop_card32_set(root, ECORE_X_ATOM_NET_DESKTOP_VIEWPORT,
-                                 origins, 2 * n_desks);
+                                  origins, 2 * n_desks);
 }
 
 EAPI void
 ecore_x_netwm_desk_layout_set(Ecore_X_Window root, int orientation,
-                             int columns, int rows,
-                             int starting_corner)
+                              int columns, int rows,
+                              int starting_corner)
 {
    unsigned int layout[4];
 
@@ -211,16 +248,16 @@ ecore_x_netwm_desk_layout_set(Ecore_X_Window root, int orientation,
    layout[2] = rows;
    layout[3] = starting_corner;
    ecore_x_window_prop_card32_set(root, ECORE_X_ATOM_NET_DESKTOP_LAYOUT,
-                                 layout, 4);
+                                  layout, 4);
 }
 
 EAPI void
 ecore_x_netwm_desk_workareas_set(Ecore_X_Window root,
-                                unsigned int *areas, unsigned int n_desks)
+                                 unsigned int *areas, unsigned int n_desks)
 {
    LOGFN(__FILE__, __LINE__, __FUNCTION__);
    ecore_x_window_prop_card32_set(root, ECORE_X_ATOM_NET_WORKAREA, areas,
-                                 4 * n_desks);
+                                  4 * n_desks);
 }
 
 EAPI void
@@ -228,7 +265,7 @@ ecore_x_netwm_desk_current_set(Ecore_X_Window root, unsigned int desk)
 {
    LOGFN(__FILE__, __LINE__, __FUNCTION__);
    ecore_x_window_prop_card32_set(root, ECORE_X_ATOM_NET_CURRENT_DESKTOP, &desk,
-                                 1);
+                                  1);
 }
 
 EAPI void
@@ -239,7 +276,7 @@ ecore_x_netwm_showing_desktop_set(Ecore_X_Window root, int on)
    LOGFN(__FILE__, __LINE__, __FUNCTION__);
    val = (on) ? 1 : 0;
    ecore_x_window_prop_card32_set(root, ECORE_X_ATOM_NET_SHOWING_DESKTOP, &val,
-                                 1);
+                                  1);
 }
 
 /*
@@ -249,22 +286,22 @@ ecore_x_netwm_showing_desktop_set(Ecore_X_Window root, int on)
 /* Mapping order */
 EAPI void
 ecore_x_netwm_client_list_set(Ecore_X_Window root,
-                             Ecore_X_Window *p_clients, unsigned int n_clients)
+                              Ecore_X_Window *p_clients, unsigned int n_clients)
 {
    LOGFN(__FILE__, __LINE__, __FUNCTION__);
    ecore_x_window_prop_window_set(root, ECORE_X_ATOM_NET_CLIENT_LIST,
-                                 p_clients, n_clients);
+                                  p_clients, n_clients);
 }
 
 /* Stacking order */
 EAPI void
 ecore_x_netwm_client_list_stacking_set(Ecore_X_Window root,
-                                      Ecore_X_Window *p_clients,
-                                      unsigned int n_clients)
+                                       Ecore_X_Window *p_clients,
+                                       unsigned int n_clients)
 {
    LOGFN(__FILE__, __LINE__, __FUNCTION__);
    ecore_x_window_prop_window_set(root, ECORE_X_ATOM_NET_CLIENT_LIST_STACKING,
-                                 p_clients, n_clients);
+                                  p_clients, n_clients);
 }
 
 EAPI void
@@ -272,17 +309,21 @@ ecore_x_netwm_client_active_set(Ecore_X_Window root, Ecore_X_Window win)
 {
    LOGFN(__FILE__, __LINE__, __FUNCTION__);
    ecore_x_window_prop_window_set(root, ECORE_X_ATOM_NET_ACTIVE_WINDOW,
-                                 &win, 1);
+                                  &win, 1);
 }
 
 EAPI void
-ecore_x_netwm_client_active_request(Ecore_X_Window root, Ecore_X_Window win, int type, Ecore_X_Window current_win)
+ecore_x_netwm_client_active_request(Ecore_X_Window root,
+                                    Ecore_X_Window win,
+                                    int type,
+                                    Ecore_X_Window current_win)
 {
    XEvent xev;
 
    LOGFN(__FILE__, __LINE__, __FUNCTION__);
-   if (!root) root = DefaultRootWindow(_ecore_x_disp);
-   
+   if (!root)
+      root = DefaultRootWindow(_ecore_x_disp);
+
    xev.xclient.type = ClientMessage;
    xev.xclient.display = _ecore_x_disp;
    xev.xclient.window = win;
@@ -294,8 +335,8 @@ ecore_x_netwm_client_active_request(Ecore_X_Window root, Ecore_X_Window win, int
    xev.xclient.data.l[3] = 0;
    xev.xclient.data.l[4] = 0;
 
-   XSendEvent(_ecore_x_disp, root, False, 
-             SubstructureRedirectMask | SubstructureNotifyMask, &xev);
+   XSendEvent(_ecore_x_disp, root, False,
+              SubstructureRedirectMask | SubstructureNotifyMask, &xev);
 }
 
 EAPI void
@@ -310,7 +351,9 @@ ecore_x_netwm_name_get(Ecore_X_Window win, char **name)
 {
    LOGFN(__FILE__, __LINE__, __FUNCTION__);
    if (name)
-     *name = _ecore_x_window_prop_string_utf8_get(win, ECORE_X_ATOM_NET_WM_NAME);
+      *name = _ecore_x_window_prop_string_utf8_get(win,
+                                                   ECORE_X_ATOM_NET_WM_NAME);
+
    return 1;
 }
 
@@ -326,7 +369,9 @@ ecore_x_netwm_startup_id_get(Ecore_X_Window win, char **id)
 {
    LOGFN(__FILE__, __LINE__, __FUNCTION__);
    if (id)
-     *id = _ecore_x_window_prop_string_utf8_get(win, ECORE_X_ATOM_NET_STARTUP_ID);
+      *id = _ecore_x_window_prop_string_utf8_get(win,
+                                                 ECORE_X_ATOM_NET_STARTUP_ID);
+
    return 1;
 }
 
@@ -335,7 +380,7 @@ ecore_x_netwm_visible_name_set(Ecore_X_Window win, const char *name)
 {
    LOGFN(__FILE__, __LINE__, __FUNCTION__);
    _ecore_x_window_prop_string_utf8_set(win, ECORE_X_ATOM_NET_WM_VISIBLE_NAME,
-                                       name);
+                                        name);
 }
 
 EAPI int
@@ -343,8 +388,10 @@ ecore_x_netwm_visible_name_get(Ecore_X_Window win, char **name)
 {
    LOGFN(__FILE__, __LINE__, __FUNCTION__);
    if (name)
-     *name = _ecore_x_window_prop_string_utf8_get(win,
-                                                 ECORE_X_ATOM_NET_WM_VISIBLE_NAME);
+      *name = _ecore_x_window_prop_string_utf8_get(
+            win,
+            ECORE_X_ATOM_NET_WM_VISIBLE_NAME);
+
    return 1;
 }
 
@@ -353,7 +400,7 @@ ecore_x_netwm_icon_name_set(Ecore_X_Window win, const char *name)
 {
    LOGFN(__FILE__, __LINE__, __FUNCTION__);
    _ecore_x_window_prop_string_utf8_set(win, ECORE_X_ATOM_NET_WM_ICON_NAME,
-                                       name);
+                                        name);
 }
 
 EAPI int
@@ -361,8 +408,10 @@ ecore_x_netwm_icon_name_get(Ecore_X_Window win, char **name)
 {
    LOGFN(__FILE__, __LINE__, __FUNCTION__);
    if (name)
-     *name = _ecore_x_window_prop_string_utf8_get(win,
-                                                 ECORE_X_ATOM_NET_WM_ICON_NAME);
+      *name = _ecore_x_window_prop_string_utf8_get(
+            win,
+            ECORE_X_ATOM_NET_WM_ICON_NAME);
+
    return 1;
 }
 
@@ -371,8 +420,8 @@ ecore_x_netwm_visible_icon_name_set(Ecore_X_Window win, const char *name)
 {
    LOGFN(__FILE__, __LINE__, __FUNCTION__);
    _ecore_x_window_prop_string_utf8_set(win,
-                                       ECORE_X_ATOM_NET_WM_VISIBLE_ICON_NAME,
-                                       name);
+                                        ECORE_X_ATOM_NET_WM_VISIBLE_ICON_NAME,
+                                        name);
 }
 
 EAPI int
@@ -380,8 +429,10 @@ ecore_x_netwm_visible_icon_name_get(Ecore_X_Window win, char **name)
 {
    LOGFN(__FILE__, __LINE__, __FUNCTION__);
    if (name)
-     *name = _ecore_x_window_prop_string_utf8_get(win,
-                                                 ECORE_X_ATOM_NET_WM_VISIBLE_ICON_NAME);
+      *name = _ecore_x_window_prop_string_utf8_get(
+            win,
+            ECORE_X_ATOM_NET_WM_VISIBLE_ICON_NAME);
+
    return 1;
 }
 
@@ -400,9 +451,11 @@ ecore_x_netwm_desktop_get(Ecore_X_Window win, unsigned int *desk)
 
    LOGFN(__FILE__, __LINE__, __FUNCTION__);
    ret = ecore_x_window_prop_card32_get(win, ECORE_X_ATOM_NET_WM_DESKTOP,
-                                       &tmp, 1);
+                                        &tmp, 1);
+
+   if (desk)
+      *desk = tmp;
 
-   if (desk) *desk = tmp;
    return ret == 1 ? 1 : 0;
 }
 
@@ -411,7 +464,7 @@ ecore_x_netwm_desktop_get(Ecore_X_Window win, unsigned int *desk)
  */
 EAPI void
 ecore_x_netwm_strut_set(Ecore_X_Window win, int left, int right,
-                       int top, int bottom)
+                        int top, int bottom)
 {
    unsigned int strut[4];
 
@@ -428,28 +481,48 @@ ecore_x_netwm_strut_set(Ecore_X_Window win, int left, int right,
  */
 EAPI int
 ecore_x_netwm_strut_get(Ecore_X_Window win, int *left, int *right,
-                       int *top, int *bottom)
+                        int *top, int *bottom)
 {
    int ret = 0;
    unsigned int strut[4];
 
    LOGFN(__FILE__, __LINE__, __FUNCTION__);
-   ret = ecore_x_window_prop_card32_get(win, ECORE_X_ATOM_NET_WM_STRUT, strut, 4);
+   ret = ecore_x_window_prop_card32_get(win,
+                                        ECORE_X_ATOM_NET_WM_STRUT,
+                                        strut,
+                                        4);
    if (ret != 4)
-     return 0;
+      return 0;
+
+   if (left)
+      *left = strut[0];
+
+   if (right)
+      *right = strut[1];
+
+   if (top)
+      *top = strut[2];
+
+   if (bottom)
+      *bottom = strut[3];
 
-   if (left) *left = strut[0];
-   if (right) *right = strut[1];
-   if (top) *top = strut[2];
-   if (bottom) *bottom = strut[3];
    return 1;
 }
 
 EAPI void
-ecore_x_netwm_strut_partial_set(Ecore_X_Window win, int left, int right,
-                               int top, int bottom, int left_start_y, int left_end_y,
-                               int right_start_y, int right_end_y, int top_start_x,
-                               int top_end_x, int bottom_start_x, int bottom_end_x)
+ecore_x_netwm_strut_partial_set(Ecore_X_Window win,
+                                int left,
+                                int right,
+                                int top,
+                                int bottom,
+                                int left_start_y,
+                                int left_end_y,
+                                int right_start_y,
+                                int right_end_y,
+                                int top_start_x,
+                                int top_end_x,
+                                int bottom_start_x,
+                                int bottom_end_x)
 {
    unsigned int strut[12];
 
@@ -466,35 +539,74 @@ ecore_x_netwm_strut_partial_set(Ecore_X_Window win, int left, int right,
    strut[9] = top_end_x;
    strut[10] = bottom_start_x;
    strut[11] = bottom_end_x;
-   ecore_x_window_prop_card32_set(win, ECORE_X_ATOM_NET_WM_STRUT_PARTIAL, strut, 12);
+   ecore_x_window_prop_card32_set(win,
+                                  ECORE_X_ATOM_NET_WM_STRUT_PARTIAL,
+                                  strut,
+                                  12);
 }
 
 EAPI int
-ecore_x_netwm_strut_partial_get(Ecore_X_Window win, int *left, int *right,
-                               int *top, int *bottom, int *left_start_y, int *left_end_y,
-                               int *right_start_y, int *right_end_y, int *top_start_x,
-                               int *top_end_x, int *bottom_start_x, int *bottom_end_x)
+ecore_x_netwm_strut_partial_get(Ecore_X_Window win,
+                                int *left,
+                                int *right,
+                                int *top,
+                                int *bottom,
+                                int *left_start_y,
+                                int *left_end_y,
+                                int *right_start_y,
+                                int *right_end_y,
+                                int *top_start_x,
+                                int *top_end_x,
+                                int *bottom_start_x,
+                                int *bottom_end_x)
 {
    int ret = 0;
    unsigned int strut[12];
 
    LOGFN(__FILE__, __LINE__, __FUNCTION__);
-   ret = ecore_x_window_prop_card32_get(win, ECORE_X_ATOM_NET_WM_STRUT_PARTIAL, strut, 12);
+   ret = ecore_x_window_prop_card32_get(win,
+                                        ECORE_X_ATOM_NET_WM_STRUT_PARTIAL,
+                                        strut,
+                                        12);
    if (ret != 12)
-     return 0;
-
-   if (left) *left = strut[0];
-   if (right) *right = strut[1];
-   if (top) *top = strut[2];
-   if (bottom) *bottom = strut[3];
-   if (left_start_y) *left_start_y = strut[4];
-   if (left_end_y) *left_end_y = strut[5];
-   if (right_start_y) *right_start_y = strut[6];
-   if (right_end_y) *right_end_y = strut[7];
-   if (top_start_x) *top_start_x = strut[8];
-   if (top_end_x) *top_end_x = strut[9];
-   if (bottom_start_x) *bottom_start_x = strut[10];
-   if (bottom_end_x) *bottom_end_x = strut[11];
+      return 0;
+
+   if (left)
+      *left = strut[0];
+
+   if (right)
+      *right = strut[1];
+
+   if (top)
+      *top = strut[2];
+
+   if (bottom)
+      *bottom = strut[3];
+
+   if (left_start_y)
+      *left_start_y = strut[4];
+
+   if (left_end_y)
+      *left_end_y = strut[5];
+
+   if (right_start_y)
+      *right_start_y = strut[6];
+
+   if (right_end_y)
+      *right_end_y = strut[7];
+
+   if (top_start_x)
+      *top_start_x = strut[8];
+
+   if (top_end_x)
+      *top_end_x = strut[9];
+
+   if (bottom_start_x)
+      *bottom_start_x = strut[10];
+
+   if (bottom_end_x)
+      *bottom_end_x = strut[11];
+
    return 1;
 }
 
@@ -507,18 +619,24 @@ ecore_x_netwm_icons_get(Ecore_X_Window win, Ecore_X_Icon **icon, int *num)
    int num_ret;
 
    LOGFN(__FILE__, __LINE__, __FUNCTION__);
-   if (num) *num = 0;
-   if (icon) *icon = NULL;
+   if (num)
+      *num = 0;
+
+   if (icon)
+      *icon = NULL;
 
    num_ret = ecore_x_window_prop_card32_list_get(win, ECORE_X_ATOM_NET_WM_ICON,
-                                                &data);
+                                                 &data);
    if (num_ret <= 0)
-     return 0;
-   if (!data) return 0;
+      return 0;
+
+   if (!data)
+      return 0;
+
    if (num_ret < 2)
      {
-       free(data);
-       return 0;
+                free(data);
+        return 0;
      }
 
    /* Check how many icons there are */
@@ -526,79 +644,85 @@ ecore_x_netwm_icons_get(Ecore_X_Window win, Ecore_X_Icon **icon, int *num)
    p = data;
    while (p)
      {
-       len = p[0] * p[1];
-       p += (len + 2);
-       if ((p - data) > num_ret)
-         {
-            free(data);
-            return 0;
-         }
-       icons++;
-
-       if ((p - data) == num_ret)
-         p = NULL;
+        len = p[0] * p[1];
+        p += (len + 2);
+        if ((p - data) > num_ret)
+          {
+                free(data);
+             return 0;
+          }
+
+        icons++;
+
+        if ((p - data) == num_ret)
+           p = NULL;
      }
-   if (num) *num = icons;
+   if (num)
+      *num = icons;
 
    /* If the user doesn't want the icons, return */
    if (!icon)
      {
-       free(data);
-       return 1;
+                free(data);
+        return 1;
      }
 
    /* Allocate memory */
    *icon = malloc(icons * sizeof(Ecore_X_Icon));
    if (!(*icon))
      {
-       free(data);
-       return 0;
+                free(data);
+        return 0;
      }
 
    /* Fetch the icons */
    p = data;
    for (i = 0; i < icons; i++)
      {
-       unsigned int *ps, *pd, *pe;
-       
-       len = p[0] * p[1];
-       ((*icon)[i]).width = p[0];
-       ((*icon)[i]).height = p[1];
-       src = &(p[2]);
-       ((*icon)[i]).data = malloc(len * sizeof(unsigned int));
-       if (!((*icon)[i]).data)
-         {
-            while (i)
-              free(((*icon)[--i]).data);
-            free(*icon);
-            free(data);
-            return 0;
-         }
-
-       pd = ((*icon)[i]).data;
-       ps = src;
-       pe = ps + len;
-       for (; ps < pe; ps++)
-         {
-            unsigned int r, g, b, a;
-            
-            a = (*ps >> 24) & 0xff;
-            r = (((*ps >> 16) & 0xff) * a) / 255;
-            g = (((*ps >>  8) & 0xff) * a) / 255;
-            b = (((*ps      ) & 0xff) * a) / 255;
-            *pd = (a << 24) | (r << 16) | (g << 8) | (b);
-            pd++;
-         }
-       p += (len + 2);
+        unsigned int *ps, *pd, *pe;
+
+        len = p[0] * p[1];
+        ((*icon)[i]).width = p[0];
+        ((*icon)[i]).height = p[1];
+        src = &(p[2]);
+        ((*icon)[i]).data = malloc(len * sizeof(unsigned int));
+        if (!((*icon)[i]).data)
+          {
+             while (i)
+                free(((*icon)[--i]).data);
+                free(*icon);
+                free(data);
+             return 0;
+          }
+
+        pd = ((*icon)[i]).data;
+        ps = src;
+        pe = ps + len;
+        for (; ps < pe; ps++)
+          {
+             unsigned int r, g, b, a;
+
+             a = (*ps >> 24) & 0xff;
+             r = (((*ps >> 16) & 0xff) * a) / 255;
+             g = (((*ps >> 8) & 0xff) * a) / 255;
+             b = (((*ps) & 0xff) * a) / 255;
+             *pd = (a << 24) | (r << 16) | (g << 8) | (b);
+             pd++;
+          }
+        p += (len + 2);
      }
 
-   free(data);
+                free(data);
 
    return 1;
 }
 
 EAPI void
-ecore_x_netwm_icon_geometry_set(Ecore_X_Window win, int x, int y, int width, int height)
+ecore_x_netwm_icon_geometry_set(Ecore_X_Window win,
+                                int x,
+                                int y,
+                                int width,
+                                int height)
 {
    unsigned int geometry[4];
 
@@ -607,24 +731,42 @@ ecore_x_netwm_icon_geometry_set(Ecore_X_Window win, int x, int y, int width, int
    geometry[1] = y;
    geometry[2] = width;
    geometry[3] = height;
-   ecore_x_window_prop_card32_set(win, ECORE_X_ATOM_NET_WM_ICON_GEOMETRY, geometry, 4);
+   ecore_x_window_prop_card32_set(win,
+                                  ECORE_X_ATOM_NET_WM_ICON_GEOMETRY,
+                                  geometry,
+                                  4);
 }
 
 EAPI int
-ecore_x_netwm_icon_geometry_get(Ecore_X_Window win, int *x, int *y, int *width, int *height)
+ecore_x_netwm_icon_geometry_get(Ecore_X_Window win,
+                                int *x,
+                                int *y,
+                                int *width,
+                                int *height)
 {
    int ret;
    unsigned int geometry[4];
 
    LOGFN(__FILE__, __LINE__, __FUNCTION__);
-   ret = ecore_x_window_prop_card32_get(win, ECORE_X_ATOM_NET_WM_ICON_GEOMETRY, geometry, 4);
+   ret = ecore_x_window_prop_card32_get(win,
+                                        ECORE_X_ATOM_NET_WM_ICON_GEOMETRY,
+                                        geometry,
+                                        4);
    if (ret != 4)
-     return 0;
+      return 0;
+
+   if (x)
+      *x = geometry[0];
+
+   if (y)
+      *y = geometry[1];
+
+   if (width)
+      *width = geometry[2];
+
+   if (height)
+      *height = geometry[3];
 
-   if (x) *x = geometry[0];
-   if (y) *y = geometry[1];
-   if (width) *width = geometry[2];
-   if (height) *height = geometry[3];
    return 1;
 }
 
@@ -636,7 +778,7 @@ ecore_x_netwm_pid_set(Ecore_X_Window win, int pid)
    LOGFN(__FILE__, __LINE__, __FUNCTION__);
    tmp = pid;
    ecore_x_window_prop_card32_set(win, ECORE_X_ATOM_NET_WM_PID,
-                                 &tmp, 1);
+                                  &tmp, 1);
 }
 
 EAPI int
@@ -647,8 +789,10 @@ ecore_x_netwm_pid_get(Ecore_X_Window win, int *pid)
 
    LOGFN(__FILE__, __LINE__, __FUNCTION__);
    ret = ecore_x_window_prop_card32_get(win, ECORE_X_ATOM_NET_WM_PID,
-                                       &tmp, 1);
-   if (pid) *pid = tmp;
+                                        &tmp, 1);
+   if (pid)
+      *pid = tmp;
+
    return ret == 1 ? 1 : 0;
 }
 
@@ -657,7 +801,7 @@ ecore_x_netwm_handled_icons_set(Ecore_X_Window win)
 {
    LOGFN(__FILE__, __LINE__, __FUNCTION__);
    ecore_x_window_prop_card32_set(win, ECORE_X_ATOM_NET_WM_HANDLED_ICONS,
-                                 NULL, 0);
+                                  NULL, 0);
 }
 
 EAPI int
@@ -666,7 +810,7 @@ ecore_x_netwm_handled_icons_get(Ecore_X_Window win)
    int ret = 0;
    LOGFN(__FILE__, __LINE__, __FUNCTION__);
    ret = ecore_x_window_prop_card32_get(win, ECORE_X_ATOM_NET_WM_HANDLED_ICONS,
-                                       NULL, 0);
+                                        NULL, 0);
    return ret == 0 ? 1 : 0;
 }
 
@@ -675,7 +819,7 @@ ecore_x_netwm_user_time_set(Ecore_X_Window win, unsigned int time)
 {
    LOGFN(__FILE__, __LINE__, __FUNCTION__);
    ecore_x_window_prop_card32_set(win, ECORE_X_ATOM_NET_WM_USER_TIME,
-                                 &time, 1);
+                                  &time, 1);
 }
 
 EAPI int
@@ -684,10 +828,12 @@ ecore_x_netwm_user_time_get(Ecore_X_Window win, unsigned int *time)
    int ret;
    unsigned int tmp;
 
-   LOGFN(__FILE__, __LINE__, __FUNCTION__);
+        LOGFN(__FILE__, __LINE__, __FUNCTION__);
    ret = ecore_x_window_prop_card32_get(win, ECORE_X_ATOM_NET_WM_USER_TIME,
-                                       &tmp, 1);
-   if (time) *time = tmp;
+                                        &tmp, 1);
+   if (time)
+      *time = tmp;
+
    return ret == 1 ? 1 : 0;
 }
 
@@ -695,31 +841,31 @@ Ecore_X_Window_State
 _ecore_x_netwm_state_get(Ecore_X_Atom a)
 {
    if (a == ECORE_X_ATOM_NET_WM_STATE_MODAL)
-     return ECORE_X_WINDOW_STATE_MODAL;
+      return ECORE_X_WINDOW_STATE_MODAL;
    else if (a == ECORE_X_ATOM_NET_WM_STATE_STICKY)
-     return ECORE_X_WINDOW_STATE_STICKY;
+      return ECORE_X_WINDOW_STATE_STICKY;
    else if (a == ECORE_X_ATOM_NET_WM_STATE_MAXIMIZED_VERT)
-     return ECORE_X_WINDOW_STATE_MAXIMIZED_VERT;
+      return ECORE_X_WINDOW_STATE_MAXIMIZED_VERT;
    else if (a == ECORE_X_ATOM_NET_WM_STATE_MAXIMIZED_HORZ)
-     return ECORE_X_WINDOW_STATE_MAXIMIZED_HORZ;
+      return ECORE_X_WINDOW_STATE_MAXIMIZED_HORZ;
    else if (a == ECORE_X_ATOM_NET_WM_STATE_SHADED)
-     return ECORE_X_WINDOW_STATE_SHADED;
+      return ECORE_X_WINDOW_STATE_SHADED;
    else if (a == ECORE_X_ATOM_NET_WM_STATE_SKIP_TASKBAR)
-     return ECORE_X_WINDOW_STATE_SKIP_TASKBAR;
+      return ECORE_X_WINDOW_STATE_SKIP_TASKBAR;
    else if (a == ECORE_X_ATOM_NET_WM_STATE_SKIP_PAGER)
-     return ECORE_X_WINDOW_STATE_SKIP_PAGER;
+      return ECORE_X_WINDOW_STATE_SKIP_PAGER;
    else if (a == ECORE_X_ATOM_NET_WM_STATE_HIDDEN)
-     return ECORE_X_WINDOW_STATE_HIDDEN;
+      return ECORE_X_WINDOW_STATE_HIDDEN;
    else if (a == ECORE_X_ATOM_NET_WM_STATE_FULLSCREEN)
-     return ECORE_X_WINDOW_STATE_FULLSCREEN;
+      return ECORE_X_WINDOW_STATE_FULLSCREEN;
    else if (a == ECORE_X_ATOM_NET_WM_STATE_ABOVE)
-     return ECORE_X_WINDOW_STATE_ABOVE;
+      return ECORE_X_WINDOW_STATE_ABOVE;
    else if (a == ECORE_X_ATOM_NET_WM_STATE_BELOW)
-     return ECORE_X_WINDOW_STATE_BELOW;
+      return ECORE_X_WINDOW_STATE_BELOW;
    else if (a == ECORE_X_ATOM_NET_WM_STATE_DEMANDS_ATTENTION)
-     return ECORE_X_WINDOW_STATE_DEMANDS_ATTENTION;
+      return ECORE_X_WINDOW_STATE_DEMANDS_ATTENTION;
    else
-     return ECORE_X_WINDOW_STATE_UNKNOWN;
+      return ECORE_X_WINDOW_STATE_UNKNOWN;
 }
 
 static Ecore_X_Atom
@@ -728,52 +874,67 @@ _ecore_x_netwm_state_atom_get(Ecore_X_Window_State s)
    switch(s)
      {
       case ECORE_X_WINDOW_STATE_MODAL:
-        return ECORE_X_ATOM_NET_WM_STATE_MODAL;
+         return ECORE_X_ATOM_NET_WM_STATE_MODAL;
+
       case ECORE_X_WINDOW_STATE_STICKY:
-        return ECORE_X_ATOM_NET_WM_STATE_STICKY;
+         return ECORE_X_ATOM_NET_WM_STATE_STICKY;
+
       case ECORE_X_WINDOW_STATE_MAXIMIZED_VERT:
-        return ECORE_X_ATOM_NET_WM_STATE_MAXIMIZED_VERT;
+         return ECORE_X_ATOM_NET_WM_STATE_MAXIMIZED_VERT;
+
       case ECORE_X_WINDOW_STATE_MAXIMIZED_HORZ:
-        return ECORE_X_ATOM_NET_WM_STATE_MAXIMIZED_HORZ;
+         return ECORE_X_ATOM_NET_WM_STATE_MAXIMIZED_HORZ;
+
       case ECORE_X_WINDOW_STATE_SHADED:
-        return ECORE_X_ATOM_NET_WM_STATE_SHADED;
+         return ECORE_X_ATOM_NET_WM_STATE_SHADED;
+
       case ECORE_X_WINDOW_STATE_SKIP_TASKBAR:
-        return ECORE_X_ATOM_NET_WM_STATE_SKIP_TASKBAR;
+         return ECORE_X_ATOM_NET_WM_STATE_SKIP_TASKBAR;
+
       case ECORE_X_WINDOW_STATE_SKIP_PAGER:
-        return ECORE_X_ATOM_NET_WM_STATE_SKIP_PAGER;
+         return ECORE_X_ATOM_NET_WM_STATE_SKIP_PAGER;
+
       case ECORE_X_WINDOW_STATE_HIDDEN:
-        return ECORE_X_ATOM_NET_WM_STATE_HIDDEN;
+         return ECORE_X_ATOM_NET_WM_STATE_HIDDEN;
+
       case ECORE_X_WINDOW_STATE_FULLSCREEN:
-        return ECORE_X_ATOM_NET_WM_STATE_FULLSCREEN;
+         return ECORE_X_ATOM_NET_WM_STATE_FULLSCREEN;
+
       case ECORE_X_WINDOW_STATE_ABOVE:
-        return ECORE_X_ATOM_NET_WM_STATE_ABOVE;
+         return ECORE_X_ATOM_NET_WM_STATE_ABOVE;
+
       case ECORE_X_WINDOW_STATE_BELOW:
-        return ECORE_X_ATOM_NET_WM_STATE_BELOW;
+         return ECORE_X_ATOM_NET_WM_STATE_BELOW;
+
       case ECORE_X_WINDOW_STATE_DEMANDS_ATTENTION:
-        return ECORE_X_ATOM_NET_WM_STATE_DEMANDS_ATTENTION;
+         return ECORE_X_ATOM_NET_WM_STATE_DEMANDS_ATTENTION;
+
       default:
-        return 0;
+         return 0;
      }
 }
 
 EAPI void
-ecore_x_netwm_window_state_set(Ecore_X_Window win, Ecore_X_Window_State *state, unsigned int num)
+ecore_x_netwm_window_state_set(Ecore_X_Window win,
+                               Ecore_X_Window_State *state,
+                               unsigned int num)
 {
-   Ecore_X_Atom  *set;
-   unsigned int   i;
+   Ecore_X_Atom *set;
+   unsigned int i;
 
-   LOGFN(__FILE__, __LINE__, __FUNCTION__);
+        LOGFN(__FILE__, __LINE__, __FUNCTION__);
    if (!num)
      {
-       ecore_x_window_prop_property_del(win, ECORE_X_ATOM_NET_WM_STATE);
-       return;
+        ecore_x_window_prop_property_del(win, ECORE_X_ATOM_NET_WM_STATE);
+        return;
      }
 
    set = malloc(num * sizeof(Ecore_X_Atom));
-   if (!set) return;
+   if (!set)
+      return;
 
    for (i = 0; i < num; i++)
-     set[i] = _ecore_x_netwm_state_atom_get(state[i]);
+      set[i] = _ecore_x_netwm_state_atom_get(state[i]);
 
    ecore_x_window_prop_atom_set(win, ECORE_X_ATOM_NET_WM_STATE, set, num);
 
@@ -781,28 +942,34 @@ ecore_x_netwm_window_state_set(Ecore_X_Window win, Ecore_X_Window_State *state,
 }
 
 EAPI int
-ecore_x_netwm_window_state_get(Ecore_X_Window win, Ecore_X_Window_State **state, unsigned int *num)
+ecore_x_netwm_window_state_get(Ecore_X_Window win,
+                               Ecore_X_Window_State **state,
+                               unsigned int *num)
 {
    int num_ret, i;
    Ecore_X_Atom *atoms;
 
    LOGFN(__FILE__, __LINE__, __FUNCTION__);
-   if (num) *num = 0;
-   if (state) *state = NULL;
+   if (num)
+      *num = 0;
+
+   if (state)
+      *state = NULL;
 
    num_ret = ecore_x_window_prop_atom_list_get(win, ECORE_X_ATOM_NET_WM_STATE,
-                                              &atoms);
+                                               &atoms);
    if (num_ret <= 0)
       return 0;
 
    if (state)
      {
-       *state = malloc(num_ret * sizeof(Ecore_X_Window_State));
-       if (*state)
-         for (i = 0; i < num_ret; ++i)
-           (*state)[i] = _ecore_x_netwm_state_get(atoms[i]);
+        *state = malloc(num_ret * sizeof(Ecore_X_Window_State));
+        if (*state)
+           for (i = 0; i < num_ret; ++i)
+              (*state)[i] = _ecore_x_netwm_state_get(atoms[i]);
 
-       if (num) *num = num_ret;
+        if (num)
+           *num = num_ret;
      }
 
    free(atoms);
@@ -813,35 +980,35 @@ static Ecore_X_Window_Type
 _ecore_x_netwm_window_type_type_get(Ecore_X_Atom atom)
 {
    if (atom == ECORE_X_ATOM_NET_WM_WINDOW_TYPE_DESKTOP)
-     return ECORE_X_WINDOW_TYPE_DESKTOP;
+      return ECORE_X_WINDOW_TYPE_DESKTOP;
    else if (atom == ECORE_X_ATOM_NET_WM_WINDOW_TYPE_DOCK)
-     return ECORE_X_WINDOW_TYPE_DOCK;
+      return ECORE_X_WINDOW_TYPE_DOCK;
    else if (atom == ECORE_X_ATOM_NET_WM_WINDOW_TYPE_TOOLBAR)
-     return ECORE_X_WINDOW_TYPE_TOOLBAR;
+      return ECORE_X_WINDOW_TYPE_TOOLBAR;
    else if (atom == ECORE_X_ATOM_NET_WM_WINDOW_TYPE_MENU)
-     return ECORE_X_WINDOW_TYPE_MENU;
+      return ECORE_X_WINDOW_TYPE_MENU;
    else if (atom == ECORE_X_ATOM_NET_WM_WINDOW_TYPE_UTILITY)
-     return ECORE_X_WINDOW_TYPE_UTILITY;
+      return ECORE_X_WINDOW_TYPE_UTILITY;
    else if (atom == ECORE_X_ATOM_NET_WM_WINDOW_TYPE_SPLASH)
-     return ECORE_X_WINDOW_TYPE_SPLASH;
+      return ECORE_X_WINDOW_TYPE_SPLASH;
    else if (atom == ECORE_X_ATOM_NET_WM_WINDOW_TYPE_DIALOG)
-     return ECORE_X_WINDOW_TYPE_DIALOG;
+      return ECORE_X_WINDOW_TYPE_DIALOG;
    else if (atom == ECORE_X_ATOM_NET_WM_WINDOW_TYPE_NORMAL)
-     return ECORE_X_WINDOW_TYPE_NORMAL;
+      return ECORE_X_WINDOW_TYPE_NORMAL;
    else if (atom == ECORE_X_ATOM_NET_WM_WINDOW_TYPE_DROPDOWN_MENU)
-     return ECORE_X_WINDOW_TYPE_DROPDOWN_MENU;
+      return ECORE_X_WINDOW_TYPE_DROPDOWN_MENU;
    else if (atom == ECORE_X_ATOM_NET_WM_WINDOW_TYPE_POPUP_MENU)
-     return ECORE_X_WINDOW_TYPE_POPUP_MENU;
+      return ECORE_X_WINDOW_TYPE_POPUP_MENU;
    else if (atom == ECORE_X_ATOM_NET_WM_WINDOW_TYPE_TOOLTIP)
-     return ECORE_X_WINDOW_TYPE_TOOLTIP;
+      return ECORE_X_WINDOW_TYPE_TOOLTIP;
    else if (atom == ECORE_X_ATOM_NET_WM_WINDOW_TYPE_NOTIFICATION)
-     return ECORE_X_WINDOW_TYPE_NOTIFICATION;
+      return ECORE_X_WINDOW_TYPE_NOTIFICATION;
    else if (atom == ECORE_X_ATOM_NET_WM_WINDOW_TYPE_COMBO)
-     return ECORE_X_WINDOW_TYPE_COMBO;
+      return ECORE_X_WINDOW_TYPE_COMBO;
    else if (atom == ECORE_X_ATOM_NET_WM_WINDOW_TYPE_DND)
-     return ECORE_X_WINDOW_TYPE_DND;
+      return ECORE_X_WINDOW_TYPE_DND;
    else
-     return ECORE_X_WINDOW_TYPE_UNKNOWN;
+      return ECORE_X_WINDOW_TYPE_UNKNOWN;
 }
 
 static Ecore_X_Atom
@@ -850,35 +1017,49 @@ _ecore_x_netwm_window_type_atom_get(Ecore_X_Window_Type type)
    switch (type)
      {
       case ECORE_X_WINDOW_TYPE_DESKTOP:
-        return ECORE_X_ATOM_NET_WM_WINDOW_TYPE_DESKTOP;
+         return ECORE_X_ATOM_NET_WM_WINDOW_TYPE_DESKTOP;
+
       case ECORE_X_WINDOW_TYPE_DOCK:
-        return ECORE_X_ATOM_NET_WM_WINDOW_TYPE_DOCK;
+         return ECORE_X_ATOM_NET_WM_WINDOW_TYPE_DOCK;
+
       case ECORE_X_WINDOW_TYPE_TOOLBAR:
-        return ECORE_X_ATOM_NET_WM_WINDOW_TYPE_TOOLBAR;
+         return ECORE_X_ATOM_NET_WM_WINDOW_TYPE_TOOLBAR;
+
       case ECORE_X_WINDOW_TYPE_MENU:
-        return ECORE_X_ATOM_NET_WM_WINDOW_TYPE_MENU;
+         return ECORE_X_ATOM_NET_WM_WINDOW_TYPE_MENU;
+
       case ECORE_X_WINDOW_TYPE_UTILITY:
-        return ECORE_X_ATOM_NET_WM_WINDOW_TYPE_UTILITY;
+         return ECORE_X_ATOM_NET_WM_WINDOW_TYPE_UTILITY;
+
       case ECORE_X_WINDOW_TYPE_SPLASH:
-        return ECORE_X_ATOM_NET_WM_WINDOW_TYPE_SPLASH;
+         return ECORE_X_ATOM_NET_WM_WINDOW_TYPE_SPLASH;
+
       case ECORE_X_WINDOW_TYPE_DIALOG:
-        return ECORE_X_ATOM_NET_WM_WINDOW_TYPE_DIALOG;
+         return ECORE_X_ATOM_NET_WM_WINDOW_TYPE_DIALOG;
+
       case ECORE_X_WINDOW_TYPE_NORMAL:
-        return ECORE_X_ATOM_NET_WM_WINDOW_TYPE_NORMAL;
+         return ECORE_X_ATOM_NET_WM_WINDOW_TYPE_NORMAL;
+
       case ECORE_X_WINDOW_TYPE_DROPDOWN_MENU:
-        return ECORE_X_ATOM_NET_WM_WINDOW_TYPE_DROPDOWN_MENU;
+         return ECORE_X_ATOM_NET_WM_WINDOW_TYPE_DROPDOWN_MENU;
+
       case ECORE_X_WINDOW_TYPE_POPUP_MENU:
-        return ECORE_X_ATOM_NET_WM_WINDOW_TYPE_POPUP_MENU;
+         return ECORE_X_ATOM_NET_WM_WINDOW_TYPE_POPUP_MENU;
+
       case ECORE_X_WINDOW_TYPE_TOOLTIP:
-        return ECORE_X_ATOM_NET_WM_WINDOW_TYPE_TOOLTIP;
+         return ECORE_X_ATOM_NET_WM_WINDOW_TYPE_TOOLTIP;
+
       case ECORE_X_WINDOW_TYPE_NOTIFICATION:
-        return ECORE_X_ATOM_NET_WM_WINDOW_TYPE_NOTIFICATION;
+         return ECORE_X_ATOM_NET_WM_WINDOW_TYPE_NOTIFICATION;
+
       case ECORE_X_WINDOW_TYPE_COMBO:
-        return ECORE_X_ATOM_NET_WM_WINDOW_TYPE_COMBO;
+         return ECORE_X_ATOM_NET_WM_WINDOW_TYPE_COMBO;
+
       case ECORE_X_WINDOW_TYPE_DND:
-        return ECORE_X_ATOM_NET_WM_WINDOW_TYPE_DND;
+         return ECORE_X_ATOM_NET_WM_WINDOW_TYPE_DND;
+
       default:
-        return 0;
+         return 0;
      }
 }
 
@@ -894,7 +1075,7 @@ ecore_x_netwm_window_type_set(Ecore_X_Window win, Ecore_X_Window_Type type)
    LOGFN(__FILE__, __LINE__, __FUNCTION__);
    atom = _ecore_x_netwm_window_type_atom_get(type);
    ecore_x_window_prop_atom_set(win, ECORE_X_ATOM_NET_WM_WINDOW_TYPE,
-                               &atom, 1);
+                                &atom, 1);
 }
 
 /* FIXME: Maybe return 0 on some conditions? */
@@ -905,16 +1086,19 @@ ecore_x_netwm_window_type_get(Ecore_X_Window win, Ecore_X_Window_Type *type)
    Ecore_X_Atom *atoms = NULL;
 
    LOGFN(__FILE__, __LINE__, __FUNCTION__);
-   if (type) *type = ECORE_X_WINDOW_TYPE_NORMAL;
+   if (type)
+      *type = ECORE_X_WINDOW_TYPE_NORMAL;
 
-   num = ecore_x_window_prop_atom_list_get(win, 
-                                          ECORE_X_ATOM_NET_WM_WINDOW_TYPE,
-                                          &atoms);
+   num = ecore_x_window_prop_atom_list_get(win,
+                                           ECORE_X_ATOM_NET_WM_WINDOW_TYPE,
+                                           &atoms);
    if ((type) && (num >= 1) && (atoms))
-     *type = _ecore_x_netwm_window_type_type_get(atoms[0]);
+      *type = _ecore_x_netwm_window_type_type_get(atoms[0]);
 
    free(atoms);
-   if (num >= 1) return 1;
+   if (num >= 1)
+      return 1;
+
    return 0;
 }
 
@@ -924,24 +1108,34 @@ ecore_x_netwm_window_types_get(Ecore_X_Window win, Ecore_X_Window_Type **types)
    int num, i;
    Ecore_X_Atom *atoms = NULL;
    Ecore_X_Window_Type *atoms2 = NULL;
-   
+
    LOGFN(__FILE__, __LINE__, __FUNCTION__);
-   if (types) *types = NULL;
+   if (types)
+      *types = NULL;
+
    num = ecore_x_window_prop_atom_list_get(win,
-                                          ECORE_X_ATOM_NET_WM_WINDOW_TYPE,
-                                          &atoms);
+                                           ECORE_X_ATOM_NET_WM_WINDOW_TYPE,
+                                           &atoms);
    if ((num <= 0) || (!atoms))
      {
-       if (atoms) free(atoms);
-       return 0;
+        if (atoms)
+           free(atoms);
+
+        return 0;
      }
+
    atoms2 = malloc(num * sizeof(Ecore_X_Window_Type));
-   if (!atoms2) return 0;
+   if (!atoms2)
+      return 0;
+
    for (i = 0; i < num; i++)
-     atoms2[i] = _ecore_x_netwm_window_type_type_get(atoms[i]);
-   free(atoms);
-   if (types) *types = atoms2;
-   else free(atoms2);
+      atoms2[i] = _ecore_x_netwm_window_type_type_get(atoms[i]);
+           free(atoms);
+   if (types)
+      *types = atoms2;
+   else
+           free(atoms2);
+
    return num;
 }
 
@@ -951,31 +1145,43 @@ _ecore_x_netwm_action_atom_get(Ecore_X_Action action)
    switch (action)
      {
       case ECORE_X_ACTION_MOVE:
-        return ECORE_X_ATOM_NET_WM_ACTION_MOVE;
+         return ECORE_X_ATOM_NET_WM_ACTION_MOVE;
+
       case ECORE_X_ACTION_RESIZE:
-        return ECORE_X_ATOM_NET_WM_ACTION_RESIZE;
+         return ECORE_X_ATOM_NET_WM_ACTION_RESIZE;
+
       case ECORE_X_ACTION_MINIMIZE:
-        return ECORE_X_ATOM_NET_WM_ACTION_MINIMIZE;
+         return ECORE_X_ATOM_NET_WM_ACTION_MINIMIZE;
+
       case ECORE_X_ACTION_SHADE:
-        return ECORE_X_ATOM_NET_WM_ACTION_SHADE;
+         return ECORE_X_ATOM_NET_WM_ACTION_SHADE;
+
       case ECORE_X_ACTION_STICK:
-        return ECORE_X_ATOM_NET_WM_ACTION_STICK;
+         return ECORE_X_ATOM_NET_WM_ACTION_STICK;
+
       case ECORE_X_ACTION_MAXIMIZE_HORZ:
-        return ECORE_X_ATOM_NET_WM_ACTION_MAXIMIZE_HORZ;
+         return ECORE_X_ATOM_NET_WM_ACTION_MAXIMIZE_HORZ;
+
       case ECORE_X_ACTION_MAXIMIZE_VERT:
-        return ECORE_X_ATOM_NET_WM_ACTION_MAXIMIZE_VERT;
+         return ECORE_X_ATOM_NET_WM_ACTION_MAXIMIZE_VERT;
+
       case ECORE_X_ACTION_FULLSCREEN:
-        return ECORE_X_ATOM_NET_WM_ACTION_FULLSCREEN;
+         return ECORE_X_ATOM_NET_WM_ACTION_FULLSCREEN;
+
       case ECORE_X_ACTION_CHANGE_DESKTOP:
-        return ECORE_X_ATOM_NET_WM_ACTION_CHANGE_DESKTOP;
+         return ECORE_X_ATOM_NET_WM_ACTION_CHANGE_DESKTOP;
+
       case ECORE_X_ACTION_CLOSE:
-        return ECORE_X_ATOM_NET_WM_ACTION_CLOSE;
+         return ECORE_X_ATOM_NET_WM_ACTION_CLOSE;
+
       case ECORE_X_ACTION_ABOVE:
-        return ECORE_X_ATOM_NET_WM_ACTION_ABOVE;
+         return ECORE_X_ATOM_NET_WM_ACTION_ABOVE;
+
       case ECORE_X_ACTION_BELOW:
-        return ECORE_X_ATOM_NET_WM_ACTION_BELOW;
+         return ECORE_X_ATOM_NET_WM_ACTION_BELOW;
+
       default:
-        return 0;
+         return 0;
      }
 }
 
@@ -988,19 +1194,19 @@ ecore_x_netwm_allowed_action_isset(Ecore_X_Window win, Ecore_X_Action action)
 
    LOGFN(__FILE__, __LINE__, __FUNCTION__);
    num = ecore_x_window_prop_atom_list_get(win, ECORE_X_ATOM_NET_WM_WINDOW_TYPE,
-                                          &atoms);
+                                           &atoms);
    if (num <= 0)
-     return ret;
+      return ret;
 
    atom = _ecore_x_netwm_action_atom_get(action);
 
    for (i = 0; i < num; ++i)
      {
-       if (atom == atoms[i])
-         {
-            ret = 1;
-            break;
-         }
+        if (atom == atoms[i])
+          {
+             ret = 1;
+             break;
+          }
      }
 
    free(atoms);
@@ -1009,7 +1215,9 @@ ecore_x_netwm_allowed_action_isset(Ecore_X_Window win, Ecore_X_Action action)
 
 /* FIXME: Set complete list */
 EAPI void
-ecore_x_netwm_allowed_action_set(Ecore_X_Window win, Ecore_X_Action *action, unsigned int num)
+ecore_x_netwm_allowed_action_set(Ecore_X_Window win,
+                                 Ecore_X_Action *action,
+                                 unsigned int num)
 {
    Ecore_X_Atom *set;
    unsigned int i;
@@ -1017,44 +1225,57 @@ ecore_x_netwm_allowed_action_set(Ecore_X_Window win, Ecore_X_Action *action, uns
    LOGFN(__FILE__, __LINE__, __FUNCTION__);
    if (!num)
      {
-       ecore_x_window_prop_property_del(win, ECORE_X_ATOM_NET_WM_ALLOWED_ACTIONS);
-       return;
+        ecore_x_window_prop_property_del(win,
+                                         ECORE_X_ATOM_NET_WM_ALLOWED_ACTIONS);
+        return;
      }
 
    set = malloc(num * sizeof(Ecore_X_Atom));
-   if (!set) return;
+   if (!set)
+      return;
 
    for (i = 0; i < num; i++)
-     set[i] = _ecore_x_netwm_action_atom_get(action[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);
+   ecore_x_window_prop_atom_set(win,
+                                ECORE_X_ATOM_NET_WM_ALLOWED_ACTIONS,
+                                set,
+                                num);
 
    free(set);
 }
 
 EAPI int
-ecore_x_netwm_allowed_action_get(Ecore_X_Window win, Ecore_X_Action **action, unsigned int *num)
+ecore_x_netwm_allowed_action_get(Ecore_X_Window win,
+                                 Ecore_X_Action **action,
+                                 unsigned int *num)
 {
    int num_ret, i;
    Ecore_X_Atom *atoms;
 
    LOGFN(__FILE__, __LINE__, __FUNCTION__);
-   if (num) *num = 0;
-   if (action) *action = NULL;
+   if (num)
+      *num = 0;
+
+   if (action)
+      *action = NULL;
 
-   num_ret = ecore_x_window_prop_atom_list_get(win, ECORE_X_ATOM_NET_WM_ALLOWED_ACTIONS,
-                                              &atoms);
+   num_ret = ecore_x_window_prop_atom_list_get(
+         win,
+         ECORE_X_ATOM_NET_WM_ALLOWED_ACTIONS,
+         &atoms);
    if (num_ret <= 0)
       return 0;
 
    if (action)
      {
-       *action = malloc(num_ret * sizeof(Ecore_X_Action));
-       if (*action)
-         for (i = 0; i < num_ret; ++i)
-           (*action)[i] = _ecore_x_netwm_action_atom_get(atoms[i]);
+        *action = malloc(num_ret * sizeof(Ecore_X_Action));
+        if (*action)
+           for (i = 0; i < num_ret; ++i)
+              (*action)[i] = _ecore_x_netwm_action_atom_get(atoms[i]);
 
-       if (num) *num = num_ret;
+        if (num)
+           *num = num_ret;
      }
 
    free(atoms);
@@ -1066,7 +1287,7 @@ ecore_x_netwm_opacity_set(Ecore_X_Window win, unsigned int opacity)
 {
    LOGFN(__FILE__, __LINE__, __FUNCTION__);
    ecore_x_window_prop_card32_set(win, ECORE_X_ATOM_NET_WM_WINDOW_OPACITY,
-                                 &opacity, 1);
+                                  &opacity, 1);
 }
 
 EAPI int
@@ -1077,8 +1298,10 @@ ecore_x_netwm_opacity_get(Ecore_X_Window win, unsigned int *opacity)
 
    LOGFN(__FILE__, __LINE__, __FUNCTION__);
    ret = ecore_x_window_prop_card32_get(win, ECORE_X_ATOM_NET_WM_WINDOW_OPACITY,
-                                       &tmp, 1);
-   if (opacity) *opacity = tmp;
+                                        &tmp, 1);
+   if (opacity)
+      *opacity = tmp;
+
    return ret == 1 ? 1 : 0;
 }
 
@@ -1092,38 +1315,62 @@ ecore_x_netwm_frame_size_set(Ecore_X_Window win, int fl, int fr, int ft, int fb)
    frames[1] = fr;
    frames[2] = ft;
    frames[3] = fb;
-   ecore_x_window_prop_card32_set(win, ECORE_X_ATOM_NET_FRAME_EXTENTS, frames, 4);
+   ecore_x_window_prop_card32_set(win,
+                                  ECORE_X_ATOM_NET_FRAME_EXTENTS,
+                                  frames,
+                                  4);
 }
 
 EAPI int
-ecore_x_netwm_frame_size_get(Ecore_X_Window win, int *fl, int *fr, int *ft, int *fb)
+ecore_x_netwm_frame_size_get(Ecore_X_Window win,
+                             int *fl,
+                             int *fr,
+                             int *ft,
+                             int *fb)
 {
    int ret = 0;
    unsigned int frames[4];
 
    LOGFN(__FILE__, __LINE__, __FUNCTION__);
-   ret = ecore_x_window_prop_card32_get(win, ECORE_X_ATOM_NET_FRAME_EXTENTS, frames, 4);
+   ret = ecore_x_window_prop_card32_get(win,
+                                        ECORE_X_ATOM_NET_FRAME_EXTENTS,
+                                        frames,
+                                        4);
    if (ret != 4)
-     return 0;
+      return 0;
+
+   if (fl)
+      *fl = frames[0];
+
+   if (fr)
+      *fr = frames[1];
+
+   if (ft)
+      *ft = frames[2];
+
+   if (fb)
+      *fb = frames[3];
 
-   if (fl) *fl = frames[0];
-   if (fr) *fr = frames[1];
-   if (ft) *ft = frames[2];
-   if (fb) *fb = frames[3];
    return 1;
 }
 
 EAPI int
-ecore_x_netwm_sync_counter_get(Ecore_X_Window win, Ecore_X_Sync_Counter *counter)
+ecore_x_netwm_sync_counter_get(Ecore_X_Window win,
+                               Ecore_X_Sync_Counter *counter)
 {
    int ret;
    unsigned int tmp;
 
    LOGFN(__FILE__, __LINE__, __FUNCTION__);
-   ret = ecore_x_window_prop_card32_get(win, ECORE_X_ATOM_NET_WM_SYNC_REQUEST_COUNTER,
-                                       &tmp, 1);
+   ret = ecore_x_window_prop_card32_get(
+         win,
+         ECORE_X_ATOM_NET_WM_SYNC_REQUEST_COUNTER,
+         &tmp,
+         1);
+
+   if (counter)
+      *counter = tmp;
 
-   if (counter) *counter = tmp;
    return ret == 1 ? 1 : 0;
 }
 
@@ -1132,7 +1379,8 @@ ecore_x_netwm_ping_send(Ecore_X_Window win)
 {
    XEvent xev;
 
-   if (!win) return;
+   if (!win)
+      return;
 
    LOGFN(__FILE__, __LINE__, __FUNCTION__);
    xev.xclient.type = ClientMessage;
@@ -1155,7 +1403,8 @@ ecore_x_netwm_sync_request_send(Ecore_X_Window win, unsigned int serial)
    XSyncValue value;
    XEvent xev;
 
-   if (!win) return;
+   if (!win)
+      return;
 
    LOGFN(__FILE__, __LINE__, __FUNCTION__);
    XSyncIntToValue(&value, (int)serial);
@@ -1175,15 +1424,20 @@ ecore_x_netwm_sync_request_send(Ecore_X_Window win, unsigned int serial)
 }
 
 EAPI void
-ecore_x_netwm_state_request_send(Ecore_X_Window win, Ecore_X_Window root,
-                                Ecore_X_Window_State s1, Ecore_X_Window_State s2, int set)
+ecore_x_netwm_state_request_send(Ecore_X_Window win,
+                                 Ecore_X_Window root,
+                                 Ecore_X_Window_State s1,
+                                 Ecore_X_Window_State s2,
+                                 int set)
 {
    XEvent xev;
 
-   if (!win) return;
-   
+   if (!win)
+      return;
+
    LOGFN(__FILE__, __LINE__, __FUNCTION__);
-   if (!root) root = DefaultRootWindow(_ecore_x_disp);
+   if (!root)
+      root = DefaultRootWindow(_ecore_x_disp);
 
    xev.xclient.type = ClientMessage;
    xev.xclient.serial = 0;
@@ -1201,18 +1455,22 @@ ecore_x_netwm_state_request_send(Ecore_X_Window win, Ecore_X_Window root,
    xev.xclient.data.l[4] = 0;
 
    XSendEvent(_ecore_x_disp, root, False,
-             SubstructureNotifyMask | SubstructureRedirectMask, &xev);
+              SubstructureNotifyMask | SubstructureRedirectMask, &xev);
 }
 
 EAPI void
-ecore_x_netwm_desktop_request_send(Ecore_X_Window win, Ecore_X_Window root, unsigned int desktop)
+ecore_x_netwm_desktop_request_send(Ecore_X_Window win,
+                                   Ecore_X_Window root,
+                                   unsigned int desktop)
 {
    XEvent xev;
 
-   if (!win) return;
-   
+   if (!win)
+      return;
+
    LOGFN(__FILE__, __LINE__, __FUNCTION__);
-   if (!root) root = DefaultRootWindow(_ecore_x_disp);
+   if (!root)
+      root = DefaultRootWindow(_ecore_x_disp);
 
    xev.xclient.type = ClientMessage;
    xev.xclient.serial = 0;
@@ -1224,81 +1482,93 @@ ecore_x_netwm_desktop_request_send(Ecore_X_Window win, Ecore_X_Window root, unsi
    xev.xclient.data.l[0] = desktop;
 
    XSendEvent(_ecore_x_disp, root, False,
-             SubstructureNotifyMask | SubstructureRedirectMask, &xev);
+              SubstructureNotifyMask | SubstructureRedirectMask, &xev);
 }
 
 int
-_ecore_x_netwm_startup_info_begin(Ecore_X_Window win __UNUSED__, char *data __UNUSED__)
+_ecore_x_netwm_startup_info_begin(Ecore_X_Window win __UNUSED__,
+                                  char *data __UNUSED__)
 {
 #if 0
    Ecore_X_Startup_Info *info;
-   unsigned char       *exists = 0;
+   unsigned char *exists = 0;
+
+   if (!startup_info)
+      return 0;
 
-   if (!startup_info) return 0;
    info = eina_hash_find(startup_info, (void *)win);
    if (info)
      {
         exists = 1;
-       WRN("Already got info for win: 0x%x", win);
-       _ecore_x_netwm_startup_info_free(info);
+        WRN("Already got info for win: 0x%x", win);
+        _ecore_x_netwm_startup_info_free(info);
      }
+
    info = calloc(1, sizeof(Ecore_X_Startup_Info));
-   if (!info) return 0;
+   if (!info)
+      return 0;
+
    info->win = win;
    info->length = 0;
    info->buffer_size = 161;
    info->buffer = calloc(info->buffer_size, sizeof(char));
    if (!info->buffer)
      {
-       _ecore_x_netwm_startup_info_free(info);
-       return 0;
+        _ecore_x_netwm_startup_info_free(info);
+        return 0;
      }
+
    memcpy(info->buffer, data, 20);
    info->length += 20;
    info->buffer[info->length] = 0;
    if (exists)
-     eina_hash_modify(startup_info, (void *)info->win, info);
+      eina_hash_modify(startup_info, (void *)info->win, info);
    else
-     eina_hash_add(startup_info, (void *)info->win, info);
+      eina_hash_add(startup_info, (void *)info->win, info);
+
    if (strlen(info->buffer) != 20)
-     {
-       /* We have a '\0' in there, the message is done */
-       _ecore_x_netwm_startup_info_process(info);
-     }
+      /* We have a '\0' in there, the message is done */
+      _ecore_x_netwm_startup_info_process(info);
+
 #endif
    return 1;
 }
 
 int
-_ecore_x_netwm_startup_info(Ecore_X_Window win __UNUSED__, char *data __UNUSED__)
+_ecore_x_netwm_startup_info(Ecore_X_Window win __UNUSED__,
+                            char *data __UNUSED__)
 {
 #if 0
    Ecore_X_Startup_Info *info;
    char *p;
 
-   if (!startup_info) return 0;
+   if (!startup_info)
+      return 0;
+
    info = eina_hash_find(startup_info, (void *)win);
-   if (!info) return 0;
+   if (!info)
+      return 0;
+
    if ((info->length + 20) > info->buffer_size)
      {
-       info->buffer_size += 160;
-       info->buffer = realloc(info->buffer, info->buffer_size * sizeof(char));
-       if (!info->buffer)
-         {
-            eina_hash_del(startup_info, (void *)info->win);
-            _ecore_x_netwm_startup_info_free(info);
-            return 0;
-         }
+        info->buffer_size += 160;
+        info->buffer = realloc(info->buffer, info->buffer_size * sizeof(char));
+        if (!info->buffer)
+          {
+             eina_hash_del(startup_info, (void *)info->win);
+             _ecore_x_netwm_startup_info_free(info);
+             return 0;
+          }
      }
+
    memcpy(info->buffer + info->length, data, 20);
    p = info->buffer + info->length;
    info->length += 20;
    info->buffer[info->length] = 0;
    if (strlen(p) != 20)
-     {
-       /* We have a '\0' in there, the message is done */
-       _ecore_x_netwm_startup_info_process(info);
-     }
+      /* We have a '\0' in there, the message is done */
+      _ecore_x_netwm_startup_info_process(info);
+
 #endif
    return 1;
 }
@@ -1308,10 +1578,10 @@ _ecore_x_netwm_startup_info(Ecore_X_Window win __UNUSED__, char *data __UNUSED__
  */
 static void
 _ecore_x_window_prop_string_utf8_set(Ecore_X_Window win, Ecore_X_Atom atom,
-                                    const char *str)
+                                     const char *str)
 {
    XChangeProperty(_ecore_x_disp, win, atom, ECORE_X_ATOM_UTF8_STRING, 8,
-                  PropModeReplace, (unsigned char *)str, strlen(str));
+                   PropModeReplace, (unsigned char *)str, strlen(str));
 }
 
 /*
@@ -1329,17 +1599,18 @@ _ecore_x_window_prop_string_utf8_get(Ecore_X_Window win, Ecore_X_Atom atom)
    str = 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_ret);
+                      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_ret, num_ret);
-            str[num_ret] = '\0';
-         }
+        str = malloc(num_ret + 1);
+        if (str)
+          {
+             memcpy(str, prop_ret, num_ret);
+             str[num_ret] = '\0';
+          }
      }
+
    if (prop_ret)
       XFree(prop_ret);
 
@@ -1360,65 +1631,67 @@ _ecore_x_netwm_startup_info_process(Ecore_X_Startup_Info *info)
    p = strchr(info->buffer, ':');
    if (!p)
      {
-       eina_hash_del(startup_info, (void *)info->win);
-       _ecore_x_netwm_startup_info_free(info);
-       return 0;
+        eina_hash_del(startup_info, (void *)info->win);
+        _ecore_x_netwm_startup_info_free(info);
+        return 0;
      }
+
    *p = 0;
    if (!strcmp(info->buffer, "new"))
      {
-       if (info->init)
-         event = ECORE_X_EVENT_STARTUP_SEQUENCE_CHANGE;
-       else
-         event = ECORE_X_EVENT_STARTUP_SEQUENCE_NEW;
-       info->init = 1;
+        if (info->init)
+           event = ECORE_X_EVENT_STARTUP_SEQUENCE_CHANGE;
+        else
+           event = ECORE_X_EVENT_STARTUP_SEQUENCE_NEW;
+
+        info->init = 1;
      }
    else if (!strcmp(info->buffer, "change"))
-     {
-       event = ECORE_X_EVENT_STARTUP_SEQUENCE_CHANGE;
-     }
+      event = ECORE_X_EVENT_STARTUP_SEQUENCE_CHANGE;
    else if (!strcmp(info->buffer, "remove"))
-     event = ECORE_X_EVENT_STARTUP_SEQUENCE_REMOVE;
+      event = ECORE_X_EVENT_STARTUP_SEQUENCE_REMOVE;
    else
      {
-       eina_hash_del(startup_info, (void *)info->win);
-       _ecore_x_netwm_startup_info_free(info);
-       return 0;
+        eina_hash_del(startup_info, (void *)info->win);
+        _ecore_x_netwm_startup_info_free(info);
+        return 0;
      }
 
    p++;
 
    if (!_ecore_x_netwm_startup_info_parse(info, p))
      {
-       eina_hash_del(startup_info, (void *)info->win);
-       _ecore_x_netwm_startup_info_free(info);
-       return 0;
+        eina_hash_del(startup_info, (void *)info->win);
+        _ecore_x_netwm_startup_info_free(info);
+        return 0;
      }
 
    if (info->init)
      {
-       e = calloc(1, sizeof(Ecore_X_Event_Startup_Sequence));
-       if (!e)
-         {
-            eina_hash_del(startup_info, (void *)info->win);
-            _ecore_x_netwm_startup_info_free(info);
-            return 0;
-         }
-       e->win = info->win;
-       ecore_event_add(event, e, NULL, NULL);
+        e = calloc(1, sizeof(Ecore_X_Event_Startup_Sequence));
+        if (!e)
+          {
+             eina_hash_del(startup_info, (void *)info->win);
+             _ecore_x_netwm_startup_info_free(info);
+             return 0;
+          }
+
+        e->win = info->win;
+        ecore_event_add(event, e, NULL, NULL);
      }
 
    if (event == ECORE_X_EVENT_STARTUP_SEQUENCE_REMOVE)
      {
-       eina_hash_del(startup_info, (void *)info->win);
-       _ecore_x_netwm_startup_info_free(info);
+        eina_hash_del(startup_info, (void *)info->win);
+        _ecore_x_netwm_startup_info_free(info);
      }
    else
      {
-       /* Discard buffer */
-       info->length = 0;
-       info->buffer[0] = 0;
+        /* Discard buffer */
+        info->length = 0;
+        info->buffer[0] = 0;
      }
+
    return 1;
 }
 
@@ -1430,142 +1703,151 @@ _ecore_x_netwm_startup_info_parse(Ecore_X_Startup_Info *info, char *data)
 {
    while (*data)
      {
-       int in_quot_sing, in_quot_dbl, escaped;
-       char *p, *pp;
-       char *key;
-       char value[1024];
-
-       /* Skip space */
-       while (*data == ' ') data++;
-       /* Get key */
-       key = data;
-       data = strchr(key, '=');
-       if (!data) return 0;
-       *data = 0;
-       data++;
-
-       /* Get value */
-       p = data;
-       pp = value;
-       in_quot_dbl = 0;
-       in_quot_sing = 0;
-       escaped = 0;
-       while (*p)
-         {
-            if ((pp - value) >= 1024) return 0;
-            if (escaped)
-              {
-                 *pp = *p;
-                 pp++;
-                 escaped = 0;
-              }
-            else if (in_quot_sing)
-              {
-                 if (*p == '\\')
-                   escaped = 1;
-                 else if (*p == '\'')
-                   in_quot_sing = 0;
-                 else
-                   {
-                      *pp = *p;
-                      pp++;
-                   }
-              }
-            else if (in_quot_dbl)
-              {
-                 if (*p == '\\')
-                   escaped = 1;
-                 else if (*p == '\"')
-                   in_quot_dbl = 0;
-                 else
-                   {
-                      *pp = *p;
-                      pp++;
-                   }
-              }
-            else
-              {
-                 if (*p == '\\')
-                   escaped = 1;
-                 else if (*p == '\'')
-                   in_quot_sing = 1;
-                 else if (*p == '\"')
-                   in_quot_dbl = 1;
-                 else if (*p == ' ')
-                   {
-                      break;
-                   }
-                 else
-                   {
-                      *pp = *p;
-                      pp++;
-                   }
-              }
-            p++;
-         }
-       if ((in_quot_dbl) || (in_quot_sing)) return 0;
-       data = p;
-       *pp = 0;
-
-       /* Parse info */
-       if (!strcmp(key, "ID"))
-         {
-            if ((info->id) && (strcmp(info->id, value))) return 0;
-            info->id = strdup(value);
-            p = strstr(value, "_TIME");
-            if (p)
-              {
-                 info->timestamp = atoi(p + 5);
-              }
-         }
-       else if (!strcmp(key, "NAME"))
-         {
-            if (info->name) free(info->name);
-            info->name = strdup(value);
-         }
-       else if (!strcmp(key, "SCREEN"))
-         {
-            info->screen = atoi(value);
-         }
-       else if (!strcmp(key, "BIN"))
-         {
-            if (info->bin) free(info->bin);
-            info->bin = strdup(value);
-         }
-       else if (!strcmp(key, "ICON"))
-         {
-            if (info->icon) free(info->icon);
-            info->icon = strdup(value);
-         }
-       else if (!strcmp(key, "DESKTOP"))
-         {
-            info->desktop = atoi(value);
-         }
-       else if (!strcmp(key, "TIMESTAMP"))
-         {
-            if (!info->timestamp)
-              info->timestamp = atoi(value);
-         }
-       else if (!strcmp(key, "DESCRIPTION"))
-         {
-            if (info->description) free(info->description);
-            info->description = strdup(value);
-         }
-       else if (!strcmp(key, "WMCLASS"))
-         {
-            if (info->wmclass) free(info->wmclass);
-            info->wmclass = strdup(value);
-         }
-       else if (!strcmp(key, "SILENT"))
-         {
-            info->silent = atoi(value);
-         }
-       else
-         {
-            ERR("Ecore X Sequence, Unknown: %s=%s", key, value);
-         }
+        int in_quot_sing, in_quot_dbl, escaped;
+        char *p, *pp;
+        char *key;
+        char value[1024];
+
+        /* Skip space */
+        while (*data == ' ') data++;
+        /* Get key */
+        key = data;
+        data = strchr(key, '=');
+        if (!data)
+           return 0;
+
+        *data = 0;
+        data++;
+
+        /* Get value */
+        p = data;
+        pp = value;
+        in_quot_dbl = 0;
+        in_quot_sing = 0;
+        escaped = 0;
+        while (*p)
+          {
+             if ((pp - value) >= 1024)
+                return 0;
+
+             if (escaped)
+               {
+                  *pp = *p;
+                  pp++;
+                  escaped = 0;
+               }
+             else if (in_quot_sing)
+               {
+                  if (*p == '\\')
+                     escaped = 1;
+                  else if (*p == '\'')
+                     in_quot_sing = 0;
+                  else
+                    {
+                       *pp = *p;
+                       pp++;
+                    }
+               }
+             else if (in_quot_dbl)
+               {
+                  if (*p == '\\')
+                     escaped = 1;
+                  else if (*p == '\"')
+                     in_quot_dbl = 0;
+                  else
+                    {
+                       *pp = *p;
+                       pp++;
+                    }
+               }
+             else
+               {
+                  if (*p == '\\')
+                     escaped = 1;
+                  else if (*p == '\'')
+                     in_quot_sing = 1;
+                  else if (*p == '\"')
+                     in_quot_dbl = 1;
+                  else if (*p == ' ')
+                     break;
+                  else
+                    {
+                       *pp = *p;
+                       pp++;
+                    }
+               }
+
+             p++;
+          }
+        if ((in_quot_dbl) || (in_quot_sing))
+           return 0;
+
+        data = p;
+        *pp = 0;
+
+        /* Parse info */
+        if (!strcmp(key, "ID"))
+          {
+             if ((info->id) && (strcmp(info->id, value)))
+                return 0;
+
+             info->id = strdup(value);
+             p = strstr(value, "_TIME");
+             if (p)
+                info->timestamp = atoi(p + 5);
+          }
+        else if (!strcmp(key, "NAME"))
+          {
+             if (info->name)
+                free(info->name);
+
+             info->name = strdup(value);
+          }
+        else if (!strcmp(key, "SCREEN"))
+           info->screen = atoi(value);
+        else if (!strcmp(key, "BIN"))
+          {
+             if (info->bin)
+                free(info->bin);
+
+             info->bin = strdup(value);
+          }
+        else if (!strcmp(key, "ICON"))
+          {
+             if (info->icon)
+                free(info->icon);
+
+             info->icon = strdup(value);
+          }
+        else if (!strcmp(key, "DESKTOP"))
+           info->desktop = atoi(value);
+        else if (!strcmp(key, "TIMESTAMP"))
+          {
+             if (!info->timestamp)
+                info->timestamp = atoi(value);
+          }
+        else if (!strcmp(key, "DESCRIPTION"))
+          {
+             if (info->description)
+                free(info->description);
+
+             info->description = strdup(value);
+          }
+        else if (!strcmp(key, "WMCLASS"))
+          {
+             if (info->wmclass)
+                free(info->wmclass);
+
+             info->wmclass = strdup(value);
+          }
+        else if (!strcmp(key, "SILENT"))
+           info->silent = atoi(value);
+        else
+           ERR("Ecore X Sequence, Unknown: %s=%s", key, value);
      }
-   if (!info->id) return 0;
+   if (!info->id)
+      return 0;
+
    return 1;
 }
 #endif
@@ -1579,15 +1861,31 @@ _ecore_x_netwm_startup_info_free(void *data)
    Ecore_X_Startup_Info *info;
 
    info = data;
-   if (!info) return;
-   if (info->buffer) free(info->buffer);
-   if (info->id) free(info->id);
-   if (info->name) free(info->name);
-   if (info->bin) free(info->bin);
-   if (info->icon) free(info->icon);
-   if (info->description) free(info->description);
-   if (info->wmclass) free(info->wmclass);
-   free(info);
+   if (!info)
+      return;
+
+   if (info->buffer)
+      free(info->buffer);
+
+   if (info->id)
+      free(info->id);
+
+   if (info->name)
+      free(info->name);
+
+   if (info->bin)
+      free(info->bin);
+
+   if (info->icon)
+      free(info->icon);
+
+   if (info->description)
+      free(info->description);
+
+   if (info->wmclass)
+      free(info->wmclass);
+
+      free(info);
 }
 
 /*
@@ -1602,8 +1900,11 @@ ecore_x_screen_is_composited(int screen)
 
    LOGFN(__FILE__, __LINE__, __FUNCTION__);
    snprintf(buf, sizeof(buf), "_NET_WM_CM_S%i", screen);
-   if (atom == None) atom = XInternAtom(_ecore_x_disp, buf, False);
-   if (atom == None) return 0;
+   if (atom == None)
+      atom = XInternAtom(_ecore_x_disp, buf, False);
+
+   if (atom == None)
+      return 0;
 
    win = XGetSelectionOwner(_ecore_x_disp, atom);
 
@@ -1618,7 +1919,11 @@ ecore_x_screen_is_composited_set(int screen, Ecore_X_Window win)
 
    LOGFN(__FILE__, __LINE__, __FUNCTION__);
    snprintf(buf, sizeof(buf), "_NET_WM_CM_S%i", screen);
-   if (atom == None) atom = XInternAtom(_ecore_x_disp, buf, False);
-   if (atom == None) return;
+   if (atom == None)
+      atom = XInternAtom(_ecore_x_disp, buf, False);
+
+   if (atom == None)
+      return;
+
    XSetSelectionOwner(_ecore_x_disp, atom, win, _ecore_x_event_last_time);
 }
index 5c69770..64b7f51 100644 (file)
@@ -32,8 +32,12 @@ EAPI Ecore_X_Pixmap
 ecore_x_pixmap_new(Ecore_X_Window win, int w, int h, int dep)
 {
    LOGFN(__FILE__, __LINE__, __FUNCTION__);
-   if (win == 0) win = DefaultRootWindow(_ecore_x_disp);
-   if (dep == 0) dep = DefaultDepth(_ecore_x_disp, DefaultScreen(_ecore_x_disp));
+   if (win == 0)
+      win = DefaultRootWindow(_ecore_x_disp);
+
+   if (dep == 0)
+      dep = DefaultDepth(_ecore_x_disp, DefaultScreen(_ecore_x_disp));
+
    return XCreatePixmap(_ecore_x_disp, win, w, h, dep);
 }
 
@@ -68,9 +72,9 @@ ecore_x_pixmap_free(Ecore_X_Pixmap pmap)
  * @ingroup Ecore_X_Pixmap_Group
  */
 EAPI void
-ecore_x_pixmap_paste(Ecore_X_Pixmap pmap, Ecore_X_Drawable dest, 
-                    Ecore_X_GC gc, int sx, int sy, 
-                    int w, int h, int dx, int dy)
+ecore_x_pixmap_paste(Ecore_X_Pixmap pmap, Ecore_X_Drawable dest,
+                     Ecore_X_GC gc, int sx, int sy,
+                     int w, int h, int dx, int dy)
 {
    LOGFN(__FILE__, __LINE__, __FUNCTION__);
    XCopyArea(_ecore_x_disp, pmap, dest, gc, sx, sy, w, h, dx, dy);
@@ -89,7 +93,8 @@ EAPI void
 ecore_x_pixmap_geometry_get(Ecore_X_Pixmap pmap, int *x, int *y, int *w, int *h)
 {
    LOGFN(__FILE__, __LINE__, __FUNCTION__);
-   if (pmap) ecore_x_drawable_geometry_get(pmap, x, y, w, h);
+   if (pmap)
+      ecore_x_drawable_geometry_get(pmap, x, y, w, h);
 }
 
 /**
index 17b74a0..547cac1 100644 (file)
@@ -94,11 +94,11 @@ typedef struct _Ecore_X_Selection_Intern Ecore_X_Selection_Intern;
 
 struct _Ecore_X_Selection_Intern
 {
-   Ecore_X_Window    win;
-   Ecore_X_Atom      selection;
-   unsigned char     *data;
-   int               length;
-   Time              time;
+   Ecore_X_Window win;
+   Ecore_X_Atom selection;
+   unsigned char *data;
+   int length;
+   Time time;
 };
 
 typedef struct _Ecore_X_Selection_Converter Ecore_X_Selection_Converter;
@@ -108,7 +108,7 @@ struct _Ecore_X_Selection_Converter
    Ecore_X_Atom target;
    int (*convert)(char *target, void *data, int size,
                   void **data_ret, int *size_ret,
-                 Ecore_X_Atom *type, int *typeseize);
+                  Ecore_X_Atom *type, int *typeseize);
    Ecore_X_Selection_Converter *next;
 };
 
@@ -116,16 +116,16 @@ typedef struct _Ecore_X_Selection_Parser Ecore_X_Selection_Parser;
 
 struct _Ecore_X_Selection_Parser
 {
-   char     *target;
+   char *target;
    void *(*parse)(const char *target, void *data, int size, int format);
    Ecore_X_Selection_Parser *next;
 };
 
-typedef struct _Ecore_X_DND_Source 
+typedef struct _Ecore_X_DND_Source
 {
    int version;
    Ecore_X_Window win, dest;
-   
+
    enum {
       ECORE_X_DND_SOURCE_IDLE,
       ECORE_X_DND_SOURCE_DRAGGING,
@@ -133,12 +133,14 @@ typedef struct _Ecore_X_DND_Source
       ECORE_X_DND_SOURCE_CONVERTING
    } state;
 
-   struct {
+   struct
+   {
       short x, y;
       unsigned short width, height;
    } rectangle;
 
-   struct {
+   struct
+   {
       Ecore_X_Window window;
       int x, y;
    } prev;
@@ -146,31 +148,32 @@ typedef struct _Ecore_X_DND_Source
    Time time;
 
    Ecore_X_Atom action, accepted_action;
-   
+
    int will_accept;
    int suppress;
 
    int await_status;
 } Ecore_X_DND_Source;
 
-typedef struct _Ecore_X_DND_Target 
+typedef struct _Ecore_X_DND_Target
 {
    int version;
    Ecore_X_Window win, source;
-   
+
    enum {
       ECORE_X_DND_TARGET_IDLE,
       ECORE_X_DND_TARGET_ENTERED
    } state;
 
-   struct {
+   struct
+   {
       int x, y;
    } pos;
-   
+
    Time time;
 
    Ecore_X_Atom action, accepted_action;
-   
+
    int will_accept;
 } Ecore_X_DND_Target;
 
@@ -185,118 +188,175 @@ extern int ECORE_X_LOCK_NUM;
 extern int ECORE_X_LOCK_CAPS;
 
 extern Display *_ecore_x_disp;
-extern double   _ecore_x_double_click_time;
-extern Time     _ecore_x_event_last_time;
-extern Window   _ecore_x_event_last_win;
-extern int      _ecore_x_event_last_root_x;
-extern int      _ecore_x_event_last_root_y;
-extern int      _ecore_x_xcursor;
-extern XIC      _ecore_x_ic;
-
-extern Ecore_X_Atom     _ecore_x_atoms_wm_protocols[ECORE_X_WM_PROTOCOL_NUM];
-
-extern int      _ecore_window_grabs_num;
-extern Window  *_ecore_window_grabs;
-extern Eina_Bool (*_ecore_window_grab_replay_func) (void *data, int event_type, void *event);
-extern void    *_ecore_window_grab_replay_data;
+extern double _ecore_x_double_click_time;
+extern Time _ecore_x_event_last_time;
+extern Window _ecore_x_event_last_win;
+extern int _ecore_x_event_last_root_x;
+extern int _ecore_x_event_last_root_y;
+extern int _ecore_x_xcursor;
+extern XIC _ecore_x_ic;
+
+extern Ecore_X_Atom _ecore_x_atoms_wm_protocols[ECORE_X_WM_PROTOCOL_NUM];
+
+extern int _ecore_window_grabs_num;
+extern Window *_ecore_window_grabs;
+extern Eina_Bool (*_ecore_window_grab_replay_func)(void *data, int event_type,
+                                                   void *event);
+extern void *_ecore_window_grab_replay_data;
 
 extern Ecore_X_Window _ecore_x_private_win;
 
-void _ecore_x_error_handler_init(void);
-void _ecore_x_event_handle_any_event(XEvent *xevent);
-void _ecore_x_event_handle_key_press(XEvent *xevent);
-void _ecore_x_event_handle_key_release(XEvent *xevent);
-void _ecore_x_event_handle_button_press(XEvent *xevent);
-void _ecore_x_event_handle_button_release(XEvent *xevent);
-void _ecore_x_event_handle_motion_notify(XEvent *xevent);
-void _ecore_x_event_handle_enter_notify(XEvent *xevent);
-void _ecore_x_event_handle_leave_notify(XEvent *xevent);
-void _ecore_x_event_handle_focus_in(XEvent *xevent);
-void _ecore_x_event_handle_focus_out(XEvent *xevent);
-void _ecore_x_event_handle_keymap_notify(XEvent *xevent);    
-void _ecore_x_event_handle_expose(XEvent *xevent);
-void _ecore_x_event_handle_graphics_expose(XEvent *xevent);
-void _ecore_x_event_handle_visibility_notify(XEvent *xevent);
-void _ecore_x_event_handle_create_notify(XEvent *xevent);
-void _ecore_x_event_handle_destroy_notify(XEvent *xevent);
-void _ecore_x_event_handle_unmap_notify(XEvent *xevent);
-void _ecore_x_event_handle_map_notify(XEvent *xevent);
-void _ecore_x_event_handle_map_request(XEvent *xevent);
-void _ecore_x_event_handle_reparent_notify(XEvent *xevent);
-void _ecore_x_event_handle_configure_notify(XEvent *xevent);
-void _ecore_x_event_handle_configure_request(XEvent *xevent);
-void _ecore_x_event_handle_gravity_notify(XEvent *xevent);
-void _ecore_x_event_handle_resize_request(XEvent *xevent);
-void _ecore_x_event_handle_circulate_notify(XEvent *xevent);
-void _ecore_x_event_handle_circulate_request(XEvent *xevent);
-void _ecore_x_event_handle_property_notify(XEvent *xevent);
-void _ecore_x_event_handle_selection_clear(XEvent *xevent);
-void _ecore_x_event_handle_selection_request(XEvent *xevent);
-void _ecore_x_event_handle_selection_notify(XEvent *xevent);
-void _ecore_x_event_handle_colormap_notify(XEvent *xevent);
-void _ecore_x_event_handle_client_message(XEvent *xevent);
-void _ecore_x_event_handle_mapping_notify(XEvent *xevent);
-void _ecore_x_event_handle_shape_change(XEvent *xevent);
-void _ecore_x_event_handle_screensaver_notify(XEvent *xevent);
-void _ecore_x_event_handle_sync_counter(XEvent *xevent);
-void _ecore_x_event_handle_sync_alarm(XEvent *xevent);
+void                 _ecore_x_error_handler_init(void);
+void                 _ecore_x_event_handle_any_event(XEvent *xevent);
+void                 _ecore_x_event_handle_key_press(XEvent *xevent);
+void                 _ecore_x_event_handle_key_release(XEvent *xevent);
+void                 _ecore_x_event_handle_button_press(XEvent *xevent);
+void                 _ecore_x_event_handle_button_release(XEvent *xevent);
+void                 _ecore_x_event_handle_motion_notify(XEvent *xevent);
+void                 _ecore_x_event_handle_enter_notify(XEvent *xevent);
+void                 _ecore_x_event_handle_leave_notify(XEvent *xevent);
+void                 _ecore_x_event_handle_focus_in(XEvent *xevent);
+void                 _ecore_x_event_handle_focus_out(XEvent *xevent);
+void                 _ecore_x_event_handle_keymap_notify(XEvent *xevent);
+void                 _ecore_x_event_handle_expose(XEvent *xevent);
+void                 _ecore_x_event_handle_graphics_expose(XEvent *xevent);
+void                 _ecore_x_event_handle_visibility_notify(
+   XEvent *xevent);
+void                 _ecore_x_event_handle_create_notify(XEvent *xevent);
+void                 _ecore_x_event_handle_destroy_notify(XEvent *xevent);
+void                 _ecore_x_event_handle_unmap_notify(XEvent *xevent);
+void                 _ecore_x_event_handle_map_notify(XEvent *xevent);
+void                 _ecore_x_event_handle_map_request(XEvent *xevent);
+void                 _ecore_x_event_handle_reparent_notify(XEvent *xevent);
+void                 _ecore_x_event_handle_configure_notify(XEvent *xevent);
+void                 _ecore_x_event_handle_configure_request(
+   XEvent *xevent);
+void                 _ecore_x_event_handle_gravity_notify(XEvent *xevent);
+void                 _ecore_x_event_handle_resize_request(XEvent *xevent);
+void                 _ecore_x_event_handle_circulate_notify(XEvent *xevent);
+void                 _ecore_x_event_handle_circulate_request(
+   XEvent *xevent);
+void                 _ecore_x_event_handle_property_notify(XEvent *xevent);
+void                 _ecore_x_event_handle_selection_clear(XEvent *xevent);
+void                 _ecore_x_event_handle_selection_request(
+   XEvent *xevent);
+void                 _ecore_x_event_handle_selection_notify(XEvent *xevent);
+void                 _ecore_x_event_handle_colormap_notify(XEvent *xevent);
+void                 _ecore_x_event_handle_client_message(XEvent *xevent);
+void                 _ecore_x_event_handle_mapping_notify(XEvent *xevent);
+void                 _ecore_x_event_handle_shape_change(XEvent *xevent);
+void                 _ecore_x_event_handle_screensaver_notify(
+   XEvent *xevent);
+void                 _ecore_x_event_handle_sync_counter(XEvent *xevent);
+void                 _ecore_x_event_handle_sync_alarm(XEvent *xevent);
 #ifdef ECORE_XRANDR
-void _ecore_x_event_handle_randr_change(XEvent *xevent);
-void _ecore_x_event_handle_randr_notify(XEvent *xevent);
+void                 _ecore_x_event_handle_randr_change(XEvent *xevent);
+void                 _ecore_x_event_handle_randr_notify(XEvent *xevent);
 #endif
 #ifdef ECORE_XFIXES
-void _ecore_x_event_handle_fixes_selection_notify(XEvent *xevent);
+void                 _ecore_x_event_handle_fixes_selection_notify(
+   XEvent *xevent);
 #endif
 #ifdef ECORE_XDAMAGE
-void _ecore_x_event_handle_damage_notify(XEvent *xevent);
+void                 _ecore_x_event_handle_damage_notify(XEvent *xevent);
 #endif
-void _ecore_x_event_handle_generic_event(XEvent *xevent);
+void                 _ecore_x_event_handle_generic_event(XEvent *xevent);
 
-void  _ecore_x_selection_data_init(void);
-void  _ecore_x_selection_shutdown(void);
+void                 _ecore_x_selection_data_init(void);
+void                 _ecore_x_selection_shutdown(void);
 Ecore_X_Atom
-      _ecore_x_selection_target_atom_get(const char *target);
-char *_ecore_x_selection_target_get(Ecore_X_Atom target);
-Ecore_X_Selection_Intern * 
-      _ecore_x_selection_get(Ecore_X_Atom selection);
-int   _ecore_x_selection_set(Window w, const void *data, int len, Ecore_X_Atom selection);
-int   _ecore_x_selection_convert(Ecore_X_Atom selection, Ecore_X_Atom target, void **data_ret, Ecore_X_Atom *targettype, int *targetsize);
-void *_ecore_x_selection_parse(const char *target, void *data, int size, int format);
-
-void _ecore_x_sync_magic_send(int val, Ecore_X_Window swin);
-void _ecore_x_window_grab_remove(Ecore_X_Window win);
-void _ecore_x_key_grab_remove(Ecore_X_Window win);
+                     _ecore_x_selection_target_atom_get(const char *target);
+char *               _ecore_x_selection_target_get(Ecore_X_Atom target);
+Ecore_X_Selection_Intern *
+                     _ecore_x_selection_get(Ecore_X_Atom selection);
+int                  _ecore_x_selection_set(Window w,
+                                                 const void *data,
+                                                 int len,
+                                                 Ecore_X_Atom selection);
+int                  _ecore_x_selection_convert(Ecore_X_Atom selection,
+                                                     Ecore_X_Atom target,
+                                                     void **data_ret,
+                                                     Ecore_X_Atom *targettype,
+                                                     int *targetsize);
+void *               _ecore_x_selection_parse(const char *target,
+                                                   void *data,
+                                                   int size,
+                                                   int format);
+
+void                 _ecore_x_sync_magic_send(int val, Ecore_X_Window swin);
+void                 _ecore_x_window_grab_remove(Ecore_X_Window win);
+void                 _ecore_x_key_grab_remove(Ecore_X_Window win);
 
 /* from dnd */
-void _ecore_x_dnd_init(void);
-Ecore_X_DND_Source *_ecore_x_dnd_source_get(void);
-Ecore_X_DND_Target *_ecore_x_dnd_target_get(void);
-void _ecore_x_dnd_drag(Ecore_X_Window root, int x, int y);
-void _ecore_x_dnd_shutdown(void);
+void                 _ecore_x_dnd_init(void);
+Ecore_X_DND_Source * _ecore_x_dnd_source_get(void);
+Ecore_X_DND_Target * _ecore_x_dnd_target_get(void);
+void                 _ecore_x_dnd_drag(Ecore_X_Window root, int x, int y);
+void                 _ecore_x_dnd_shutdown(void);
 
 /* from netwm */
 Ecore_X_Window_State _ecore_x_netwm_state_get(Ecore_X_Atom a);
-int                  _ecore_x_netwm_startup_info_begin(Ecore_X_Window win, char *data);
-int                  _ecore_x_netwm_startup_info(Ecore_X_Window win, char *data);
+int                  _ecore_x_netwm_startup_info_begin(Ecore_X_Window win,
+                                                            char *data);
+int                  _ecore_x_netwm_startup_info(Ecore_X_Window win,
+                                                      char *data);
 
 /* Fixes * Damage * Composite * DPMS */
-void _ecore_x_fixes_init(void);
-void _ecore_x_damage_init(void);
-void _ecore_x_composite_init(void);
-void _ecore_x_dpms_init(void);
-void _ecore_x_randr_init(void);
+void                 _ecore_x_fixes_init(void);
+void                 _ecore_x_damage_init(void);
+void                 _ecore_x_composite_init(void);
+void                 _ecore_x_dpms_init(void);
+void                 _ecore_x_randr_init(void);
 
-void _ecore_x_atoms_init(void);
+void                 _ecore_x_atoms_init(void);
 
 extern int _ecore_x_xi2_opcode;
 
-void _ecore_x_input_init(void);
-void _ecore_x_input_shutdown(void);
-void _ecore_x_input_handler(XEvent* xevent);
+void                 _ecore_x_input_init(void);
+void                 _ecore_x_input_shutdown(void);
+void                 _ecore_x_input_handler(XEvent *xevent);
 /* from sync */
 
-void _ecore_mouse_move(unsigned int timestamp, unsigned int xmodifiers, int x, int y, int x_root, int y_root, unsigned int event_window, unsigned int window, unsigned int root_win, int same_screen, int dev, double radx, double rady, double pressure, double angle, double mx, double my, double mrx, double mry);
-Ecore_Event_Mouse_Button *_ecore_mouse_button(int event, unsigned int timestamp, unsigned int xmodifiers, unsigned int buttons, int x, int y, int x_root, int y_root, unsigned int event_window, unsigned int window, unsigned int root_win, int same_screen, int dev, double radx, double rady, double pressure, double angle, double mx, double my, double mrx, double mry);
+void                 _ecore_mouse_move(unsigned int timestamp,
+                                            unsigned int xmodifiers,
+                                            int x,
+                                            int y,
+                                            int x_root,
+                                            int y_root,
+                                            unsigned int event_window,
+                                            unsigned int window,
+                                            unsigned int root_win,
+                                            int same_screen,
+                                            int dev,
+                                            double radx,
+                                            double rady,
+                                            double pressure,
+                                            double angle,
+                                            double mx,
+                                            double my,
+                                            double mrx,
+                                            double mry);
+Ecore_Event_Mouse_Button *_ecore_mouse_button(int event,
+                                              unsigned int timestamp,
+                                              unsigned int xmodifiers,
+                                              unsigned int buttons,
+                                              int x,
+                                              int y,
+                                              int x_root,
+                                              int y_root,
+                                              unsigned int event_window,
+                                              unsigned int window,
+                                              unsigned int root_win,
+                                              int same_screen,
+                                              int dev,
+                                              double radx,
+                                              double rady,
+                                              double pressure,
+                                              double angle,
+                                              double mx,
+                                              double my,
+                                              double mrx,
+                                              double mry);
 
 //#define LOGFNS 1
 
index 185c04f..094bbbe 100644 (file)
@@ -27,11 +27,12 @@ _ecore_x_randr_init(void)
 
    if (XRRQueryVersion(_ecore_x_disp, &_randr_major, &_randr_minor))
      {
-       _randr_version = (_randr_major << 16) | _randr_minor;
-       _randr_available = 1;
+        _randr_version = (_randr_major << 16) | _randr_minor;
+        _randr_available = 1;
      }
    else
-     _randr_available = 0;
+      _randr_available = 0;
+
 #else
    _randr_available = 0;
 #endif
@@ -52,14 +53,14 @@ ecore_x_randr_events_select(Ecore_X_Window win, int on)
 
    LOGFN(__FILE__, __LINE__, __FUNCTION__);
    if (!on)
-     mask = 0;
+      mask = 0;
    else
      {
-       mask = RRScreenChangeNotifyMask;
-       if (_randr_version >= RANDR_1_2)
-         mask |= (RRCrtcChangeNotifyMask |
-                  RROutputChangeNotifyMask |
-                  RROutputPropertyNotifyMask);
+        mask = RRScreenChangeNotifyMask;
+        if (_randr_version >= RANDR_1_2)
+           mask |= (RRCrtcChangeNotifyMask |
+                    RROutputChangeNotifyMask |
+                    RROutputPropertyNotifyMask);
      }
 
    XRRSelectInput(_ecore_x_disp, win, mask);
@@ -75,13 +76,14 @@ ecore_x_randr_screen_rotations_get(Ecore_X_Window root)
 {
 #ifdef ECORE_XRANDR
    Rotation rot, crot;
-   
+
    LOGFN(__FILE__, __LINE__, __FUNCTION__);
-   rot = XRRRotations(_ecore_x_disp, XRRRootToScreen(_ecore_x_disp, root), &crot);
+   rot = XRRRotations(_ecore_x_disp, XRRRootToScreen(_ecore_x_disp,
+                                                     root), &crot);
    return rot;
 #else
    return 0;
-#endif   
+#endif
 }
 
 EAPI Ecore_X_Randr_Rotation
@@ -89,30 +91,33 @@ ecore_x_randr_screen_rotation_get(Ecore_X_Window root)
 {
 #ifdef ECORE_XRANDR
    Rotation crot = 0;
-   
+
    LOGFN(__FILE__, __LINE__, __FUNCTION__);
    XRRRotations(_ecore_x_disp, XRRRootToScreen(_ecore_x_disp, root), &crot);
    return crot;
 #else
    return 0;
-#endif   
+#endif
 }
 
 EAPI void
-ecore_x_randr_screen_rotation_set(Ecore_X_Window root, Ecore_X_Randr_Rotation rot)
+ecore_x_randr_screen_rotation_set(Ecore_X_Window root,
+                                  Ecore_X_Randr_Rotation rot)
 {
 #ifdef ECORE_XRANDR
    XRRScreenConfiguration *xrrcfg;
    SizeID sizeid;
    Rotation crot;
-   
+
    LOGFN(__FILE__, __LINE__, __FUNCTION__);
    xrrcfg = XRRGetScreenInfo(_ecore_x_disp, root);
-   if (!xrrcfg) return;
+   if (!xrrcfg)
+      return;
+
    sizeid = XRRConfigCurrentConfiguration(xrrcfg, &crot);
    XRRSetScreenConfig(_ecore_x_disp, xrrcfg, root, sizeid, rot, CurrentTime);
    XRRFreeScreenConfigInfo(xrrcfg);
-#endif   
+#endif
 }
 
 EAPI Ecore_X_Screen_Size *
@@ -124,22 +129,28 @@ ecore_x_randr_screen_sizes_get(Ecore_X_Window root, int *num)
    int i, n;
 
    LOGFN(__FILE__, __LINE__, __FUNCTION__);
-   if (num) *num = 0;
+   if (num)
+      *num = 0;
 
    /* we don't have to free sizes, no idea why not */
    sizes = XRRSizes(_ecore_x_disp, XRRRootToScreen(_ecore_x_disp, root), &n);
    ret = calloc(n, sizeof(Ecore_X_Screen_Size));
-   if (!ret) return NULL;
+   if (!ret)
+      return NULL;
+
+   if (num)
+      *num = n;
 
-   if (num) *num = n;
    for (i = 0; i < n; i++)
      {
-       ret[i].width = sizes[i].width;
-       ret[i].height = sizes[i].height;
+        ret[i].width = sizes[i].width;
+        ret[i].height = sizes[i].height;
      }
    return ret;
 #else
-   if (num) *num = 0;
+   if (num)
+      *num = 0;
+
    return NULL;
 #endif
 }
@@ -159,17 +170,19 @@ ecore_x_randr_current_screen_size_get(Ecore_X_Window root)
    sc = XRRGetScreenInfo(_ecore_x_disp, root);
    if (!sc)
      {
-       ERR("Couldn't get screen information for %d", root);
-       return ret;
+        ERR("Couldn't get screen information for %d", root);
+        return ret;
      }
+
    size_index = XRRConfigCurrentConfiguration(sc, &rotation);
 
    sizes = XRRSizes(_ecore_x_disp, XRRRootToScreen(_ecore_x_disp, root), &n);
    if (size_index < n)
      {
-       ret.width = sizes[size_index].width;
-       ret.height = sizes[size_index].height;
+        ret.width = sizes[size_index].width;
+        ret.height = sizes[size_index].height;
      }
+
    XRRFreeScreenConfigInfo(sc);
 #endif
    return ret;
@@ -187,24 +200,26 @@ ecore_x_randr_screen_size_set(Ecore_X_Window root, Ecore_X_Screen_Size size)
    sizes = XRRSizes(_ecore_x_disp, XRRRootToScreen(_ecore_x_disp, root), &n);
    for (i = 0; i < n; i++)
      {
-       if ((sizes[i].width == size.width) && (sizes[i].height == size.height))
-         {
-            size_index = i;
-            break;
-         }
+        if ((sizes[i].width == size.width) && (sizes[i].height == size.height))
+          {
+             size_index = i;
+             break;
+          }
      }
-   if (size_index == -1) return 0;
-   
+   if (size_index == -1)
+      return 0;
+
    sc = XRRGetScreenInfo(_ecore_x_disp, root);
    if (XRRSetScreenConfig(_ecore_x_disp, sc,
-                         root, size_index,
-                         RR_Rotate_0, CurrentTime))
+                          root, size_index,
+                          RR_Rotate_0, CurrentTime))
      {
-       ERR("Can't set new screen size!");
-       XRRFreeScreenConfigInfo(sc);
-       return 0;
+        ERR("Can't set new screen size!");
+        XRRFreeScreenConfigInfo(sc);
+        return 0;
      }
-   XRRFreeScreenConfigInfo(sc);
+
+        XRRFreeScreenConfigInfo(sc);
    return 1;
 #else
    return 0;
@@ -222,57 +237,68 @@ ecore_x_randr_current_screen_refresh_rate_get(Ecore_X_Window root)
    sc = XRRGetScreenInfo(_ecore_x_disp, root);
    if (!sc)
      {
-       ERR("Couldn't get screen information for %d", root);
-       return ret;
+        ERR("Couldn't get screen information for %d", root);
+        return ret;
      }
+
    ret.rate = XRRConfigCurrentRate(sc);
-   XRRFreeScreenConfigInfo(sc);   
+   XRRFreeScreenConfigInfo(sc);
 #endif
    return ret;
 }
 
 EAPI Ecore_X_Screen_Refresh_Rate *
-ecore_x_randr_screen_refresh_rates_get(Ecore_X_Window root, int size_id, int *num)
+ecore_x_randr_screen_refresh_rates_get(Ecore_X_Window root,
+                                       int size_id,
+                                       int *num)
 {
 #ifdef ECORE_XRANDR
    Ecore_X_Screen_Refresh_Rate *ret = NULL;
-   XRRScreenConfiguration *sc;   
+   XRRScreenConfiguration *sc;
    short *rates;
    int i, n;
 
    LOGFN(__FILE__, __LINE__, __FUNCTION__);
-   if (num) *num = 0;
+   if (num)
+      *num = 0;
 
    sc = XRRGetScreenInfo(_ecore_x_disp, root);
    if (!sc)
      {
-       ERR("Couldn't get screen information for %d", root);
-       return ret;
+        ERR("Couldn't get screen information for %d", root);
+        return ret;
      }
-   
-   rates = XRRRates(_ecore_x_disp, XRRRootToScreen(_ecore_x_disp, root), size_id, &n);
+
+   rates = XRRRates(_ecore_x_disp, XRRRootToScreen(_ecore_x_disp,
+                                                   root), size_id, &n);
    ret = calloc(n, sizeof(Ecore_X_Screen_Refresh_Rate));
-   if (!ret) 
-     { 
-       XRRFreeScreenConfigInfo(sc);
-       return NULL;
+   if (!ret)
+     {
+        XRRFreeScreenConfigInfo(sc);
+        return NULL;
      }
-   
-   if (num) *num = n;
+
+   if (num)
+      *num = n;
+
    for (i = 0; i < n; i++)
      {
-       ret[i].rate = rates[i];
+        ret[i].rate = rates[i];
      }
-   XRRFreeScreenConfigInfo(sc);   
+        XRRFreeScreenConfigInfo(sc);
    return ret;
 #else
-   if (num) *num = 0;   
+   if (num)
+      *num = 0;
+
    return NULL;
 #endif
 }
 
 EAPI int
-ecore_x_randr_screen_refresh_rate_set(Ecore_X_Window root, Ecore_X_Screen_Size size, Ecore_X_Screen_Refresh_Rate rate)
+ecore_x_randr_screen_refresh_rate_set(Ecore_X_Window root,
+                                      Ecore_X_Screen_Size size,
+                                      Ecore_X_Screen_Refresh_Rate rate)
 {
 #ifdef ECORE_XRANDR
    XRRScreenConfiguration *sc;
@@ -283,24 +309,26 @@ ecore_x_randr_screen_refresh_rate_set(Ecore_X_Window root, Ecore_X_Screen_Size s
    sizes = XRRSizes(_ecore_x_disp, XRRRootToScreen(_ecore_x_disp, root), &n);
    for (i = 0; i < n; i++)
      {
-       if ((sizes[i].width == size.width) && (sizes[i].height == size.height))
-         {
-            size_index = i;
-            break;
-         }
+        if ((sizes[i].width == size.width) && (sizes[i].height == size.height))
+          {
+             size_index = i;
+             break;
+          }
      }
-   if (size_index == -1) return 0;
-   
+   if (size_index == -1)
+      return 0;
+
    sc = XRRGetScreenInfo(_ecore_x_disp, root);
    if (XRRSetScreenConfigAndRate(_ecore_x_disp, sc,
-                                root, size_index,
-                                RR_Rotate_0, rate.rate, CurrentTime))
+                                 root, size_index,
+                                 RR_Rotate_0, rate.rate, CurrentTime))
      {
-       ERR("Can't set new screen size and refresh rate!");
-       XRRFreeScreenConfigInfo(sc);
-       return 0;
+        ERR("Can't set new screen size and refresh rate!");
+        XRRFreeScreenConfigInfo(sc);
+        return 0;
      }
-   XRRFreeScreenConfigInfo(sc);
+
+        XRRFreeScreenConfigInfo(sc);
    return 1;
 #else
    return 1;
index eb2345d..940634c 100644 (file)
@@ -44,7 +44,7 @@ ecore_x_xregion_free(Ecore_X_XRegion *region)
 {
    LOGFN(__FILE__, __LINE__, __FUNCTION__);
    if (!region)
-     return;
+      return;
 
    XDestroyRegion((Region)region);
 }
@@ -61,28 +61,34 @@ ecore_x_xregion_translate(Ecore_X_XRegion *region, int x, int y)
 {
    LOGFN(__FILE__, __LINE__, __FUNCTION__);
    if (!region)
-     return;
+      return;
 
    /* return value not used */
    XOffsetRegion((Region)region, x, y);
 }
 
 EAPI int
-ecore_x_xregion_intersect(Ecore_X_XRegion *dst, Ecore_X_XRegion *r1, Ecore_X_XRegion *r2)
+ecore_x_xregion_intersect(Ecore_X_XRegion *dst,
+                          Ecore_X_XRegion *r1,
+                          Ecore_X_XRegion *r2)
 {
    LOGFN(__FILE__, __LINE__, __FUNCTION__);
    return XIntersectRegion((Region)r1, (Region)r2, (Region)dst);
 }
 
 EAPI int
-ecore_x_xregion_union(Ecore_X_XRegion *dst, Ecore_X_XRegion *r1, Ecore_X_XRegion *r2)
+ecore_x_xregion_union(Ecore_X_XRegion *dst,
+                      Ecore_X_XRegion *r1,
+                      Ecore_X_XRegion *r2)
 {
    LOGFN(__FILE__, __LINE__, __FUNCTION__);
    return XUnionRegion((Region)r1, (Region)r2, (Region)dst);
 }
 
 EAPI int
-ecore_x_xregion_union_rect(Ecore_X_XRegion *dst, Ecore_X_XRegion *src, Ecore_X_Rectangle *rect)
+ecore_x_xregion_union_rect(Ecore_X_XRegion *dst,
+                           Ecore_X_XRegion *src,
+                           Ecore_X_Rectangle *rect)
 {
    XRectangle xr;
 
@@ -96,7 +102,9 @@ ecore_x_xregion_union_rect(Ecore_X_XRegion *dst, Ecore_X_XRegion *src, Ecore_X_R
 }
 
 EAPI int
-ecore_x_xregion_subtract(Ecore_X_XRegion *dst, Ecore_X_XRegion *rm, Ecore_X_XRegion *rs)
+ecore_x_xregion_subtract(Ecore_X_XRegion *dst,
+                         Ecore_X_XRegion *rm,
+                         Ecore_X_XRegion *rs)
 {
    LOGFN(__FILE__, __LINE__, __FUNCTION__);
    return XSubtractRegion((Region)rm, (Region)rs, (Region)dst);
@@ -106,7 +114,7 @@ EAPI int
 ecore_x_xregion_is_empty(Ecore_X_XRegion *region)
 {
    if (!region)
-     return 1;
+      return 1;
 
    LOGFN(__FILE__, __LINE__, __FUNCTION__);
    return !XEmptyRegion((Region)region);
@@ -116,7 +124,7 @@ EAPI int
 ecore_x_xregion_is_equal(Ecore_X_XRegion *r1, Ecore_X_XRegion *r2)
 {
    if (!r1 || !r2)
-     return 0;
+      return 0;
 
    LOGFN(__FILE__, __LINE__, __FUNCTION__);
    return XEqualRegion((Region)r1, (Region)r1);
@@ -126,7 +134,7 @@ EAPI int
 ecore_x_xregion_point_contain(Ecore_X_XRegion *region, int x, int y)
 {
    if (!region)
-     return 0;
+      return 0;
 
    LOGFN(__FILE__, __LINE__, __FUNCTION__);
    return XPointInRegion((Region)region, x, y);
@@ -136,8 +144,12 @@ EAPI int
 ecore_x_xregion_rect_contain(Ecore_X_XRegion *region, Ecore_X_Rectangle *rect)
 {
    if (!region || !rect)
-     return 0;
+      return 0;
 
    LOGFN(__FILE__, __LINE__, __FUNCTION__);
-   return XRectInRegion((Region)region, rect->x, rect->y, rect->width, rect->height);
+   return XRectInRegion((Region)region,
+                        rect->x,
+                        rect->y,
+                        rect->width,
+                        rect->height);
 }
index dcb718a..e87daa5 100644 (file)
@@ -20,7 +20,9 @@ static int _screensaver_available = -1;
 EAPI int
 ecore_x_screensaver_event_available_get(void)
 {
-   if (_screensaver_available >= 0) return _screensaver_available;
+   if (_screensaver_available >= 0)
+      return _screensaver_available;
+
 #ifdef ECORE_XSS
    int _screensaver_major, _screensaver_minor;
 
@@ -28,10 +30,12 @@ ecore_x_screensaver_event_available_get(void)
    _screensaver_major = 1;
    _screensaver_minor = 0;
 
-   if (XScreenSaverQueryVersion(_ecore_x_disp, &_screensaver_major, &_screensaver_minor))
-     _screensaver_available = 1;
+   if (XScreenSaverQueryVersion(_ecore_x_disp, &_screensaver_major,
+                                &_screensaver_minor))
+      _screensaver_available = 1;
    else
-     _screensaver_available = 0;
+      _screensaver_available = 0;
+
 #else
    _screensaver_available = 0;
 #endif
@@ -47,7 +51,9 @@ ecore_x_screensaver_idle_time_get(void)
 
    LOGFN(__FILE__, __LINE__, __FUNCTION__);
    xss = XScreenSaverAllocInfo();
-   XScreenSaverQueryInfo(_ecore_x_disp, RootWindow(_ecore_x_disp, DefaultScreen(_ecore_x_disp)), xss); 
+   XScreenSaverQueryInfo(_ecore_x_disp,
+                         RootWindow(_ecore_x_disp, DefaultScreen(
+                                       _ecore_x_disp)), xss);
    idle = xss->idle / 1000;
    XFree(xss);
 
@@ -58,10 +64,17 @@ ecore_x_screensaver_idle_time_get(void)
 }
 
 EAPI void
-ecore_x_screensaver_set(int timeout, int interval, int prefer_blanking, int allow_exposures)
+ecore_x_screensaver_set(int timeout,
+                        int interval,
+                        int prefer_blanking,
+                        int allow_exposures)
 {
    LOGFN(__FILE__, __LINE__, __FUNCTION__);
-   XSetScreenSaver(_ecore_x_disp, timeout, interval, prefer_blanking, allow_exposures);
+   XSetScreenSaver(_ecore_x_disp,
+                   timeout,
+                   interval,
+                   prefer_blanking,
+                   allow_exposures);
 }
 
 EAPI void
@@ -153,8 +166,9 @@ ecore_x_screensaver_event_listen_set(int on)
    LOGFN(__FILE__, __LINE__, __FUNCTION__);
    root = DefaultRootWindow(_ecore_x_disp);
    if (on)
-     XScreenSaverSelectInput(_ecore_x_disp, root, ScreenSaverNotifyMask);
+      XScreenSaverSelectInput(_ecore_x_disp, root, ScreenSaverNotifyMask);
    else
-     XScreenSaverSelectInput(_ecore_x_disp, root, 0);
+      XScreenSaverSelectInput(_ecore_x_disp, root, 0);
+
 #endif
 }
index ceda1bf..bdee259 100644 (file)
@@ -19,14 +19,29 @@ static Ecore_X_Selection_Intern selections[4];
 static Ecore_X_Selection_Converter *converters = NULL;
 static Ecore_X_Selection_Parser *parsers = NULL;
 
-static int _ecore_x_selection_converter_text(char *target, void *data, int size, void **data_ret, int *size_ret, Ecore_X_Atom *tprop, int *);
-static int _ecore_x_selection_data_default_free(void *data);
-static void *_ecore_x_selection_parser_files(const char *target, void *data, int size, int format);
-static int _ecore_x_selection_data_files_free(void *data);
-static void *_ecore_x_selection_parser_text(const char *target, void *data, int size, int format);
-static int _ecore_x_selection_data_text_free(void *data);
-static void *_ecore_x_selection_parser_targets(const char *target, void *data, int size, int format);
-static int _ecore_x_selection_data_targets_free(void *data);
+static int _ecore_x_selection_converter_text(char *target,
+                                             void *data,
+                                             int size,
+                                             void **data_ret,
+                                             int *size_ret,
+                                             Ecore_X_Atom *tprop,
+                                             int *);
+static int   _ecore_x_selection_data_default_free(void *data);
+static void *_ecore_x_selection_parser_files(const char *target,
+                                             void *data,
+                                             int size,
+                                             int format);
+static int   _ecore_x_selection_data_files_free(void *data);
+static void *_ecore_x_selection_parser_text(const char *target,
+                                            void *data,
+                                            int size,
+                                            int format);
+static int   _ecore_x_selection_data_text_free(void *data);
+static void *_ecore_x_selection_parser_targets(const char *target,
+                                               void *data,
+                                               int size,
+                                               int format);
+static int   _ecore_x_selection_data_targets_free(void *data);
 
 #define ECORE_X_SELECTION_DATA(x) ((Ecore_X_Selection_Data *)(x))
 
@@ -38,27 +53,27 @@ _ecore_x_selection_data_init(void)
 
    /* Initialize converters */
    ecore_x_selection_converter_atom_add(ECORE_X_ATOM_TEXT,
-                                       _ecore_x_selection_converter_text);
+                                        _ecore_x_selection_converter_text);
 #ifdef X_HAVE_UTF8_STRING
    ecore_x_selection_converter_atom_add(ECORE_X_ATOM_UTF8_STRING,
-                                       _ecore_x_selection_converter_text);
+                                        _ecore_x_selection_converter_text);
 #endif
    ecore_x_selection_converter_atom_add(ECORE_X_ATOM_COMPOUND_TEXT,
-                                       _ecore_x_selection_converter_text);
+                                        _ecore_x_selection_converter_text);
    ecore_x_selection_converter_atom_add(ECORE_X_ATOM_STRING,
-                                       _ecore_x_selection_converter_text);
+                                        _ecore_x_selection_converter_text);
 
    /* Initialize parsers */
    ecore_x_selection_parser_add("text/plain",
-                               _ecore_x_selection_parser_text);
+                                _ecore_x_selection_parser_text);
    ecore_x_selection_parser_add(ECORE_X_SELECTION_TARGET_UTF8_STRING,
-                               _ecore_x_selection_parser_text);
+                                _ecore_x_selection_parser_text);
    ecore_x_selection_parser_add("text/uri-list",
-                               _ecore_x_selection_parser_files);
+                                _ecore_x_selection_parser_files);
    ecore_x_selection_parser_add("_NETSCAPE_URL",
-                               _ecore_x_selection_parser_files);
+                                _ecore_x_selection_parser_files);
    ecore_x_selection_parser_add(ECORE_X_SELECTION_TARGET_TARGETS,
-                               _ecore_x_selection_parser_targets);
+                                _ecore_x_selection_parser_targets);
 }
 
 void
@@ -71,11 +86,11 @@ _ecore_x_selection_shutdown(void)
    cnv = converters;
    while (cnv)
      {
-       Ecore_X_Selection_Converter *tmp;
+        Ecore_X_Selection_Converter *tmp;
 
-       tmp = cnv->next;
-       free(cnv);
-       cnv = tmp;
+        tmp = cnv->next;
+        free(cnv);
+        cnv = tmp;
      }
    converters = NULL;
 
@@ -83,12 +98,12 @@ _ecore_x_selection_shutdown(void)
    prs = parsers;
    while (prs)
      {
-       Ecore_X_Selection_Parser *tmp;
+        Ecore_X_Selection_Parser *tmp;
 
-       tmp = prs;
-       prs = prs->next;
-       free(tmp->target);
-       free(tmp);
+        tmp = prs;
+        prs = prs->next;
+        free(tmp->target);
+        free(tmp);
      }
    parsers = NULL;
 }
@@ -97,56 +112,56 @@ Ecore_X_Selection_Intern *
 _ecore_x_selection_get(Ecore_X_Atom selection)
 {
    if (selection == ECORE_X_ATOM_SELECTION_PRIMARY)
-     return &selections[0];
+      return &selections[0];
    else if (selection == ECORE_X_ATOM_SELECTION_SECONDARY)
-     return &selections[1];
+      return &selections[1];
    else if (selection == ECORE_X_ATOM_SELECTION_XDND)
-     return &selections[2];
+      return &selections[2];
    else if (selection == ECORE_X_ATOM_SELECTION_CLIPBOARD)
-     return &selections[3];
+      return &selections[3];
    else
-     return NULL;
+      return NULL;
 }
 
 int
-_ecore_x_selection_set(Window w, const void *data, int size, Ecore_X_Atom selection)
+_ecore_x_selection_set(Window w,
+                       const void *data,
+                       int size,
+                       Ecore_X_Atom selection)
 {
    int in;
    unsigned char *buf = NULL;
 
    XSetSelectionOwner(_ecore_x_disp, selection, w, _ecore_x_event_last_time);
    if (XGetSelectionOwner(_ecore_x_disp, selection) != w)
-     return 0;
+      return 0;
 
    if (selection == ECORE_X_ATOM_SELECTION_PRIMARY)
-     in = 0;
+      in = 0;
    else if (selection == ECORE_X_ATOM_SELECTION_SECONDARY)
-     in = 1;
+      in = 1;
    else if (selection == ECORE_X_ATOM_SELECTION_XDND)
-     in = 2;
+      in = 2;
    else if (selection == ECORE_X_ATOM_SELECTION_CLIPBOARD)
-     in = 3;
+      in = 3;
    else
-     return 0;
+      return 0;
 
    if (data)
      {
-       selections[in].win = w;
-       selections[in].selection = selection;
-       selections[in].length = size;
-       selections[in].time = _ecore_x_event_last_time;
-
-       buf = malloc(size);
-       memcpy(buf, data, size);
-       selections[in].data = buf;
+        selections[in].win = w;
+        selections[in].selection = selection;
+        selections[in].length = size;
+        selections[in].time = _ecore_x_event_last_time;
+
+        buf = malloc(size);
+        memcpy(buf, data, size);
+        selections[in].data = buf;
      }
-   else
+   else if (selections[in].data)
      {
-       if (selections[in].data)
-         {
-            free(selections[in].data);
-            memset(&selections[in], 0, sizeof(Ecore_X_Selection_Data));
-         }
+        free(selections[in].data);
+        memset(&selections[in], 0, sizeof(Ecore_X_Selection_Data));
      }
 
    return 1;
@@ -157,7 +172,7 @@ _ecore_x_selection_set(Window w, const void *data, int size, Ecore_X_Atom select
  * @param w    The window to which this selection belongs
  * @param data The data associated with the selection
  * @param size The size of the data buffer in bytes
- * @return     Returns 1 if the ownership of the selection was successfully 
+ * @return     Returns 1 if the ownership of the selection was successfully
  *             claimed, or 0 if unsuccessful.
  */
 EAPI int
@@ -185,14 +200,17 @@ ecore_x_selection_primary_clear(void)
  * @param w    The window to which this selection belongs
  * @param data The data associated with the selection
  * @param size The size of the data buffer in bytes
- * @return     Returns 1 if the ownership of the selection was successfully 
+ * @return     Returns 1 if the ownership of the selection was successfully
  *             claimed, or 0 if unsuccessful.
  */
 EAPI int
 ecore_x_selection_secondary_set(Ecore_X_Window w, const void *data, int size)
 {
    LOGFN(__FILE__, __LINE__, __FUNCTION__);
-   return _ecore_x_selection_set(w, data, size, ECORE_X_ATOM_SELECTION_SECONDARY);
+   return _ecore_x_selection_set(w,
+                                 data,
+                                 size,
+                                 ECORE_X_ATOM_SELECTION_SECONDARY);
 }
 
 /**
@@ -205,7 +223,10 @@ EAPI int
 ecore_x_selection_secondary_clear(void)
 {
    LOGFN(__FILE__, __LINE__, __FUNCTION__);
-   return _ecore_x_selection_set(None, NULL, 0, ECORE_X_ATOM_SELECTION_SECONDARY);
+   return _ecore_x_selection_set(None,
+                                 NULL,
+                                 0,
+                                 ECORE_X_ATOM_SELECTION_SECONDARY);
 }
 
 /**
@@ -213,7 +234,7 @@ ecore_x_selection_secondary_clear(void)
  * @param w    The window to which this selection belongs
  * @param data The data associated with the selection
  * @param size The size of the data buffer in bytes
- * @return     Returns 1 if the ownership of the selection was successfully 
+ * @return     Returns 1 if the ownership of the selection was successfully
  *             claimed, or 0 if unsuccessful.
  */
 EAPI int
@@ -241,7 +262,7 @@ ecore_x_selection_xdnd_clear(void)
  * @param w    The window to which this selection belongs
  * @param data The data associated with the selection
  * @param size The size of the data buffer in bytes
- * @return     Returns 1 if the ownership of the selection was successfully 
+ * @return     Returns 1 if the ownership of the selection was successfully
  *             claimed, or 0 if unsuccessful.
  *
  * Get the converted data from a previous CLIPBOARD selection
@@ -251,7 +272,10 @@ EAPI int
 ecore_x_selection_clipboard_set(Ecore_X_Window w, const void *data, int size)
 {
    LOGFN(__FILE__, __LINE__, __FUNCTION__);
-   return _ecore_x_selection_set(w, data, size, ECORE_X_ATOM_SELECTION_CLIPBOARD);
+   return _ecore_x_selection_set(w,
+                                 data,
+                                 size,
+                                 ECORE_X_ATOM_SELECTION_CLIPBOARD);
 }
 
 /**
@@ -264,7 +288,10 @@ EAPI int
 ecore_x_selection_clipboard_clear(void)
 {
    LOGFN(__FILE__, __LINE__, __FUNCTION__);
-   return _ecore_x_selection_set(None, NULL, 0, ECORE_X_ATOM_SELECTION_CLIPBOARD);
+   return _ecore_x_selection_set(None,
+                                 NULL,
+                                 0,
+                                 ECORE_X_ATOM_SELECTION_CLIPBOARD);
 }
 
 Ecore_X_Atom
@@ -273,19 +300,17 @@ _ecore_x_selection_target_atom_get(const char *target)
    Ecore_X_Atom x_target;
 
    if (!strcmp(target, ECORE_X_SELECTION_TARGET_TEXT))
-     x_target = ECORE_X_ATOM_TEXT;
+      x_target = ECORE_X_ATOM_TEXT;
    else if (!strcmp(target, ECORE_X_SELECTION_TARGET_COMPOUND_TEXT))
-     x_target = ECORE_X_ATOM_COMPOUND_TEXT;
+      x_target = ECORE_X_ATOM_COMPOUND_TEXT;
    else if (!strcmp(target, ECORE_X_SELECTION_TARGET_STRING))
-     x_target = ECORE_X_ATOM_STRING;
+      x_target = ECORE_X_ATOM_STRING;
    else if (!strcmp(target, ECORE_X_SELECTION_TARGET_UTF8_STRING))
-     x_target = ECORE_X_ATOM_UTF8_STRING;
+      x_target = ECORE_X_ATOM_UTF8_STRING;
    else if (!strcmp(target, ECORE_X_SELECTION_TARGET_FILENAME))
-     x_target = ECORE_X_ATOM_FILE_NAME;
+      x_target = ECORE_X_ATOM_FILE_NAME;
    else
-     {
-       x_target = ecore_x_atom_get(target);
-     }
+      x_target = ecore_x_atom_get(target);
 
    return x_target;
 }
@@ -296,52 +321,54 @@ _ecore_x_selection_target_get(Ecore_X_Atom target)
    /* FIXME: Should not return mem allocated with strdup or X mixed,
     * one should use free to free, the other XFree */
    if (target == ECORE_X_ATOM_FILE_NAME)
-     return strdup(ECORE_X_SELECTION_TARGET_FILENAME);
+      return strdup(ECORE_X_SELECTION_TARGET_FILENAME);
    else if (target == ECORE_X_ATOM_STRING)
-     return strdup(ECORE_X_SELECTION_TARGET_STRING);
+      return strdup(ECORE_X_SELECTION_TARGET_STRING);
    else if (target == ECORE_X_ATOM_UTF8_STRING)
-     return strdup(ECORE_X_SELECTION_TARGET_UTF8_STRING);
+      return strdup(ECORE_X_SELECTION_TARGET_UTF8_STRING);
    else if (target == ECORE_X_ATOM_TEXT)
-     return strdup(ECORE_X_SELECTION_TARGET_TEXT);
+      return strdup(ECORE_X_SELECTION_TARGET_TEXT);
    else
-     return XGetAtomName(_ecore_x_disp, target);
+      return XGetAtomName(_ecore_x_disp, target);
 }
 
-static void 
-_ecore_x_selection_request(Ecore_X_Window w, Ecore_X_Atom selection, const char *target_str) 
+static void
+_ecore_x_selection_request(Ecore_X_Window w,
+                           Ecore_X_Atom selection,
+                           const char *target_str)
 {
    Ecore_X_Atom target, prop;
 
    target = _ecore_x_selection_target_atom_get(target_str);
 
    if (selection == ECORE_X_ATOM_SELECTION_PRIMARY)
-     prop = ECORE_X_ATOM_SELECTION_PROP_PRIMARY;
+      prop = ECORE_X_ATOM_SELECTION_PROP_PRIMARY;
    else if (selection == ECORE_X_ATOM_SELECTION_SECONDARY)
-     prop = ECORE_X_ATOM_SELECTION_PROP_SECONDARY;
+      prop = ECORE_X_ATOM_SELECTION_PROP_SECONDARY;
    else if (selection == ECORE_X_ATOM_SELECTION_CLIPBOARD)
-     prop = ECORE_X_ATOM_SELECTION_PROP_CLIPBOARD;
+      prop = ECORE_X_ATOM_SELECTION_PROP_CLIPBOARD;
    else
-     return;
+      return;
 
    XConvertSelection(_ecore_x_disp, selection, target, prop,
-                    w, CurrentTime);
+                     w, CurrentTime);
 }
 
-EAPI void 
+EAPI void
 ecore_x_selection_primary_request(Ecore_X_Window w, const char *target)
 {
    LOGFN(__FILE__, __LINE__, __FUNCTION__);
    _ecore_x_selection_request(w, ECORE_X_ATOM_SELECTION_PRIMARY, target);
 }
 
-EAPI void 
+EAPI void
 ecore_x_selection_secondary_request(Ecore_X_Window w, const char *target)
 {
    LOGFN(__FILE__, __LINE__, __FUNCTION__);
    _ecore_x_selection_request(w, ECORE_X_ATOM_SELECTION_SECONDARY, target);
 }
 
-EAPI void 
+EAPI void
 ecore_x_selection_xdnd_request(Ecore_X_Window w, const char *target)
 {
    Ecore_X_Atom atom;
@@ -351,11 +378,11 @@ ecore_x_selection_xdnd_request(Ecore_X_Window w, const char *target)
    _target = _ecore_x_dnd_target_get();
    atom = _ecore_x_selection_target_atom_get(target);
    XConvertSelection(_ecore_x_disp, ECORE_X_ATOM_SELECTION_XDND, atom,
-                    ECORE_X_ATOM_SELECTION_PROP_XDND, w,
-                    _target->time);
+                     ECORE_X_ATOM_SELECTION_PROP_XDND, w,
+                     _target->time);
 }
 
-EAPI void 
+EAPI void
 ecore_x_selection_clipboard_request(Ecore_X_Window w, const char *target)
 {
    LOGFN(__FILE__, __LINE__, __FUNCTION__);
@@ -364,7 +391,13 @@ ecore_x_selection_clipboard_request(Ecore_X_Window w, const char *target)
 
 EAPI void
 ecore_x_selection_converter_atom_add(Ecore_X_Atom target,
-      int (*func)(char *target, void *data, int size, void **data_ret, int *size_ret, Ecore_X_Atom *ttype, int *tsize))
+                                     int (*func)(char *target,
+                                                 void *data,
+                                                 int size,
+                                                 void **data_ret,
+                                                 int *size_ret,
+                                                 Ecore_X_Atom *ttype,
+                                                 int *tsize))
 {
    Ecore_X_Selection_Converter *cnv;
 
@@ -372,39 +405,47 @@ ecore_x_selection_converter_atom_add(Ecore_X_Atom target,
    cnv = converters;
    if (converters)
      {
-       while (1)
-         {
-            if (cnv->target == target)
-              {
-                 cnv->convert = func;
-                 return;
-              }
-            if (cnv->next)
-              cnv = cnv->next;
-            else
-              break;
-         }
-
-       cnv->next = calloc(1, sizeof(Ecore_X_Selection_Converter));
-       cnv = cnv->next;
+        while (1)
+          {
+             if (cnv->target == target)
+               {
+                  cnv->convert = func;
+                  return;
+               }
+
+             if (cnv->next)
+                cnv = cnv->next;
+             else
+                break;
+          }
+
+        cnv->next = calloc(1, sizeof(Ecore_X_Selection_Converter));
+        cnv = cnv->next;
      }
    else
      {
-       converters = calloc(1, sizeof(Ecore_X_Selection_Converter));
-       cnv = converters;
+        converters = calloc(1, sizeof(Ecore_X_Selection_Converter));
+        cnv = converters;
      }
+
    cnv->target = target;
    cnv->convert = func;
 }
 
 EAPI void
 ecore_x_selection_converter_add(char *target,
-      int (*func)(char *target, void *data, int size, void **data_ret, int *size_ret, Ecore_X_Atom *, int *))
+                                int (*func)(char *target,
+                                            void *data,
+                                            int size,
+                                            void **data_ret,
+                                            int *size_ret,
+                                            Ecore_X_Atom *,
+                                            int *))
 {
    Ecore_X_Atom x_target;
 
    if (!func || !target)
-     return;
+      return;
 
    LOGFN(__FILE__, __LINE__, __FUNCTION__);
    x_target = _ecore_x_selection_target_atom_get(target);
@@ -423,18 +464,22 @@ ecore_x_selection_converter_atom_del(Ecore_X_Atom target)
 
    while (cnv)
      {
-       if (cnv->target == target)
-         {
-            if (prev_cnv)
-              prev_cnv->next = cnv->next;
-            else
-              converters = cnv->next; /* This was the first converter */
-            free(cnv);
-
-            return;
-         }
-       prev_cnv = cnv;
-       cnv = cnv->next;
+        if (cnv->target == target)
+          {
+             if (prev_cnv)
+                prev_cnv->next = cnv->next;
+             else
+               {
+                  converters = cnv->next; /* This was the first converter */
+               }
+
+             free(cnv);
+
+             return;
+          }
+
+        prev_cnv = cnv;
+        cnv = cnv->next;
      }
 }
 
@@ -444,7 +489,7 @@ ecore_x_selection_converter_del(char *target)
    Ecore_X_Atom x_target;
 
    if (!target)
-     return;
+      return;
 
    LOGFN(__FILE__, __LINE__, __FUNCTION__);
    x_target = _ecore_x_selection_target_atom_get(target);
@@ -452,9 +497,13 @@ ecore_x_selection_converter_del(char *target)
 }
 
 EAPI int
-ecore_x_selection_notify_send(Ecore_X_Window requestor, Ecore_X_Atom selection, Ecore_X_Atom target, Ecore_X_Atom property, Ecore_X_Time time)
+ecore_x_selection_notify_send(Ecore_X_Window requestor,
+                              Ecore_X_Atom selection,
+                              Ecore_X_Atom target,
+                              Ecore_X_Atom property,
+                              Ecore_X_Time time)
 {
-   XEvent          xev;
+   XEvent xev;
    XSelectionEvent xnotify;
 
    LOGFN(__FILE__, __LINE__, __FUNCTION__);
@@ -474,8 +523,12 @@ ecore_x_selection_notify_send(Ecore_X_Window requestor, Ecore_X_Atom selection,
 
 /* Locate and run conversion callback for specified selection target */
 EAPI int
-ecore_x_selection_convert(Ecore_X_Atom selection, Ecore_X_Atom target,
-      void **data_ret, int *size, Ecore_X_Atom *targtype, int *typesize)
+ecore_x_selection_convert(Ecore_X_Atom selection,
+                          Ecore_X_Atom target,
+                          void **data_ret,
+                          int *size,
+                          Ecore_X_Atom *targtype,
+                          int *typesize)
 {
    Ecore_X_Selection_Intern *sel;
    Ecore_X_Selection_Converter *cnv;
@@ -488,124 +541,138 @@ ecore_x_selection_convert(Ecore_X_Atom selection, Ecore_X_Atom target,
 
    for (cnv = converters; cnv; cnv = cnv->next)
      {
-       if (cnv->target == target)
-         {
-            int r;
-            r = cnv->convert(tgt_str, sel->data, sel->length, &data, size,
-                  targtype, typesize);
-            free(tgt_str);
-            if (r)
-              {
-                 *data_ret = data;
-                 return r;
-              }
-            else
-              return 0;
-         }
+        if (cnv->target == target)
+          {
+             int r;
+             r = cnv->convert(tgt_str, sel->data, sel->length, &data, size,
+                              targtype, typesize);
+             free(tgt_str);
+             if (r)
+               {
+                  *data_ret = data;
+                  return r;
+               }
+             else
+                return 0;
+          }
      }
 
    /* ICCCM says "If the selection cannot be converted into a form based on the target (and parameters, if any), the owner should refuse the SelectionRequest as previously described." */
-   return 0; 
+   return 0;
 
-   /* Default, just return the data 
-   *data_ret = malloc(sel->length);
-   memcpy(*data_ret, sel->data, sel->length);
-   free(tgt_str);
-   return 1;
-   */
+   /* Default, just return the data
+      *data_ret = malloc(sel->length);
+      memcpy(*data_ret, sel->data, sel->length);
+      free(tgt_str);
+      return 1;
+    */
 }
 
 /* TODO: We need to work out a mechanism for automatic conversion to any requested
  * locale using Ecore_Txt functions */
 /* Converter for standard non-utf8 text targets */
 static int
-_ecore_x_selection_converter_text(char *target, void *data, int size, void **data_ret, int *size_ret, Ecore_X_Atom *targprop, int *s)
+_ecore_x_selection_converter_text(char *target,
+                                  void *data,
+                                  int size,
+                                  void **data_ret,
+                                  int *size_ret,
+                                  Ecore_X_Atom *targprop,
+                                  int *s)
 {
    XTextProperty text_prop;
    char *mystr;
    XICCEncodingStyle style;
 
    if (!data || !size)
-     return 0;
+      return 0;
 
    LOGFN(__FILE__, __LINE__, __FUNCTION__);
    if (!strcmp(target, ECORE_X_SELECTION_TARGET_TEXT))
-     style = XTextStyle;
+      style = XTextStyle;
    else if (!strcmp(target, ECORE_X_SELECTION_TARGET_COMPOUND_TEXT))
-     style = XCompoundTextStyle;
+      style = XCompoundTextStyle;
    else if (!strcmp(target, ECORE_X_SELECTION_TARGET_STRING))
-     style = XStringStyle;
+      style = XStringStyle;
+
 #ifdef X_HAVE_UTF8_STRING
    else if (!strcmp(target, ECORE_X_SELECTION_TARGET_UTF8_STRING))
-     style = XUTF8StringStyle;
+      style = XUTF8StringStyle;
 #endif
    else
-     return 0;
-
+      return 0;
    if (!(mystr = strdup(data)))
-     return 0;
+      return 0;
 
 #ifdef X_HAVE_UTF8_STRING
-   if (Xutf8TextListToTextProperty(_ecore_x_disp, &mystr, 1, style, &text_prop) == Success)
+   if (Xutf8TextListToTextProperty(_ecore_x_disp, &mystr, 1, style,
+                                   &text_prop) == Success)
      {
-       int bufsize = strlen((char *)text_prop.value) + 1;
-       *data_ret = malloc(bufsize);
-       memcpy(*data_ret, text_prop.value, bufsize);
-       *size_ret = bufsize;
-       XFree(text_prop.value);
-       free(mystr);
-       return 1;
+        int bufsize = strlen((char *)text_prop.value) + 1;
+        *data_ret = malloc(bufsize);
+        memcpy(*data_ret, text_prop.value, bufsize);
+        *size_ret = bufsize;
+        XFree(text_prop.value);
+        free(mystr);
+        return 1;
      }
+
 #else
-   if (XmbTextListToTextProperty(_ecore_x_disp, &mystr, 1, style, &text_prop) == Success)
+   if (XmbTextListToTextProperty(_ecore_x_disp, &mystr, 1, style,
+                                 &text_prop) == Success)
      {
-       int bufsize = strlen(text_prop.value) + 1;
-       *data_ret = malloc(bufsize);
-       memcpy(*data_ret, text_prop.value, bufsize);
-       *size_ret = bufsize;
-       XFree(text_prop.value);
-       free(mystr);
-       return 1;
+        int bufsize = strlen(text_prop.value) + 1;
+        *data_ret = malloc(bufsize);
+        memcpy(*data_ret, text_prop.value, bufsize);
+        *size_ret = bufsize;
+        XFree(text_prop.value);
+        free(mystr);
+        return 1;
      }
+
 #endif
    else
      {
-       free(mystr);
-       return 0;
+        free(mystr);
+        return 0;
      }
 }
 
 EAPI void
 ecore_x_selection_parser_add(const char *target,
-      void *(*func)(const char *target, void *data, int size, int format))
+                             void *(*func)(const char *target, void *data,
+                                           int size,
+                                           int format))
 {
    Ecore_X_Selection_Parser *prs;
 
    if (!target)
-     return;
+      return;
 
    LOGFN(__FILE__, __LINE__, __FUNCTION__);
    prs = parsers;
    if (parsers)
      {
-       while (prs->next)
-         {
-            if (!strcmp(prs->target, target))
-              {
-                 prs->parse = func;
-                 return;
-              }
-            prs = prs->next;
-         }
-
-       prs->next = calloc(1, sizeof(Ecore_X_Selection_Parser));
-       prs = prs->next;
+        while (prs->next)
+          {
+             if (!strcmp(prs->target, target))
+               {
+                  prs->parse = func;
+                  return;
+               }
+
+             prs = prs->next;
+          }
+
+        prs->next = calloc(1, sizeof(Ecore_X_Selection_Parser));
+        prs = prs->next;
      }
    else
      {
-       parsers = calloc(1, sizeof(Ecore_X_Selection_Parser));
-       prs = parsers;
+        parsers = calloc(1, sizeof(Ecore_X_Selection_Parser));
+        prs = parsers;
      }
+
    prs->target = strdup(target);
    prs->parse = func;
 }
@@ -616,7 +683,7 @@ ecore_x_selection_parser_del(const char *target)
    Ecore_X_Selection_Parser *prs, *prev_prs;
 
    if (!target)
-     return;
+      return;
 
    LOGFN(__FILE__, __LINE__, __FUNCTION__);
    prev_prs = NULL;
@@ -624,19 +691,23 @@ ecore_x_selection_parser_del(const char *target)
 
    while (prs)
      {
-       if (!strcmp(prs->target, target))
-         {
-            if (prev_prs)
-              prev_prs->next = prs->next;
-            else
-              parsers = prs->next; /* This was the first parser */
-            free(prs->target);
-            free(prs);
-
-            return;
-         }
-       prev_prs = prs;
-       prs = prs->next;
+        if (!strcmp(prs->target, target))
+          {
+             if (prev_prs)
+                prev_prs->next = prs->next;
+             else
+               {
+                  parsers = prs->next; /* This was the first parser */
+               }
+
+             free(prs->target);
+             free(prs);
+
+             return;
+          }
+
+        prev_prs = prs;
+        prs = prs->next;
      }
 }
 
@@ -649,11 +720,11 @@ _ecore_x_selection_parse(const char *target, void *data, int size, int format)
 
    for (prs = parsers; prs; prs = prs->next)
      {
-       if (!strcmp(prs->target, target))
-         {
-            sel = prs->parse(target, data, size, format);
-            return sel;
-         }
+        if (!strcmp(prs->target, target))
+          {
+             sel = prs->parse(target, data, size, format);
+             return sel;
+          }
      }
 
    /* Default, just return the data */
@@ -671,13 +742,16 @@ _ecore_x_selection_data_default_free(void *data)
    Ecore_X_Selection_Data *sel;
 
    sel = data;
-   free(sel->data);
-   free(sel);
+             free(sel->data);
+             free(sel);
    return 1;
 }
 
 static void *
-_ecore_x_selection_parser_files(const char *target, void *_data, int size, int format __UNUSED__)
+_ecore_x_selection_parser_files(const char *target,
+                                void *_data,
+                                int size,
+                                int format __UNUSED__)
 {
    Ecore_X_Selection_Data_Files *sel;
    char *data = _data;
@@ -686,17 +760,17 @@ _ecore_x_selection_parser_files(const char *target, void *_data, int size, int f
 
    if (strcmp(target, "text/uri-list") &&
        strcmp(target, "_NETSCAPE_URL"))
-     return NULL;
+      return NULL;
 
    sel = calloc(1, sizeof(Ecore_X_Selection_Data_Files));
    ECORE_X_SELECTION_DATA(sel)->free = _ecore_x_selection_data_files_free;
 
    if (data[size - 1])
      {
-       /* Isn't nul terminated */
-       size++;
-       data = realloc(data, size);
-       data[size - 1] = 0;
+        /* Isn't nul terminated */
+        size++;
+        data = realloc(data, size);
+        data[size - 1] = 0;
      }
 
    tmp = malloc(size);
@@ -704,36 +778,34 @@ _ecore_x_selection_parser_files(const char *target, void *_data, int size, int f
    is = 0;
    while ((is < size) && (data[is]))
      {
-       if ((i == 0) && (data[is] == '#'))
-         {
-            for (; ((data[is]) && (data[is] != '\n')); is++);
-         }
-       else
-         {
-            if ((data[is] != '\r') &&
-                (data[is] != '\n'))
-              {
-                 tmp[i++] = data[is++];
-              }
-            else
-              {
-                 while ((data[is] == '\r') || (data[is] == '\n')) is++;
-                 tmp[i] = 0;
-                 sel->num_files++;
-                 sel->files = realloc(sel->files, sel->num_files * sizeof(char *));
-                 sel->files[sel->num_files - 1] = strdup(tmp);
-                 tmp[0] = 0;
-                 i = 0;
-              }
-         }
+        if ((i == 0) && (data[is] == '#'))
+           for (; ((data[is]) && (data[is] != '\n')); is++) ;
+        else
+          {
+             if ((data[is] != '\r') &&
+                 (data[is] != '\n'))
+                tmp[i++] = data[is++];
+             else
+               {
+                  while ((data[is] == '\r') || (data[is] == '\n')) is++;
+                  tmp[i] = 0;
+                  sel->num_files++;
+                  sel->files =
+                     realloc(sel->files, sel->num_files * sizeof(char *));
+                  sel->files[sel->num_files - 1] = strdup(tmp);
+                  tmp[0] = 0;
+                  i = 0;
+               }
+          }
      }
    if (i > 0)
      {
-       tmp[i] = 0;
-       sel->num_files++;
-       sel->files = realloc(sel->files, sel->num_files * sizeof(char *));
-       sel->files[sel->num_files - 1] = strdup(tmp);
+        tmp[i] = 0;
+        sel->num_files++;
+        sel->files = realloc(sel->files, sel->num_files * sizeof(char *));
+        sel->files[sel->num_files - 1] = strdup(tmp);
      }
+
    free(tmp);
    free(data);
 
@@ -752,16 +824,20 @@ _ecore_x_selection_data_files_free(void *data)
    sel = data;
    if (sel->files)
      {
-       for (i = 0; i < sel->num_files; i++)
-         free(sel->files[i]);
-       free(sel->files);
+        for (i = 0; i < sel->num_files; i++)
+           free(sel->files[i]);
+           free(sel->files);
      }
-   free(sel);
+
+           free(sel);
    return 0;
 }
 
 static void *
-_ecore_x_selection_parser_text(const char *target __UNUSED__, void *_data, int size, int format __UNUSED__)
+_ecore_x_selection_parser_text(const char *target __UNUSED__,
+                               void *_data,
+                               int size,
+                               int format __UNUSED__)
 {
    Ecore_X_Selection_Data_Text *sel;
    char *data = _data;
@@ -770,10 +846,10 @@ _ecore_x_selection_parser_text(const char *target __UNUSED__, void *_data, int s
 
    if (data[size - 1])
      {
-       /* Isn't nul terminated */
-       size++;
-       data = realloc(data, size);
-       data[size - 1] = 0;
+        /* Isn't nul terminated */
+        size++;
+        data = realloc(data, size);
+        data[size - 1] = 0;
      }
 
    sel->text = (char *)data;
@@ -795,7 +871,10 @@ _ecore_x_selection_data_text_free(void *data)
 }
 
 static void *
-_ecore_x_selection_parser_targets(const char *target __UNUSED__, void *data, int size, int format __UNUSED__)
+_ecore_x_selection_parser_targets(const char *target __UNUSED__,
+                                  void *data,
+                                  int size,
+                                  int format __UNUSED__)
 {
    Ecore_X_Selection_Data_Targets *sel;
    unsigned long *targets;
@@ -807,7 +886,7 @@ _ecore_x_selection_parser_targets(const char *target __UNUSED__, void *data, int
    sel->num_targets = size - 2;
    sel->targets = malloc((size - 2) * sizeof(char *));
    for (i = 2; i < size; i++)
-     sel->targets[i - 2] = XGetAtomName(_ecore_x_disp, targets[i]);
+      sel->targets[i - 2] = XGetAtomName(_ecore_x_disp, targets[i]);
 
 
    ECORE_X_SELECTION_DATA(sel)->free = _ecore_x_selection_data_targets_free;
@@ -827,11 +906,12 @@ _ecore_x_selection_data_targets_free(void *data)
 
    if (sel->targets)
      {
-       for (i = 0; i < sel->num_targets; i++)
-         XFree(sel->targets[i]);
-       free(sel->targets);
+        for (i = 0; i < sel->num_targets; i++)
+           XFree(sel->targets[i]);
+        free(sel->targets);
      }
-   free(ECORE_X_SELECTION_DATA(sel)->data);
-   free(sel);
+
+        free(ECORE_X_SELECTION_DATA(sel)->data);
+        free(sel);
    return 1;
 }
index 451ce98..3e09186 100644 (file)
@@ -25,24 +25,24 @@ ecore_x_sync_alarm_new(Ecore_X_Sync_Counter counter)
    LOGFN(__FILE__, __LINE__, __FUNCTION__);
    XSyncIntToValue(&init, 0);
    XSyncSetCounter(_ecore_x_disp, counter, init);
-   
+
    values.trigger.counter = counter;
    values.trigger.value_type = XSyncAbsolute;
    XSyncIntToValue(&values.trigger.wait_value, 1);
    values.trigger.test_type = XSyncPositiveComparison;
 
-   XSyncIntToValue(&values.delta, 1);
+   XSyncIntToValue(&values.delta,              1);
 
    values.events = True;
 
    alarm = XSyncCreateAlarm(_ecore_x_disp,
-                           XSyncCACounter |
-                           XSyncCAValueType |
-                           XSyncCAValue |
-                           XSyncCATestType |
-                           XSyncCADelta |
-                           XSyncCAEvents,
-                           &values);
+                            XSyncCACounter |
+                            XSyncCAValueType |
+                            XSyncCAValue |
+                            XSyncCATestType |
+                            XSyncCADelta |
+                            XSyncCAEvents,
+                            &values);
 
    ecore_x_sync();
    return alarm;
@@ -59,14 +59,14 @@ EAPI int
 ecore_x_sync_counter_query(Ecore_X_Sync_Counter counter, unsigned int *val)
 {
    XSyncValue value;
-   
+
    LOGFN(__FILE__, __LINE__, __FUNCTION__);
    if (XSyncQueryCounter(_ecore_x_disp, counter, &value))
      {
-        *val = (unsigned int) XSyncValueLow32(value);
+        *val = (unsigned int)XSyncValueLow32(value);
         return 1;
      }
-   
+
    return 0;
 }
 
@@ -75,7 +75,7 @@ ecore_x_sync_counter_new(int val)
 {
    XSyncCounter counter;
    XSyncValue v;
-   
+
    LOGFN(__FILE__, __LINE__, __FUNCTION__);
    XSyncIntToValue(&v, val);
    counter = XSyncCreateCounter(_ecore_x_disp, v);
@@ -93,7 +93,7 @@ EAPI void
 ecore_x_sync_counter_inc(Ecore_X_Sync_Counter counter, int by)
 {
    XSyncValue v;
-   
+
    LOGFN(__FILE__, __LINE__, __FUNCTION__);
    XSyncIntToValue(&v, by);
    XSyncChangeCounter(_ecore_x_disp, counter, v);
@@ -107,7 +107,7 @@ ecore_x_sync_counter_val_wait(Ecore_X_Sync_Counter counter, int val)
 
    LOGFN(__FILE__, __LINE__, __FUNCTION__);
    XSyncQueryCounter(_ecore_x_disp, counter, &v);
-   XSyncIntToValue(&v, val);
+   XSyncIntToValue(&v,  val);
    XSyncIntToValue(&v2, val + 1);
    cond.trigger.counter = counter;
    cond.trigger.value_type = XSyncAbsolute;
index 415b6a2..73467a6 100644 (file)
@@ -21,19 +21,24 @@ EAPI int
 ecore_x_test_fake_key_down(const char *key)
 {
 #ifdef ECORE_XTEST
-   KeyCode             keycode = 0;
-   KeySym              keysym;
-   
+   KeyCode keycode = 0;
+   KeySym keysym;
+
    LOGFN(__FILE__, __LINE__, __FUNCTION__);
    if (!strncmp(key, "Keycode-", 8))
-     keycode = atoi(key + 8);
+      keycode = atoi(key + 8);
    else
      {
-       keysym = XStringToKeysym(key);
-       if (keysym == NoSymbol) return 0;
-       keycode  = XKeysymToKeycode(_ecore_x_disp, keysym);
+        keysym = XStringToKeysym(key);
+        if (keysym == NoSymbol)
+           return 0;
+
+        keycode = XKeysymToKeycode(_ecore_x_disp, keysym);
      }
-   if (keycode == 0) return 0;
+
+   if (keycode == 0)
+      return 0;
+
    return XTestFakeKeyEvent(_ecore_x_disp, keycode, 1, 0);
 #else
    return 0;
@@ -44,19 +49,24 @@ EAPI int
 ecore_x_test_fake_key_up(const char *key)
 {
 #ifdef ECORE_XTEST
-   KeyCode             keycode = 0;
-   KeySym              keysym;
-   
+   KeyCode keycode = 0;
+   KeySym keysym;
+
    LOGFN(__FILE__, __LINE__, __FUNCTION__);
    if (!strncmp(key, "Keycode-", 8))
-     keycode = atoi(key + 8);
+      keycode = atoi(key + 8);
    else
      {
-       keysym = XStringToKeysym(key);
-       if (keysym == NoSymbol) return 0;
-       keycode  = XKeysymToKeycode(_ecore_x_disp, keysym);
+        keysym = XStringToKeysym(key);
+        if (keysym == NoSymbol)
+           return 0;
+
+        keycode = XKeysymToKeycode(_ecore_x_disp, keysym);
      }
-   if (keycode == 0) return 0;
+
+   if (keycode == 0)
+      return 0;
+
    return XTestFakeKeyEvent(_ecore_x_disp, keycode, 0, 0);
 #else
    return 0;
@@ -67,57 +77,63 @@ EAPI int
 ecore_x_test_fake_key_press(const char *key)
 {
 #ifdef ECORE_XTEST
-   KeyCode             keycode = 0;
-   KeySym              keysym = 0;
-   int                 shift = 0;
-   
+   KeyCode keycode = 0;
+   KeySym keysym = 0;
+   int shift = 0;
+
    LOGFN(__FILE__, __LINE__, __FUNCTION__);
    if (!strncmp(key, "Keycode-", 8))
-     keycode = atoi(key + 8);
+      keycode = atoi(key + 8);
    else
      {
-       keysym = XStringToKeysym(key);
-       if (keysym == NoSymbol) return 0;
-       keycode = XKeysymToKeycode(_ecore_x_disp, keysym);
-       if (XKeycodeToKeysym(_ecore_x_disp, keycode, 0) != keysym)
-         {  
-            if (XKeycodeToKeysym(_ecore_x_disp, keycode, 1) == keysym)
-              shift = 1;
-            else
-              keycode = 0;
-         }
-       else
-         shift = 0;
+        keysym = XStringToKeysym(key);
+        if (keysym == NoSymbol)
+           return 0;
+
+        keycode = XKeysymToKeycode(_ecore_x_disp, keysym);
+        if (XKeycodeToKeysym(_ecore_x_disp, keycode, 0) != keysym)
+          {
+             if (XKeycodeToKeysym(_ecore_x_disp, keycode, 1) == keysym)
+                shift = 1;
+             else
+                keycode = 0;
+          }
+        else
+           shift = 0;
      }
+
    if (keycode == 0)
      {
-       static int mod = 0;
-       KeySym *keysyms;
-       int keycode_min, keycode_max, keycode_num;
-       int i;  
-
-       XDisplayKeycodes(_ecore_x_disp, &keycode_min, &keycode_max);
-       keysyms = XGetKeyboardMapping(_ecore_x_disp, keycode_min,
-                                     keycode_max - keycode_min + 1,
-                                     &keycode_num);
-       mod = (mod + 1) & 0x7;
-       i = (keycode_max - keycode_min - mod - 1) * keycode_num;
-       
-       keysyms[i] = keysym;
-       XChangeKeyboardMapping(_ecore_x_disp, keycode_min, keycode_num,
-                              keysyms, (keycode_max - keycode_min));
-       XFree(keysyms);
-       XSync(_ecore_x_disp, False);
-       keycode = keycode_max - mod - 1;
+        static int mod = 0;
+        KeySym *keysyms;
+        int keycode_min, keycode_max, keycode_num;
+        int i;
+
+        XDisplayKeycodes(_ecore_x_disp, &keycode_min, &keycode_max);
+        keysyms = XGetKeyboardMapping(_ecore_x_disp, keycode_min,
+                                      keycode_max - keycode_min + 1,
+                                      &keycode_num);
+        mod = (mod + 1) & 0x7;
+        i = (keycode_max - keycode_min - mod - 1) * keycode_num;
+
+        keysyms[i] = keysym;
+        XChangeKeyboardMapping(_ecore_x_disp, keycode_min, keycode_num,
+                               keysyms, (keycode_max - keycode_min));
+        XFree(keysyms);
+        XSync(_ecore_x_disp, False);
+        keycode = keycode_max - mod - 1;
      }
+
    if (shift)
-     XTestFakeKeyEvent(_ecore_x_disp, 
-                      XKeysymToKeycode(_ecore_x_disp, XK_Shift_L), 1, 0);
-   XTestFakeKeyEvent(_ecore_x_disp, keycode, 1, 0);
-   XTestFakeKeyEvent(_ecore_x_disp, keycode, 0, 0);
+      XTestFakeKeyEvent(_ecore_x_disp,
+                        XKeysymToKeycode(_ecore_x_disp, XK_Shift_L), 1, 0);
+
+                        XTestFakeKeyEvent(_ecore_x_disp, keycode, 1, 0);
+                        XTestFakeKeyEvent(_ecore_x_disp, keycode, 0, 0);
    if (shift)
-     XTestFakeKeyEvent(_ecore_x_disp, 
-                      XKeysymToKeycode(_ecore_x_disp, XK_Shift_L), 0, 0);
+                        XTestFakeKeyEvent(_ecore_x_disp,
+                        XKeysymToKeycode(_ecore_x_disp, XK_Shift_L), 0, 0);
+
    return 1;
 #else
    return 0;
index 2067def..f10a0a3 100644 (file)
@@ -15,7 +15,7 @@
 #include "Ecore_X.h"
 #include "Ecore_X_Atoms.h"
 
-static int             ignore_num = 0;
+static int ignore_num = 0;
 static Ecore_X_Window *ignore_list = NULL;
 
 /**
@@ -38,50 +38,54 @@ static Ecore_X_Window *ignore_list = NULL;
 EAPI Ecore_X_Window
 ecore_x_window_new(Ecore_X_Window parent, int x, int y, int w, int h)
 {
-   Window               win;
+   Window win;
    XSetWindowAttributes attr;
-   
+
    LOGFN(__FILE__, __LINE__, __FUNCTION__);
-   if (parent == 0) parent = DefaultRootWindow(_ecore_x_disp);
-   attr.backing_store         = NotUseful;
-   attr.override_redirect     = False;
-   attr.border_pixel          = 0;
-   attr.background_pixmap     = None;
-   attr.bit_gravity            = NorthWestGravity;
-   attr.win_gravity            = NorthWestGravity;
-   attr.save_under            = False;
+   if (parent == 0)
+      parent = DefaultRootWindow(_ecore_x_disp);
+
+   attr.backing_store = NotUseful;
+   attr.override_redirect = False;
+   attr.border_pixel = 0;
+   attr.background_pixmap = None;
+   attr.bit_gravity = NorthWestGravity;
+   attr.win_gravity = NorthWestGravity;
+   attr.save_under = False;
    attr.do_not_propagate_mask = NoEventMask;
-   attr.event_mask            = KeyPressMask |
-                                KeyReleaseMask |
-                                ButtonPressMask |
-                                ButtonReleaseMask |
-                                EnterWindowMask |
-                                LeaveWindowMask |
-                                PointerMotionMask |
-                                ExposureMask |
-                                VisibilityChangeMask |
-                                StructureNotifyMask |
-                                FocusChangeMask |
-                                PropertyChangeMask |
-                                ColormapChangeMask;
+   attr.event_mask = KeyPressMask |
+      KeyReleaseMask |
+      ButtonPressMask |
+      ButtonReleaseMask |
+      EnterWindowMask |
+      LeaveWindowMask |
+      PointerMotionMask |
+      ExposureMask |
+      VisibilityChangeMask |
+      StructureNotifyMask |
+      FocusChangeMask |
+      PropertyChangeMask |
+      ColormapChangeMask;
    win = XCreateWindow(_ecore_x_disp, parent,
-                      x, y, w, h, 0,
-                      CopyFromParent, /*DefaultDepth(_ecore_x_disp, DefaultScreen(_ecore_x_disp)),*/
-                      InputOutput, 
-                      CopyFromParent, /*DefaultVisual(_ecore_x_disp, DefaultScreen(_ecore_x_disp)),*/
-                      CWBackingStore |
-                      CWOverrideRedirect | 
+                       x, y, w, h, 0,
+                       CopyFromParent, /*DefaultDepth(_ecore_x_disp, DefaultScreen(_ecore_x_disp)),*/
+                       InputOutput,
+                       CopyFromParent, /*DefaultVisual(_ecore_x_disp, DefaultScreen(_ecore_x_disp)),*/
+                       CWBackingStore |
+                       CWOverrideRedirect |
 /*                    CWColormap | */
-                      CWBorderPixel |
-                      CWBackPixmap | 
-                      CWSaveUnder | 
-                      CWDontPropagate | 
-                      CWEventMask |
-                      CWBitGravity |
-                      CWWinGravity,
-                      &attr);
-
-   if (parent == DefaultRootWindow(_ecore_x_disp)) ecore_x_window_defaults_set(win);
+                       CWBorderPixel |
+                       CWBackPixmap |
+                       CWSaveUnder |
+                       CWDontPropagate |
+                       CWEventMask |
+                       CWBitGravity |
+                       CWWinGravity,
+                       &attr);
+
+   if (parent == DefaultRootWindow(_ecore_x_disp))
+      ecore_x_window_defaults_set(win);
+
    return win;
 }
 
@@ -99,48 +103,50 @@ ecore_x_window_new(Ecore_X_Window parent, int x, int y, int w, int h)
 EAPI Ecore_X_Window
 ecore_x_window_override_new(Ecore_X_Window parent, int x, int y, int w, int h)
 {
-   Window               win;
+   Window win;
    XSetWindowAttributes attr;
-   
+
    LOGFN(__FILE__, __LINE__, __FUNCTION__);
-   if (parent == 0) parent = DefaultRootWindow(_ecore_x_disp);
-   attr.backing_store         = NotUseful;
-   attr.override_redirect     = True;
-   attr.border_pixel          = 0;
-   attr.background_pixmap     = None;
-   attr.bit_gravity           = NorthWestGravity;
-   attr.win_gravity           = NorthWestGravity;
-   attr.save_under            = False;
+   if (parent == 0)
+      parent = DefaultRootWindow(_ecore_x_disp);
+
+   attr.backing_store = NotUseful;
+   attr.override_redirect = True;
+   attr.border_pixel = 0;
+   attr.background_pixmap = None;
+   attr.bit_gravity = NorthWestGravity;
+   attr.win_gravity = NorthWestGravity;
+   attr.save_under = False;
    attr.do_not_propagate_mask = NoEventMask;
-   attr.event_mask            = KeyPressMask |
-                                KeyReleaseMask |
-                                ButtonPressMask |
-                                ButtonReleaseMask |
-                                EnterWindowMask |
-                                LeaveWindowMask |
-                                PointerMotionMask |
-                                ExposureMask |
-                                VisibilityChangeMask |
-                                StructureNotifyMask |
-                                FocusChangeMask |
-                                PropertyChangeMask |
-                                ColormapChangeMask;
+   attr.event_mask = KeyPressMask |
+      KeyReleaseMask |
+      ButtonPressMask |
+      ButtonReleaseMask |
+      EnterWindowMask |
+      LeaveWindowMask |
+      PointerMotionMask |
+      ExposureMask |
+      VisibilityChangeMask |
+      StructureNotifyMask |
+      FocusChangeMask |
+      PropertyChangeMask |
+      ColormapChangeMask;
    win = XCreateWindow(_ecore_x_disp, parent,
-                      x, y, w, h, 0,
-                      CopyFromParent, /*DefaultDepth(_ecore_x_disp, DefaultScreen(_ecore_x_disp)),*/
-                      InputOutput, 
-                      CopyFromParent, /*DefaultVisual(_ecore_x_disp, DefaultScreen(_ecore_x_disp)),*/
-                      CWBackingStore |
-                      CWOverrideRedirect | 
+                       x, y, w, h, 0,
+                       CopyFromParent, /*DefaultDepth(_ecore_x_disp, DefaultScreen(_ecore_x_disp)),*/
+                       InputOutput,
+                       CopyFromParent, /*DefaultVisual(_ecore_x_disp, DefaultScreen(_ecore_x_disp)),*/
+                       CWBackingStore |
+                       CWOverrideRedirect |
 /*                    CWColormap | */
-                      CWBorderPixel |
-                      CWBackPixmap | 
-                      CWSaveUnder | 
-                      CWDontPropagate | 
-                      CWEventMask |
-                      CWBitGravity |
-                      CWWinGravity,
-                      &attr);
+                       CWBorderPixel |
+                       CWBackPixmap |
+                       CWSaveUnder |
+                       CWDontPropagate |
+                       CWEventMask |
+                       CWBitGravity |
+                       CWWinGravity,
+                       &attr);
    return win;
 }
 
@@ -158,39 +164,42 @@ ecore_x_window_override_new(Ecore_X_Window parent, int x, int y, int w, int h)
 EAPI Ecore_X_Window
 ecore_x_window_input_new(Ecore_X_Window parent, int x, int y, int w, int h)
 {
-   Window               win;
+   Window win;
    XSetWindowAttributes attr;
-   
+
    LOGFN(__FILE__, __LINE__, __FUNCTION__);
-   if (parent == 0) parent = DefaultRootWindow(_ecore_x_disp);
-   attr.override_redirect     = True;
+   if (parent == 0)
+      parent = DefaultRootWindow(_ecore_x_disp);
+
+   attr.override_redirect = True;
    attr.do_not_propagate_mask = NoEventMask;
-   attr.event_mask            = KeyPressMask |
-                                KeyReleaseMask |
-                                ButtonPressMask |
-                                ButtonReleaseMask |
-                                EnterWindowMask |
-                                LeaveWindowMask |
-                                PointerMotionMask |
-                                ExposureMask |
-                                VisibilityChangeMask |
-                                StructureNotifyMask |
-                                FocusChangeMask |
-                                PropertyChangeMask |
-                                ColormapChangeMask;
+   attr.event_mask = KeyPressMask |
+      KeyReleaseMask |
+      ButtonPressMask |
+      ButtonReleaseMask |
+      EnterWindowMask |
+      LeaveWindowMask |
+      PointerMotionMask |
+      ExposureMask |
+      VisibilityChangeMask |
+      StructureNotifyMask |
+      FocusChangeMask |
+      PropertyChangeMask |
+      ColormapChangeMask;
    win = XCreateWindow(_ecore_x_disp, parent,
-                      x, y, w, h, 0,
-                      CopyFromParent, 
-                      InputOnly,
-                      CopyFromParent, /*DefaultVisual(_ecore_x_disp, DefaultScreen(_ecore_x_disp)),*/
-                      CWOverrideRedirect | 
-                      CWDontPropagate | 
-                      CWEventMask,
-                      &attr);
+                       x, y, w, h, 0,
+                       CopyFromParent,
+                       InputOnly,
+                       CopyFromParent, /*DefaultVisual(_ecore_x_disp, DefaultScreen(_ecore_x_disp)),*/
+                       CWOverrideRedirect |
+                       CWDontPropagate |
+                       CWEventMask,
+                       &attr);
 
    if (parent == DefaultRootWindow(_ecore_x_disp))
      {
      }
+
    return win;
 }
 
@@ -229,11 +238,11 @@ ecore_x_window_defaults_set(Ecore_X_Window win)
    /* The ecore function uses UTF8 which Xlib may not like (especially
     * with older clients) */
    /* ecore_x_window_prop_string_set(win, ECORE_X_ATOM_WM_CLIENT_MACHINE,
-                                 (char *)buf); */
+                                  (char *)buf); */
    if (XStringListToTextProperty(hostname, 1, &xprop))
      {
-       XSetWMClientMachine(_ecore_x_disp, win, &xprop);
-       XFree(xprop.value);
+        XSetWMClientMachine(_ecore_x_disp, win, &xprop);
+        XFree(xprop.value);
      }
 
    /*
@@ -257,8 +266,9 @@ ecore_x_window_configure(Ecore_X_Window win,
 {
    XWindowChanges xwc;
 
-   if (!win) return;
-   
+   if (!win)
+      return;
+
    LOGFN(__FILE__, __LINE__, __FUNCTION__);
 
    xwc.x = x;
@@ -290,7 +300,8 @@ ecore_x_window_free(Ecore_X_Window win)
     * a smart idea.
     */
    LOGFN(__FILE__, __LINE__, __FUNCTION__);
-   if (win) XDestroyWindow(_ecore_x_disp, win);
+   if (win)
+      XDestroyWindow(_ecore_x_disp, win);
 }
 
 /**
@@ -306,35 +317,40 @@ ecore_x_window_ignore_set(Ecore_X_Window win, int ignore)
    LOGFN(__FILE__, __LINE__, __FUNCTION__);
    if (ignore)
      {
-       if (ignore_list)
-         {
-            for (i = 0; i < ignore_num; i++)
-              {
-                 if (win == ignore_list[i])
-                   return;
-              }
-            ignore_list = realloc(ignore_list, (ignore_num + 1) * sizeof(Ecore_X_Window));
-            if (!ignore_list) return;
-            ignore_list[ignore_num++] = win;
-         }
-       else
-         {
-            ignore_num = 0;
-            ignore_list = malloc(sizeof(Ecore_X_Window));
-            ignore_list[ignore_num++] = win;
-         }
+        if (ignore_list)
+          {
+             for (i = 0; i < ignore_num; i++)
+               {
+                  if (win == ignore_list[i])
+                     return;
+               }
+             ignore_list =
+                realloc(ignore_list, (ignore_num + 1) * sizeof(Ecore_X_Window));
+             if (!ignore_list)
+                return;
+
+             ignore_list[ignore_num++] = win;
+          }
+        else
+          {
+             ignore_num = 0;
+             ignore_list = malloc(sizeof(Ecore_X_Window));
+             ignore_list[ignore_num++] = win;
+          }
      }
    else
      {
-       if (!ignore_list) return;
-       for (i = 0, j = 0; i < ignore_num; i++)
-         {
-            if (win != ignore_list[i])
-              ignore_list[i] = ignore_list[j++];
-            else
-              ignore_num--;
-         }
-       ignore_list = realloc(ignore_list, ignore_num * sizeof(Ecore_X_Window));
+        if (!ignore_list)
+           return;
+
+        for (i = 0, j = 0; i < ignore_num; i++)
+          {
+             if (win != ignore_list[i])
+                ignore_list[i] = ignore_list[j++];
+             else
+                ignore_num--;
+          }
+        ignore_list = realloc(ignore_list, ignore_num * sizeof(Ecore_X_Window));
      }
 }
 
@@ -346,7 +362,9 @@ ecore_x_window_ignore_set(Ecore_X_Window win, int ignore)
 EAPI Ecore_X_Window *
 ecore_x_window_ignore_list(int *num)
 {
-   if (num) *num = ignore_num;
+   if (num)
+      *num = ignore_num;
+
    return ignore_list;
 }
 
@@ -363,7 +381,8 @@ ecore_x_window_delete_request_send(Ecore_X_Window win)
    /* sorry sir, deleting the root window doesn't sound like
     * a smart idea.
     */
-   if (!win) return;
+   if (!win)
+      return;
 
    LOGFN(__FILE__, __LINE__, __FUNCTION__);
    xev.xclient.type = ClientMessage;
@@ -418,9 +437,18 @@ ecore_x_window_hide(Ecore_X_Window win)
    LOGFN(__FILE__, __LINE__, __FUNCTION__);
    root = win;
    if (ScreenCount(_ecore_x_disp) == 1)
-     root = DefaultRootWindow(_ecore_x_disp);
+      root = DefaultRootWindow(_ecore_x_disp);
    else
-     XGetGeometry(_ecore_x_disp, win, &root, &idum, &idum, &uidum, &uidum, &uidum, &uidum);
+      XGetGeometry(_ecore_x_disp,
+                   win,
+                   &root,
+                   &idum,
+                   &idum,
+                   &uidum,
+                   &uidum,
+                   &uidum,
+                   &uidum);
+
    xev.xunmap.type = UnmapNotify;
    xev.xunmap.serial = 0;
    xev.xunmap.send_event = True;
@@ -429,7 +457,7 @@ ecore_x_window_hide(Ecore_X_Window win)
    xev.xunmap.window = win;
    xev.xunmap.from_configure = False;
    XSendEvent(_ecore_x_disp, xev.xunmap.event, False,
-             SubstructureRedirectMask | SubstructureNotifyMask, &xev);
+              SubstructureRedirectMask | SubstructureNotifyMask, &xev);
    XUnmapWindow(_ecore_x_disp, win);
 }
 
@@ -468,8 +496,12 @@ EAPI void
 ecore_x_window_resize(Ecore_X_Window win, int w, int h)
 {
    LOGFN(__FILE__, __LINE__, __FUNCTION__);
-   if (w < 1) w = 1;
-   if (h < 1) h = 1;
+   if (w < 1)
+      w = 1;
+
+   if (h < 1)
+      h = 1;
+
    XResizeWindow(_ecore_x_disp, win, w, h);
 }
 
@@ -486,8 +518,12 @@ EAPI void
 ecore_x_window_move_resize(Ecore_X_Window win, int x, int y, int w, int h)
 {
    LOGFN(__FILE__, __LINE__, __FUNCTION__);
-   if (w < 1) w = 1;
-   if (h < 1) h = 1;
+   if (w < 1)
+      w = 1;
+
+   if (h < 1)
+      h = 1;
+
    XMoveResizeWindow(_ecore_x_disp, win, x, y, w, h);
 }
 
@@ -506,8 +542,9 @@ EAPI void
 ecore_x_window_focus(Ecore_X_Window win)
 {
    LOGFN(__FILE__, __LINE__, __FUNCTION__);
-   if (win == 0) win = DefaultRootWindow(_ecore_x_disp);   
-//   XSetInputFocus(_ecore_x_disp, win, RevertToNone, CurrentTime);
+   if (win == 0)
+      win = DefaultRootWindow(_ecore_x_disp);  //   XSetInputFocus(_ecore_x_disp, win, RevertToNone, CurrentTime);
+
 //   XSetInputFocus(_ecore_x_disp, win, RevertToPointerRoot, CurrentTime);
    XSetInputFocus(_ecore_x_disp, win, RevertToParent, CurrentTime);
 }
@@ -522,8 +559,9 @@ EAPI void
 ecore_x_window_focus_at_time(Ecore_X_Window win, Ecore_X_Time t)
 {
    LOGFN(__FILE__, __LINE__, __FUNCTION__);
-   if (win == 0) win = DefaultRootWindow(_ecore_x_disp);   
-//   XSetInputFocus(_ecore_x_disp, win, RevertToNone, t);
+   if (win == 0)
+      win = DefaultRootWindow(_ecore_x_disp);  //   XSetInputFocus(_ecore_x_disp, win, RevertToNone, t);
+
 //   XSetInputFocus(_ecore_x_disp, win, PointerRoot, t);
    XSetInputFocus(_ecore_x_disp, win, RevertToParent, t);
 }
@@ -538,7 +576,7 @@ ecore_x_window_focus_get(void)
 {
    Window win;
    int revert_mode;
-   
+
    LOGFN(__FILE__, __LINE__, __FUNCTION__);
    win = 0;
    XGetInputFocus(_ecore_x_disp, &win, &revert_mode);
@@ -590,10 +628,15 @@ ecore_x_window_lower(Ecore_X_Window win)
  * @ingroup Ecore_X_Window_Parent_Group
  */
 EAPI void
-ecore_x_window_reparent(Ecore_X_Window win, Ecore_X_Window new_parent, int x, int y)
+ecore_x_window_reparent(Ecore_X_Window win,
+                        Ecore_X_Window new_parent,
+                        int x,
+                        int y)
 {
    LOGFN(__FILE__, __LINE__, __FUNCTION__);
-   if (new_parent == 0) new_parent = DefaultRootWindow(_ecore_x_disp);   
+   if (new_parent == 0)
+      new_parent = DefaultRootWindow(_ecore_x_disp);
+
    XReparentWindow(_ecore_x_disp, win, new_parent, x, y);
 }
 
@@ -608,9 +651,11 @@ EAPI void
 ecore_x_window_size_get(Ecore_X_Window win, int *w, int *h)
 {
    int dummy_x, dummy_y;
-   
+
    LOGFN(__FILE__, __LINE__, __FUNCTION__);
-   if (win == 0)  win = DefaultRootWindow(_ecore_x_disp);
+   if (win == 0)
+      win = DefaultRootWindow(_ecore_x_disp);
+
    ecore_x_drawable_geometry_get(win, &dummy_x, &dummy_y, w, h);
 }
 
@@ -627,7 +672,9 @@ EAPI void
 ecore_x_window_geometry_get(Ecore_X_Window win, int *x, int *y, int *w, int *h)
 {
    LOGFN(__FILE__, __LINE__, __FUNCTION__);
-   if (!win) win = DefaultRootWindow(_ecore_x_disp);
+   if (!win)
+      win = DefaultRootWindow(_ecore_x_disp);
+
    ecore_x_drawable_geometry_get(win, x, y, w, h);
 }
 
@@ -642,7 +689,9 @@ ecore_x_window_border_width_get(Ecore_X_Window win)
 {
    LOGFN(__FILE__, __LINE__, __FUNCTION__);
    /* doesn't make sense to call this on a root window */
-   if (!win) return 0;
+   if (!win)
+      return 0;
+
    return ecore_x_drawable_border_width_get(win);
 }
 
@@ -657,7 +706,9 @@ ecore_x_window_border_width_set(Ecore_X_Window win, int width)
 {
    LOGFN(__FILE__, __LINE__, __FUNCTION__);
    /* doesn't make sense to call this on a root window */
-   if (!win) return;
+   if (!win)
+      return;
+
    XSetWindowBorderWidth (_ecore_x_disp, win, width);
 }
 
@@ -672,7 +723,7 @@ ecore_x_window_depth_get(Ecore_X_Window win)
    LOGFN(__FILE__, __LINE__, __FUNCTION__);
    return ecore_x_drawable_depth_get(win);
 }
-  
+
 /**
  * To be documented.
  *
@@ -682,31 +733,31 @@ EAPI void
 ecore_x_window_cursor_show(Ecore_X_Window win, int show)
 {
    LOGFN(__FILE__, __LINE__, __FUNCTION__);
-   if (win == 0) win = DefaultRootWindow(_ecore_x_disp);
+   if (win == 0)
+      win = DefaultRootWindow(_ecore_x_disp);
+
    if (!show)
      {
-       Cursor              c;
-       XColor              cl;
-       Pixmap              p, m;
-       GC                  gc;
-       XGCValues           gcv;
-       
-       p = XCreatePixmap(_ecore_x_disp, win, 1, 1, 1);
-       m = XCreatePixmap(_ecore_x_disp, win, 1, 1, 1);
-       gc = XCreateGC(_ecore_x_disp, m, 0, &gcv);
-       XSetForeground(_ecore_x_disp, gc, 0);
-       XDrawPoint(_ecore_x_disp, m, gc, 0, 0);
-       XFreeGC(_ecore_x_disp, gc);
-       c = XCreatePixmapCursor(_ecore_x_disp, p, m, &cl, &cl, 0, 0);
-       XDefineCursor(_ecore_x_disp, win, c);
-       XFreeCursor(_ecore_x_disp, c);
-       XFreePixmap(_ecore_x_disp, p);
-       XFreePixmap(_ecore_x_disp, m);
+        Cursor c;
+        XColor cl;
+        Pixmap p, m;
+        GC gc;
+        XGCValues gcv;
+
+        p = XCreatePixmap(_ecore_x_disp, win, 1, 1, 1);
+        m = XCreatePixmap(_ecore_x_disp, win, 1, 1, 1);
+        gc = XCreateGC(_ecore_x_disp, m, 0, &gcv);
+        XSetForeground(_ecore_x_disp, gc, 0);
+        XDrawPoint(_ecore_x_disp, m, gc, 0, 0);
+        XFreeGC(_ecore_x_disp, gc);
+        c = XCreatePixmapCursor(_ecore_x_disp, p, m, &cl, &cl, 0, 0);
+        XDefineCursor(_ecore_x_disp, win, c);
+        XFreeCursor(_ecore_x_disp, c);
+        XFreePixmap(_ecore_x_disp, p);
+        XFreePixmap(_ecore_x_disp, m);
      }
    else
-     {
-       XDefineCursor(_ecore_x_disp, win, 0);   
-     }
+        XDefineCursor(_ecore_x_disp, win, 0);
 }
 
 EAPI void
@@ -714,9 +765,9 @@ ecore_x_window_cursor_set(Ecore_X_Window win, Ecore_X_Cursor c)
 {
    LOGFN(__FILE__, __LINE__, __FUNCTION__);
    if (c == 0)
-     XUndefineCursor(_ecore_x_disp, win);
+      XUndefineCursor(_ecore_x_disp, win);
    else
-     XDefineCursor(_ecore_x_disp, win, c);
+      XDefineCursor(_ecore_x_disp, win, c);
 }
 
 /**
@@ -740,12 +791,12 @@ ecore_x_window_visible_get(Ecore_X_Window win)
 typedef struct _Shadow Shadow;
 struct _Shadow
 {
-   Shadow         *parent;
-   Shadow        **children;
-   Window          win;
-   int             children_num;
-   short           x, y;
-   unsigned short  w, h;
+   Shadow *parent;
+   Shadow **children;
+   Window win;
+   int children_num;
+   short x, y;
+   unsigned short w, h;
 };
 
 static Shadow **shadow_base = NULL;
@@ -754,61 +805,70 @@ static int shadow_num = 0;
 static Shadow *
 _ecore_x_window_tree_walk(Window win)
 {
-   Window           *list = NULL;
-   Window            parent_win = 0, root_win = 0;
-   unsigned int      num;
-   Shadow           *s, **sl;
+   Window *list = NULL;
+   Window parent_win = 0, root_win = 0;
+   unsigned int num;
+   Shadow *s, **sl;
    XWindowAttributes att;
 
-   if (!XGetWindowAttributes(_ecore_x_disp, win, &att)) return NULL;
-//   if (att.class == InputOnly) return NULL;
-   if (att.map_state != IsViewable) return NULL;
-   
+   if (!XGetWindowAttributes(_ecore_x_disp, win, &att))
+      return NULL;  //   if (att.class == InputOnly) return NULL;
+
+   if (att.map_state != IsViewable)
+      return NULL;
+
    s = calloc(1, sizeof(Shadow));
-   if (!s) return NULL;
+   if (!s)
+      return NULL;
+
    s->win = win;
    s->x = att.x;
    s->y = att.y;
    s->w = att.width;
    s->h = att.height;
    if (XQueryTree(_ecore_x_disp, s->win, &root_win, &parent_win,
-                  &list, &num))
+                  &list, &num))
      {
-       s->children = calloc(1, sizeof(Shadow *) * num);
-       if (s->children)
-         {
-            size_t i, j;
-            s->children_num = num;
-            for (i = 0; i < num; i++)
-              {
-                 s->children[i] = _ecore_x_window_tree_walk(list[i]);
-                 if (s->children[i]) s->children[i]->parent = s;
-              }
-            /* compress list down */
-            j = 0;
-            for (i = 0; i < num; i++)
-              {
-                 if (s->children[i])
-                   {
-                      s->children[j] = s->children[i];
-                      j++;
-                   }
-              }
-            if (j == 0)
-              {
-                 free(s->children);
-                 s->children = NULL;
-                 s->children_num = 0;
-              }
-            else
-              {
-                 s->children_num = j;
-                 sl = realloc(s->children, sizeof(Shadow *) * j);
-                 if (sl) s->children = sl;
-              }
-         }
+        s->children = calloc(1, sizeof(Shadow *) * num);
+        if (s->children)
+          {
+             size_t i, j;
+             s->children_num = num;
+             for (i = 0; i < num; i++)
+               {
+                  s->children[i] = _ecore_x_window_tree_walk(list[i]);
+                  if (s->children[i])
+                     s->children[i]->parent = s;
+               }
+             /* compress list down */
+             j = 0;
+             for (i = 0; i < num; i++)
+               {
+                  if (s->children[i])
+                    {
+                       s->children[j] = s->children[i];
+                       j++;
+                    }
+               }
+             if (j == 0)
+               {
+                  free(s->children);
+                  s->children = NULL;
+                  s->children_num = 0;
+               }
+             else
+               {
+                  s->children_num = j;
+                  sl = realloc(s->children, sizeof(Shadow *) * j);
+                  if (sl)
+                     s->children = sl;
+               }
+          }
      }
-   if (list) XFree(list);
+
+   if (list)
+      XFree(list);
+
    return s;
 }
 
@@ -817,31 +877,38 @@ _ecore_x_window_tree_shadow_free1(Shadow *s)
 {
    int i;
 
-   if (!s) return;
+   if (!s)
+      return;
+
    if (s->children)
      {
-       for (i = 0; i < s->children_num; i++)
-         {
-            if (s->children[i])
-              _ecore_x_window_tree_shadow_free1(s->children[i]);
-         }
-       free(s->children);
+        for (i = 0; i < s->children_num; i++)
+          {
+             if (s->children[i])
+                _ecore_x_window_tree_shadow_free1(s->children[i]);
+          }
+        free(s->children);
      }
-   free(s);
+
+        free(s);
 }
 
 static void
 _ecore_x_window_tree_shadow_free(void)
 {
    int i;
-   
-   if (!shadow_base) return;
+
+   if (!shadow_base)
+      return;
+
    for (i = 0; i < shadow_num; i++)
      {
-       if (!shadow_base[i]) continue;
-       _ecore_x_window_tree_shadow_free1(shadow_base[i]);
+        if (!shadow_base[i])
+           continue;
+
+        _ecore_x_window_tree_shadow_free1(shadow_base[i]);
      }
-   free(shadow_base);
+        free(shadow_base);
    shadow_base = NULL;
    shadow_num = 0;
 }
@@ -849,42 +916,43 @@ _ecore_x_window_tree_shadow_free(void)
 static void
 _ecore_x_window_tree_shadow_populate(void)
 {
-   Ecore_X_Window   *roots;
-   int               i, num;
-   
+   Ecore_X_Window *roots;
+   int i, num;
+
    roots = ecore_x_window_root_list(&num);
    if (roots)
      {
-       shadow_base = calloc(1, sizeof(Shadow *) * num);
-       if (shadow_base)
-         {
-            shadow_num = num;
-            for (i = 0; i < num; i++)
-              shadow_base[i] = _ecore_x_window_tree_walk(roots[i]);
-         }
-       free(roots);
+        shadow_base = calloc(1, sizeof(Shadow *) * num);
+        if (shadow_base)
+          {
+             shadow_num = num;
+             for (i = 0; i < num; i++)
+                shadow_base[i] = _ecore_x_window_tree_walk(roots[i]);
+          }
+
+        free(roots);
      }
 }
 
 /*
-static int shadow_count = 0;
+   static int shadow_count = 0;
 
-static void
-_ecore_x_window_tree_shadow_start(void)
-{
+   static void
+   _ecore_x_window_tree_shadow_start(void)
+   {
    shadow_count++;
    if (shadow_count > 1) return;
    _ecore_x_window_tree_shadow_populate();
-}
+   }
 
-static void
-_ecore_x_window_tree_shadow_stop(void)
-{
+   static void
+   _ecore_x_window_tree_shadow_stop(void)
+   {
    shadow_count--;
    if (shadow_count != 0) return;
    _ecore_x_window_tree_shadow_free();
-}
-*/
+   }
+ */
 
 static Shadow *
 _ecore_x_window_shadow_tree_find_shadow(Shadow *s, Window win)
@@ -892,16 +960,20 @@ _ecore_x_window_shadow_tree_find_shadow(Shadow *s, Window win)
    Shadow *ss;
    int i;
 
-   if (s->win == win) return s;
+   if (s->win == win)
+      return s;
+
    if (s->children)
-     {
-       for (i = 0; i < s->children_num; i++)
-         {
-            if (!s->children[i]) continue;
-            if ((ss = _ecore_x_window_shadow_tree_find_shadow(s->children[i], win)))
-              return ss;
-         }
-     }
+      for (i = 0; i < s->children_num; i++)
+        {
+           if (!s->children[i])
+              continue;
+
+           if ((ss =
+                   _ecore_x_window_shadow_tree_find_shadow(s->children[i], win)))
+              return ss;
+        }
+
    return NULL;
 }
 
@@ -913,71 +985,93 @@ _ecore_x_window_shadow_tree_find(Window base)
 
    for (i = 0; i < shadow_num; i++)
      {
-       if (!shadow_base[i]) continue;
-       if ((s = _ecore_x_window_shadow_tree_find_shadow(shadow_base[i], base)))
-         return s;
+        if (!shadow_base[i])
+           continue;
+
+        if ((s = _ecore_x_window_shadow_tree_find_shadow(shadow_base[i], base)))
+           return s;
      }
    return NULL;
 }
 
 static Window
-_ecore_x_window_shadow_tree_at_xy_get_shadow(Shadow *s, int bx, int by, int x, int y,
-                                            Ecore_X_Window *skip, int skip_num)
+_ecore_x_window_shadow_tree_at_xy_get_shadow(Shadow *s,
+                                             int bx,
+                                             int by,
+                                             int x,
+                                             int y,
+                                             Ecore_X_Window *skip,
+                                             int skip_num)
 {
    Window child;
    int i, j;
    int wx, wy;
-   
+
    wx = s->x + bx;
    wy = s->y + by;
    if (!((x >= wx) && (y >= wy) && (x < (wx + s->w)) && (y < (wy + s->h))))
-     return 0;
+      return 0;
+
    if (s->children)
      {
-       int skipit = 0;
-       
-       for (i = s->children_num - 1; i >= 0; --i)
-         {
-            if (!s->children[i]) continue;
-            skipit = 0;
-            if (skip)
-              {
-                 for (j = 0; j < skip_num; j++)
-                   {
-                      if (s->children[i]->win == skip[j])
-                        {
-                           skipit = 1;
-                           goto onward;
-                        }
-                   }
-              }
-            onward:
-            if (!skipit)
-              {
-                 if ((child = _ecore_x_window_shadow_tree_at_xy_get_shadow(s->children[i], wx, wy, x, y, skip, skip_num)))
-                   {
-                      return child;
-                   }
-              }
-         }
+        int skipit = 0;
+
+        for (i = s->children_num - 1; i >= 0; --i)
+          {
+             if (!s->children[i])
+                continue;
+
+             skipit = 0;
+             if (skip)
+                for (j = 0; j < skip_num; j++)
+                  {
+                     if (s->children[i]->win == skip[j])
+                       {
+                          skipit = 1;
+                          goto onward;
+                       }
+                  }
+
+onward:
+             if (!skipit)
+                if ((child =
+                        _ecore_x_window_shadow_tree_at_xy_get_shadow(s->
+                                                                     children[i
+                                                                     ], wx, wy,
+                                                                     x, y, skip,
+                                                                     skip_num)))
+                   return child;
+
+          }
      }
+
    return s->win;
 }
 
 static Window
 _ecore_x_window_shadow_tree_at_xy_get(Window base, int bx, int by, int x, int y,
-                                     Ecore_X_Window *skip, int skip_num)
+                                      Ecore_X_Window *skip, int skip_num)
 {
    Shadow *s;
-   
+
    if (!shadow_base)
      {
-       _ecore_x_window_tree_shadow_populate();
-       if (!shadow_base) return 0;
+        _ecore_x_window_tree_shadow_populate();
+        if (!shadow_base)
+           return 0;
      }
+
    s = _ecore_x_window_shadow_tree_find(base);
-   if (!s) return 0;
-   return _ecore_x_window_shadow_tree_at_xy_get_shadow(s, bx, by, x, y, skip, skip_num);
+   if (!s)
+      return 0;
+
+   return _ecore_x_window_shadow_tree_at_xy_get_shadow(s,
+                                                       bx,
+                                                       by,
+                                                       x,
+                                                       y,
+                                                       skip,
+                                                       skip_num);
 }
 
 /**
@@ -993,10 +1087,20 @@ _ecore_x_window_shadow_tree_at_xy_get(Window base, int bx, int by, int x, int y,
  * @ingroup Ecore_X_Window_Geometry_Group
  */
 EAPI Ecore_X_Window
-ecore_x_window_shadow_tree_at_xy_with_skip_get(Ecore_X_Window base, int x, int y, Ecore_X_Window *skip, int skip_num)
+ecore_x_window_shadow_tree_at_xy_with_skip_get(Ecore_X_Window base,
+                                               int x,
+                                               int y,
+                                               Ecore_X_Window *skip,
+                                               int skip_num)
 {
-   LOGFN(__FILE__, __LINE__, __FUNCTION__);
-   return _ecore_x_window_shadow_tree_at_xy_get(base, 0, 0, x, y, skip, skip_num);
+        LOGFN(__FILE__, __LINE__, __FUNCTION__);
+   return _ecore_x_window_shadow_tree_at_xy_get(base,
+                                                0,
+                                                0,
+                                                x,
+                                                y,
+                                                skip,
+                                                skip_num);
 }
 
 /**
@@ -1008,26 +1112,33 @@ ecore_x_window_shadow_tree_at_xy_with_skip_get(Ecore_X_Window base, int x, int y
  * @ingroup Ecore_X_Window_Geometry_Group
  */
 EAPI Ecore_X_Window
-ecore_x_window_shadow_parent_get(Ecore_X_Window root __UNUSED__, Ecore_X_Window win)
+ecore_x_window_shadow_parent_get(Ecore_X_Window root __UNUSED__,
+                                 Ecore_X_Window win)
 {
    Shadow *s;
    int i;
-   
-   LOGFN(__FILE__, __LINE__, __FUNCTION__);
+
+        LOGFN(__FILE__, __LINE__, __FUNCTION__);
    if (!shadow_base)
      {
-       _ecore_x_window_tree_shadow_populate();
-       if (!shadow_base) return 0;
+        _ecore_x_window_tree_shadow_populate();
+        if (!shadow_base)
+           return 0;
      }
+
    for (i = 0; i < shadow_num; i++)
      {
-       if (!shadow_base[i]) continue;
-       s = _ecore_x_window_shadow_tree_find_shadow(shadow_base[i], win);
-       if (s)
-         {
-            if (!s->parent) return 0;
-            return s->parent->win;
-         }
+        if (!shadow_base[i])
+           continue;
+
+        s = _ecore_x_window_shadow_tree_find_shadow(shadow_base[i], win);
+        if (s)
+          {
+             if (!s->parent)
+                return 0;
+
+             return s->parent->win;
+          }
      }
    return 0;
 }
@@ -1055,22 +1166,24 @@ ecore_x_window_root_get(Ecore_X_Window win)
    XWindowAttributes att;
 
    LOGFN(__FILE__, __LINE__, __FUNCTION__);
-   if (!XGetWindowAttributes(_ecore_x_disp, win, &att)) return 0;
+   if (!XGetWindowAttributes(_ecore_x_disp, win, &att))
+      return 0;
+
    return att.root;
 }
 
 static Window
 _ecore_x_window_at_xy_get(Window base, int bx, int by, int x, int y,
-                         Ecore_X_Window *skip, int skip_num)
+                          Ecore_X_Window *skip, int skip_num)
 {
-   Window           *list = NULL;
-   Window            parent_win = 0, child = 0, root_win = 0;
-   int               i, j, wx, wy, ww, wh;
-   unsigned int      num;
+   Window *list = NULL;
+   Window parent_win = 0, child = 0, root_win = 0;
+   int i, j, wx, wy, ww, wh;
+   unsigned int num;
 
    LOGFN(__FILE__, __LINE__, __FUNCTION__);
    if (!ecore_x_window_visible_get(base))
-     return 0;
+      return 0;
 
    LOGFN(__FILE__, __LINE__, __FUNCTION__);
    ecore_x_window_geometry_get(base, &wx, &wy, &ww, &wh);
@@ -1078,43 +1191,44 @@ _ecore_x_window_at_xy_get(Window base, int bx, int by, int x, int y,
    wy += by;
 
    if (!((x >= wx) && (y >= wy) && (x < (wx + ww)) && (y < (wy + wh))))
-     return 0;
+      return 0;
 
    LOGFN(__FILE__, __LINE__, __FUNCTION__);
    if (!XQueryTree(_ecore_x_disp, base, &root_win, &parent_win, &list, &num))
-     return base;
+      return base;
 
    if (list)
      {
-       int skipit = 0;
-       
-       for (i = num - 1; i >= 0; --i)
-         {
-            skipit = 0;
-            
-            if (skip)
-              {
-                 for (j = 0; j < skip_num; j++)
-                   {
-                      if (list[i] == skip[j])
-                        {
-                           skipit = 1;
-                           goto onward;
-                        }
-                   }
-              }
-            onward:
-            if (!skipit)
-              {
-                 if ((child = _ecore_x_window_at_xy_get(list[i], wx, wy, x, y, skip, skip_num)))
-                   {
-                      XFree(list);
-                      return child;
-                   }
-              }
-         }
-       XFree(list);
+        int skipit = 0;
+
+        for (i = num - 1; i >= 0; --i)
+          {
+             skipit = 0;
+
+             if (skip)
+                for (j = 0; j < skip_num; j++)
+                  {
+                     if (list[i] == skip[j])
+                       {
+                          skipit = 1;
+                          goto onward;
+                       }
+                  }
+
+onward:
+             if (!skipit)
+                if ((child =
+                        _ecore_x_window_at_xy_get(list[i], wx, wy, x, y, skip,
+                                                  skip_num)))
+                  {
+                     XFree(list);
+                     return child;
+                  }
+
+          }
+                     XFree(list);
      }
+
    return base;
 }
 
@@ -1128,17 +1242,17 @@ _ecore_x_window_at_xy_get(Window base, int bx, int by, int x, int y,
 EAPI Ecore_X_Window
 ecore_x_window_at_xy_get(int x, int y)
 {
-   Ecore_X_Window    win, root;
-   
+   Ecore_X_Window win, root;
+
    LOGFN(__FILE__, __LINE__, __FUNCTION__);
    /* FIXME: Proper function to determine current root/virtual root
     * window missing here */
    root = DefaultRootWindow(_ecore_x_disp);
-   
+
    ecore_x_grab();
    win = _ecore_x_window_at_xy_get(root, 0, 0, x, y, NULL, 0);
    ecore_x_ungrab();
-   
+
    return win ? win : root;
 }
 
@@ -1151,32 +1265,35 @@ ecore_x_window_at_xy_get(int x, int y)
  * @ingroup Ecore_X_Window_Geometry_Group
  */
 EAPI Ecore_X_Window
-ecore_x_window_at_xy_with_skip_get(int x, int y, Ecore_X_Window *skip, int skip_num)
+ecore_x_window_at_xy_with_skip_get(int x,
+                                   int y,
+                                   Ecore_X_Window *skip,
+                                   int skip_num)
 {
-   Ecore_X_Window    win, root;
-   
+   Ecore_X_Window win, root;
+
    LOGFN(__FILE__, __LINE__, __FUNCTION__);
    /* FIXME: Proper function to determine current root/virtual root
     * window missing here */
    root = DefaultRootWindow(_ecore_x_disp);
-   
+
    ecore_x_grab();
    win = _ecore_x_window_at_xy_get(root, 0, 0, x, y, skip, skip_num);
    ecore_x_ungrab();
-   
+
    return win ? win : root;
 }
 
 EAPI Ecore_X_Window
 ecore_x_window_at_xy_begin_get(Ecore_X_Window begin, int x, int y)
 {
-   Ecore_X_Window    win;
-   
+   Ecore_X_Window win;
+
    LOGFN(__FILE__, __LINE__, __FUNCTION__);
    ecore_x_grab();
    win = _ecore_x_window_at_xy_get(begin, 0, 0, x, y, NULL, 0);
    ecore_x_ungrab();
-   
+
    return win ? win : begin;
 }
 
@@ -1189,12 +1306,13 @@ ecore_x_window_at_xy_begin_get(Ecore_X_Window begin, int x, int y)
 EAPI Ecore_X_Window
 ecore_x_window_parent_get(Ecore_X_Window win)
 {
-   Window         root, parent, *children = NULL;
-   unsigned int   num;
+   Window root, parent, *children = NULL;
+   unsigned int num;
 
    LOGFN(__FILE__, __LINE__, __FUNCTION__);
    if (!XQueryTree(_ecore_x_disp, win, &root, &parent, &children, &num))
       return 0;
+
    if (children)
       XFree(children);
 
@@ -1210,7 +1328,7 @@ ecore_x_window_parent_get(Ecore_X_Window win)
  */
 EAPI void
 ecore_x_window_background_color_set(Ecore_X_Window win, unsigned short r,
-                                   unsigned short g, unsigned short b)
+                                    unsigned short g, unsigned short b)
 {
    XSetWindowAttributes attr;
    Colormap map;
@@ -1232,7 +1350,7 @@ EAPI void
 ecore_x_window_gravity_set(Ecore_X_Window win, Ecore_X_Gravity grav)
 {
    XSetWindowAttributes att;
-   
+
    LOGFN(__FILE__, __LINE__, __FUNCTION__);
    att.win_gravity = grav;
    XChangeWindowAttributes(_ecore_x_disp, win, CWWinGravity, &att);
@@ -1242,7 +1360,7 @@ EAPI void
 ecore_x_window_pixel_gravity_set(Ecore_X_Window win, Ecore_X_Gravity grav)
 {
    XSetWindowAttributes att;
-   
+
    LOGFN(__FILE__, __LINE__, __FUNCTION__);
    att.bit_gravity = grav;
    XChangeWindowAttributes(_ecore_x_disp, win, CWBitGravity, &att);
@@ -1273,107 +1391,118 @@ EAPI void
 ecore_x_window_override_set(Ecore_X_Window win, int override)
 {
    XSetWindowAttributes att;
-   
+
    LOGFN(__FILE__, __LINE__, __FUNCTION__);
    att.override_redirect = override;
    XChangeWindowAttributes(_ecore_x_disp, win, CWOverrideRedirect, &att);
 }
 
-#ifdef ECORE_XRENDER   
+#ifdef ECORE_XRENDER
 static Ecore_X_Window
-_ecore_x_window_argb_internal_new(Ecore_X_Window parent, int x, int y, int w, int h, int override, int saveunder)
+_ecore_x_window_argb_internal_new(Ecore_X_Window parent,
+                                  int x,
+                                  int y,
+                                  int w,
+                                  int h,
+                                  int override,
+                                  int saveunder)
 {
-   Window                win;
-   XSetWindowAttributes  attr;
-   XWindowAttributes     att;
-   XVisualInfo          *xvi;
-   XVisualInfo           vi_in;
-   int                   nvi, i, scr = 0;
-   XRenderPictFormat    *fmt;
-   Visual               *vis;
-   
+   Window win;
+   XSetWindowAttributes attr;
+   XWindowAttributes att;
+   XVisualInfo *xvi;
+   XVisualInfo vi_in;
+   int nvi, i, scr = 0;
+   XRenderPictFormat *fmt;
+   Visual *vis;
+
    if (parent == 0)
      {
-       parent = DefaultRootWindow(_ecore_x_disp);
-       scr = DefaultScreen(_ecore_x_disp);
+        parent = DefaultRootWindow(_ecore_x_disp);
+        scr = DefaultScreen(_ecore_x_disp);
      }
    else
      {
-       /* ewww - round trip */
-       XGetWindowAttributes(_ecore_x_disp, parent, &att);
-       for (i = 0; i < ScreenCount(_ecore_x_disp); i++)
-         {
-            if (att.screen == ScreenOfDisplay(_ecore_x_disp, i))
-              {
-                 scr = i;
-                 break;
-              }
-         }
+        /* ewww - round trip */
+        XGetWindowAttributes(_ecore_x_disp, parent, &att);
+        for (i = 0; i < ScreenCount(_ecore_x_disp); i++)
+          {
+             if (att.screen == ScreenOfDisplay(_ecore_x_disp, i))
+               {
+                  scr = i;
+                  break;
+               }
+          }
      }
+
    vi_in.screen = scr;
    vi_in.depth = 32;
    vi_in.class = TrueColor;
    xvi = XGetVisualInfo(_ecore_x_disp,
-                       VisualScreenMask |
-                       VisualDepthMask |
-                       VisualClassMask,
-                       &vi_in,
-                       &nvi);
-   if (xvi == NULL) return 0;
+                        VisualScreenMask |
+                        VisualDepthMask |
+                        VisualClassMask,
+                        &vi_in,
+                        &nvi);
+   if (xvi == NULL)
+      return 0;
+
    vis = NULL;
    for (i = 0; i < nvi; i++)
      {
-       fmt = XRenderFindVisualFormat(_ecore_x_disp, xvi[i].visual);
-       if ((fmt->type == PictTypeDirect) && (fmt->direct.alphaMask))
-         {
-            vis = xvi[i].visual;
-            break;
-         }
+        fmt = XRenderFindVisualFormat(_ecore_x_disp, xvi[i].visual);
+        if ((fmt->type == PictTypeDirect) && (fmt->direct.alphaMask))
+          {
+             vis = xvi[i].visual;
+             break;
+          }
      }
    XFree (xvi);
-   
-   attr.backing_store         = NotUseful;
-   attr.override_redirect     = override;
-   attr.colormap              = XCreateColormap(_ecore_x_disp, parent,
-                                               vis, AllocNone);
-   attr.border_pixel          = 0;
-   attr.background_pixmap     = None;
-   attr.bit_gravity           = NorthWestGravity;
-   attr.win_gravity           = NorthWestGravity;
-   attr.save_under            = saveunder;
+
+   attr.backing_store = NotUseful;
+   attr.override_redirect = override;
+   attr.colormap = XCreateColormap(_ecore_x_disp, parent,
+                                   vis, AllocNone);
+   attr.border_pixel = 0;
+   attr.background_pixmap = None;
+   attr.bit_gravity = NorthWestGravity;
+   attr.win_gravity = NorthWestGravity;
+   attr.save_under = saveunder;
    attr.do_not_propagate_mask = NoEventMask;
-   attr.event_mask            = KeyPressMask |
-                                KeyReleaseMask |
-                                ButtonPressMask |
-                                ButtonReleaseMask |
-                                EnterWindowMask |
-                                LeaveWindowMask |
-                                PointerMotionMask |
-                                ExposureMask |
-                                VisibilityChangeMask |
-                                StructureNotifyMask |
-                                FocusChangeMask |
-                                PropertyChangeMask |
-                                ColormapChangeMask;
+   attr.event_mask = KeyPressMask |
+      KeyReleaseMask |
+      ButtonPressMask |
+      ButtonReleaseMask |
+      EnterWindowMask |
+      LeaveWindowMask |
+      PointerMotionMask |
+      ExposureMask |
+      VisibilityChangeMask |
+      StructureNotifyMask |
+      FocusChangeMask |
+      PropertyChangeMask |
+      ColormapChangeMask;
    win = XCreateWindow(_ecore_x_disp, parent,
-                      x, y, w, h, 0,
-                      32, 
-                      InputOutput, 
-                      vis,
-                      CWBackingStore |
-                      CWOverrideRedirect | 
-                      CWColormap |
-                      CWBorderPixel |
-                      CWBackPixmap | 
-                      CWSaveUnder | 
-                      CWDontPropagate | 
-                      CWEventMask |
-                      CWBitGravity |
-                      CWWinGravity,
-                      &attr);
+                       x, y, w, h, 0,
+                       32,
+                       InputOutput,
+                       vis,
+                       CWBackingStore |
+                       CWOverrideRedirect |
+                       CWColormap |
+                       CWBorderPixel |
+                       CWBackPixmap |
+                       CWSaveUnder |
+                       CWDontPropagate |
+                       CWEventMask |
+                       CWBitGravity |
+                       CWWinGravity,
+                       &attr);
    XFreeColormap(_ecore_x_disp, attr.colormap);
 
-   if (parent == DefaultRootWindow(_ecore_x_disp)) ecore_x_window_defaults_set(win);
+   if (parent == DefaultRootWindow(_ecore_x_disp))
+      ecore_x_window_defaults_set(win);
+
    return win;
 }
 #endif
@@ -1381,19 +1510,25 @@ _ecore_x_window_argb_internal_new(Ecore_X_Window parent, int x, int y, int w, in
 EAPI int
 ecore_x_window_argb_get(Ecore_X_Window win)
 {
-#ifdef ECORE_XRENDER   
+#ifdef ECORE_XRENDER
    XWindowAttributes att;
    XRenderPictFormat *fmt;
 
    att.visual = 0;
-   if (!XGetWindowAttributes(_ecore_x_disp, win, &att)) return 0;
+   if (!XGetWindowAttributes(_ecore_x_disp, win, &att))
+      return 0;
+
    fmt = XRenderFindVisualFormat(_ecore_x_disp, att.visual);
-   if (!fmt) return 0;
-   if ((fmt->type == PictTypeDirect) && (fmt->direct.alphaMask)) return 1;
+   if (!fmt)
+      return 0;
+
+   if ((fmt->type == PictTypeDirect) && (fmt->direct.alphaMask))
+      return 1;
+
    return 0;
 #else
    return 0;
-#endif   
+#endif
 }
 
 /**
@@ -1408,14 +1543,18 @@ ecore_x_window_argb_get(Ecore_X_Window win)
  * @ingroup Ecore_X_Window_Create_Group
  */
 EAPI Ecore_X_Window
-ecore_x_window_manager_argb_new(Ecore_X_Window parent, int x, int y, int w, int h)
+ecore_x_window_manager_argb_new(Ecore_X_Window parent,
+                                int x,
+                                int y,
+                                int w,
+                                int h)
 {
-#ifdef ECORE_XRENDER   
+#ifdef ECORE_XRENDER
    LOGFN(__FILE__, __LINE__, __FUNCTION__);
    return _ecore_x_window_argb_internal_new(parent, x, y, w, h, 1, 0);
 #else
    return 0;
-#endif   
+#endif
 }
 
 /**
@@ -1432,12 +1571,12 @@ ecore_x_window_manager_argb_new(Ecore_X_Window parent, int x, int y, int w, int
 EAPI Ecore_X_Window
 ecore_x_window_argb_new(Ecore_X_Window parent, int x, int y, int w, int h)
 {
-#ifdef ECORE_XRENDER   
+#ifdef ECORE_XRENDER
    LOGFN(__FILE__, __LINE__, __FUNCTION__);
    return _ecore_x_window_argb_internal_new(parent, x, y, w, h, 0, 0);
 #else
    return 0;
-#endif   
+#endif
 }
 
 /**
@@ -1452,12 +1591,16 @@ ecore_x_window_argb_new(Ecore_X_Window parent, int x, int y, int w, int h)
  * @ingroup Ecore_X_Window_Create_Group
  */
 EAPI Ecore_X_Window
-ecore_x_window_override_argb_new(Ecore_X_Window parent, int x, int y, int w, int h)
+ecore_x_window_override_argb_new(Ecore_X_Window parent,
+                                 int x,
+                                 int y,
+                                 int w,
+                                 int h)
 {
-#ifdef ECORE_XRENDER   
+#ifdef ECORE_XRENDER
    LOGFN(__FILE__, __LINE__, __FUNCTION__);
    return _ecore_x_window_argb_internal_new(parent, x, y, w, h, 1, 0);
 #else
    return 0;
-#endif   
+#endif
 }
index cf81c3c..d33cb3f 100644 (file)
  */
 EAPI void
 ecore_x_window_prop_card32_set(Ecore_X_Window win, Ecore_X_Atom atom,
-                              unsigned int *val, unsigned int num)
+                               unsigned int *val, unsigned int num)
 {
 #if SIZEOF_INT == SIZEOF_LONG
    _ATOM_SET_CARD32(win, atom, val, num);
 #else
-   long               *v2;
-   unsigned int        i;
+   long *v2;
+   unsigned int i;
 
    LOGFN(__FILE__, __LINE__, __FUNCTION__);
    v2 = malloc(num * sizeof(long));
    if (!v2)
       return;
+
    for (i = 0; i < num; i++)
       v2[i] = val[i];
    _ATOM_SET_CARD32(win, atom, v2, num);
@@ -54,38 +55,36 @@ ecore_x_window_prop_card32_set(Ecore_X_Window win, Ecore_X_Atom atom,
  */
 EAPI int
 ecore_x_window_prop_card32_get(Ecore_X_Window win, Ecore_X_Atom atom,
-                              unsigned int *val, unsigned int len)
+                               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;
-   int                 num;
+   unsigned char *prop_ret;
+   Atom type_ret;
+   unsigned long bytes_after, num_ret;
+   int format_ret;
+   unsigned int i;
+   int num;
 
    LOGFN(__FILE__, __LINE__, __FUNCTION__);
    prop_ret = NULL;
    if (XGetWindowProperty(_ecore_x_disp, win, atom, 0, 0x7fffffff, False,
-                         XA_CARDINAL, &type_ret, &format_ret, &num_ret,
-                         &bytes_after, &prop_ret) != Success)
+                          XA_CARDINAL, &type_ret, &format_ret, &num_ret,
+                          &bytes_after, &prop_ret) != Success)
       return -1;
 
    if (type_ret != XA_CARDINAL || format_ret != 32)
-     {
-       num = -1;
-     }
+      num = -1;
    else if (num_ret == 0 || !prop_ret)
-     {
-       num = 0;
-     }
+      num = 0;
    else
      {
-       if (num_ret < len)
-          len = num_ret;
-       for (i = 0; i < len; i++)
-          val[i] = ((unsigned long *)prop_ret)[i];
-       num = len;
+        if (num_ret < len)
+           len = num_ret;
+
+        for (i = 0; i < len; i++)
+           val[i] = ((unsigned long *)prop_ret)[i];
+        num = len;
      }
+
    if (prop_ret)
       XFree(prop_ret);
 
@@ -101,39 +100,36 @@ ecore_x_window_prop_card32_get(Ecore_X_Window win, Ecore_X_Atom atom,
  */
 EAPI int
 ecore_x_window_prop_card32_list_get(Ecore_X_Window win, Ecore_X_Atom atom,
-                                   unsigned int **plst)
+                                    unsigned int **plst)
 {
-   unsigned char      *prop_ret;
-   Atom                type_ret;
-   unsigned long       bytes_after, num_ret;
-   int                 format_ret;
-   unsigned int        i, *val;
-   int                 num;
+   unsigned char *prop_ret;
+   Atom type_ret;
+   unsigned long bytes_after, num_ret;
+   int format_ret;
+   unsigned int i, *val;
+   int num;
 
    LOGFN(__FILE__, __LINE__, __FUNCTION__);
    *plst = NULL;
    prop_ret = NULL;
    if (XGetWindowProperty(_ecore_x_disp, win, atom, 0, 0x7fffffff, False,
-                         XA_CARDINAL, &type_ret, &format_ret, &num_ret,
-                         &bytes_after, &prop_ret) != Success)
+                          XA_CARDINAL, &type_ret, &format_ret, &num_ret,
+                          &bytes_after, &prop_ret) != Success)
       return -1;
 
    if (type_ret != XA_CARDINAL || format_ret != 32)
-     {
-       num = -1;
-     }
+      num = -1;
    else if (num_ret == 0 || !prop_ret)
-     {
-       num = 0;
-     }
+      num = 0;
    else
      {
-       val = malloc(num_ret * sizeof(unsigned int));
-       for (i = 0; i < num_ret; i++)
-          val[i] = ((unsigned long *)prop_ret)[i];
-       num = num_ret;
-       *plst = val;
+        val = malloc(num_ret * sizeof(unsigned int));
+        for (i = 0; i < num_ret; i++)
+           val[i] = ((unsigned long *)prop_ret)[i];
+        num = num_ret;
+        *plst = val;
      }
+
    if (prop_ret)
       XFree(prop_ret);
 
@@ -145,24 +141,25 @@ ecore_x_window_prop_card32_list_get(Ecore_X_Window win, Ecore_X_Atom atom,
  */
 EAPI void
 ecore_x_window_prop_xid_set(Ecore_X_Window win, Ecore_X_Atom atom,
-                           Ecore_X_Atom type, Ecore_X_ID * lst,
-                           unsigned int num)
+                            Ecore_X_Atom type, Ecore_X_ID *lst,
+                            unsigned int num)
 {
 #if SIZEOF_INT == SIZEOF_LONG
    XChangeProperty(_ecore_x_disp, win, atom, type, 32, PropModeReplace,
-                  (unsigned char *)lst, num);
+                   (unsigned char *)lst, num);
 #else
-   unsigned long      *pl;
-   unsigned int        i;
+   unsigned long *pl;
+   unsigned int i;
 
    LOGFN(__FILE__, __LINE__, __FUNCTION__);
    pl = malloc(num * sizeof(long));
    if (!pl)
       return;
+
    for (i = 0; i < num; i++)
       pl[i] = lst[i];
    XChangeProperty(_ecore_x_disp, win, atom, type, 32, PropModeReplace,
-                  (unsigned char *)pl, num);
+                   (unsigned char *)pl, num);
    free(pl);
 #endif
 }
@@ -177,39 +174,37 @@ ecore_x_window_prop_xid_set(Ecore_X_Window win, Ecore_X_Atom atom,
  */
 EAPI int
 ecore_x_window_prop_xid_get(Ecore_X_Window win, Ecore_X_Atom atom,
-                           Ecore_X_Atom type, Ecore_X_ID * lst,
-                           unsigned int len)
+                            Ecore_X_Atom type, Ecore_X_ID *lst,
+                            unsigned int len)
 {
-   unsigned char      *prop_ret;
-   Atom                type_ret;
-   unsigned long       bytes_after, num_ret;
-   int                 format_ret;
-   int                 num;
-   unsigned            i;
+   unsigned char *prop_ret;
+   Atom type_ret;
+   unsigned long bytes_after, num_ret;
+   int format_ret;
+   int num;
+   unsigned i;
 
    LOGFN(__FILE__, __LINE__, __FUNCTION__);
    prop_ret = NULL;
    if (XGetWindowProperty(_ecore_x_disp, win, atom, 0, 0x7fffffff, False,
-                         type, &type_ret, &format_ret, &num_ret,
-                         &bytes_after, &prop_ret) != Success)
+                          type, &type_ret, &format_ret, &num_ret,
+                          &bytes_after, &prop_ret) != Success)
       return -1;
 
    if (type_ret != type || format_ret != 32)
-     {
-       num = -1;
-     }
+      num = -1;
    else if (num_ret == 0 || !prop_ret)
-     {
-       num = 0;
-     }
+      num = 0;
    else
      {
-       if (num_ret < len)
-          len = num_ret;
-       for (i = 0; i < len; i++)
-          lst[i] = ((unsigned long *)prop_ret)[i];
-       num = len;
+        if (num_ret < len)
+           len = num_ret;
+
+        for (i = 0; i < len; i++)
+           lst[i] = ((unsigned long *)prop_ret)[i];
+        num = len;
      }
+
    if (prop_ret)
       XFree(prop_ret);
 
@@ -226,40 +221,37 @@ ecore_x_window_prop_xid_get(Ecore_X_Window win, Ecore_X_Atom atom,
  */
 EAPI int
 ecore_x_window_prop_xid_list_get(Ecore_X_Window win, Ecore_X_Atom atom,
-                                Ecore_X_Atom type, Ecore_X_ID ** val)
+                                 Ecore_X_Atom type, Ecore_X_ID **val)
 {
-   unsigned char      *prop_ret;
-   Atom                type_ret;
-   unsigned long       bytes_after, num_ret;
-   int                 format_ret;
-   Ecore_X_Atom       *alst;
-   int                 num;
-   unsigned            i;
+   unsigned char *prop_ret;
+   Atom type_ret;
+   unsigned long bytes_after, num_ret;
+   int format_ret;
+   Ecore_X_Atom *alst;
+   int num;
+   unsigned i;
 
    LOGFN(__FILE__, __LINE__, __FUNCTION__);
    *val = NULL;
    prop_ret = NULL;
    if (XGetWindowProperty(_ecore_x_disp, win, atom, 0, 0x7fffffff, False,
-                         type, &type_ret, &format_ret, &num_ret,
-                         &bytes_after, &prop_ret) != Success)
+                          type, &type_ret, &format_ret, &num_ret,
+                          &bytes_after, &prop_ret) != Success)
       return -1;
 
    if (type_ret != type || format_ret != 32)
-     {
-       num = -1;
-     }
+      num = -1;
    else if (num_ret == 0 || !prop_ret)
-     {
-       num = 0;
-     }
+      num = 0;
    else
      {
-       alst = malloc(num_ret * sizeof(Ecore_X_ID));
-       for (i = 0; i < num_ret; i++)
-          alst[i] = ((unsigned long *)prop_ret)[i];
-       num = num_ret;
-       *val = alst;
+        alst = malloc(num_ret * sizeof(Ecore_X_ID));
+        for (i = 0; i < num_ret; i++)
+           alst[i] = ((unsigned long *)prop_ret)[i];
+        num = num_ret;
+        *val = alst;
      }
+
    if (prop_ret)
       XFree(prop_ret);
 
@@ -271,47 +263,50 @@ ecore_x_window_prop_xid_list_get(Ecore_X_Window win, Ecore_X_Atom atom,
  */
 EAPI void
 ecore_x_window_prop_xid_list_change(Ecore_X_Window win, Ecore_X_Atom atom,
-                                   Ecore_X_Atom type, Ecore_X_ID item, int op)
+                                    Ecore_X_Atom type, Ecore_X_ID item, int op)
 {
-   Ecore_X_ID         *lst;
-   int                 i, num;
+   Ecore_X_ID *lst;
+   int i, num;
 
    LOGFN(__FILE__, __LINE__, __FUNCTION__);
    num = ecore_x_window_prop_xid_list_get(win, atom, type, &lst);
    if (num < 0)
-      return;                  /* Error - assuming invalid window */
+     {
+        return; /* Error - assuming invalid window */
+
+     }
 
    /* Is it there? */
    for (i = 0; i < num; i++)
      {
-       if (lst[i] == item)
-          break;
+        if (lst[i] == item)
+           break;
      }
 
    if (i < num)
      {
-       /* Was in list */
-       if (op == ECORE_X_PROP_LIST_ADD)
-          goto done;
-       /* Remove it */
-       num--;
-       for (; i < num; i++)
-          lst[i] = lst[i + 1];
+        /* Was in list */
+        if (op == ECORE_X_PROP_LIST_ADD)
+           goto done;  /* Remove it */
+
+        num--;
+        for (; i < num; i++)
+           lst[i] = lst[i + 1];
      }
    else
      {
-       /* Was not in list */
-       if (op == ECORE_X_PROP_LIST_REMOVE)
-          goto done;
-       /* Add it */
-       num++;
-       lst = realloc(lst, num * sizeof(Ecore_X_ID));
-       lst[i] = item;
+        /* Was not in list */
+        if (op == ECORE_X_PROP_LIST_REMOVE)
+           goto done;  /* Add it */
+
+        num++;
+        lst = realloc(lst, num * sizeof(Ecore_X_ID));
+        lst[i] = item;
      }
 
    ecore_x_window_prop_xid_set(win, atom, type, lst, num);
 
- done:
+done:
    if (lst)
       free(lst);
 }
@@ -321,7 +316,7 @@ ecore_x_window_prop_xid_list_change(Ecore_X_Window win, Ecore_X_Atom atom,
  */
 EAPI void
 ecore_x_window_prop_atom_set(Ecore_X_Window win, Ecore_X_Atom atom,
-                            Ecore_X_Atom * lst, unsigned int num)
+                             Ecore_X_Atom *lst, unsigned int num)
 {
    LOGFN(__FILE__, __LINE__, __FUNCTION__);
    ecore_x_window_prop_xid_set(win, atom, XA_ATOM, lst, num);
@@ -337,7 +332,7 @@ ecore_x_window_prop_atom_set(Ecore_X_Window win, Ecore_X_Atom atom,
  */
 EAPI int
 ecore_x_window_prop_atom_get(Ecore_X_Window win, Ecore_X_Atom atom,
-                            Ecore_X_Atom * lst, unsigned int len)
+                             Ecore_X_Atom *lst, unsigned int len)
 {
    LOGFN(__FILE__, __LINE__, __FUNCTION__);
    return ecore_x_window_prop_xid_get(win, atom, XA_ATOM, lst, len);
@@ -353,7 +348,7 @@ ecore_x_window_prop_atom_get(Ecore_X_Window win, Ecore_X_Atom atom,
  */
 EAPI int
 ecore_x_window_prop_atom_list_get(Ecore_X_Window win, Ecore_X_Atom atom,
-                                 Ecore_X_Atom ** plst)
+                                  Ecore_X_Atom **plst)
 {
    LOGFN(__FILE__, __LINE__, __FUNCTION__);
    return ecore_x_window_prop_xid_list_get(win, atom, XA_ATOM, plst);
@@ -364,7 +359,7 @@ ecore_x_window_prop_atom_list_get(Ecore_X_Window win, Ecore_X_Atom atom,
  */
 EAPI void
 ecore_x_window_prop_atom_list_change(Ecore_X_Window win, Ecore_X_Atom atom,
-                                    Ecore_X_Atom item, int op)
+                                     Ecore_X_Atom item, int op)
 {
    LOGFN(__FILE__, __LINE__, __FUNCTION__);
    ecore_x_window_prop_xid_list_change(win, atom, XA_ATOM, item, op);
@@ -375,7 +370,7 @@ ecore_x_window_prop_atom_list_change(Ecore_X_Window win, Ecore_X_Atom atom,
  */
 EAPI void
 ecore_x_window_prop_window_set(Ecore_X_Window win, Ecore_X_Atom atom,
-                              Ecore_X_Window * lst, unsigned int num)
+                               Ecore_X_Window *lst, unsigned int num)
 {
    LOGFN(__FILE__, __LINE__, __FUNCTION__);
    ecore_x_window_prop_xid_set(win, atom, XA_WINDOW, lst, num);
@@ -391,7 +386,7 @@ ecore_x_window_prop_window_set(Ecore_X_Window win, Ecore_X_Atom atom,
  */
 EAPI int
 ecore_x_window_prop_window_get(Ecore_X_Window win, Ecore_X_Atom atom,
-                              Ecore_X_Window * lst, unsigned int len)
+                               Ecore_X_Window *lst, unsigned int len)
 {
    LOGFN(__FILE__, __LINE__, __FUNCTION__);
    return ecore_x_window_prop_xid_get(win, atom, XA_WINDOW, lst, len);
@@ -407,7 +402,7 @@ ecore_x_window_prop_window_get(Ecore_X_Window win, Ecore_X_Atom atom,
  */
 EAPI int
 ecore_x_window_prop_window_list_get(Ecore_X_Window win, Ecore_X_Atom atom,
-                                   Ecore_X_Window ** plst)
+                                    Ecore_X_Window **plst)
 {
    LOGFN(__FILE__, __LINE__, __FUNCTION__);
    return ecore_x_window_prop_xid_list_get(win, atom, XA_WINDOW, plst);
@@ -430,26 +425,39 @@ ecore_x_window_prop_any_type(void)
  * FIXME: To be fixed.
  */
 EAPI void
-ecore_x_window_prop_property_set(Ecore_X_Window win, Ecore_X_Atom property, Ecore_X_Atom type, int size, void *data, int number)
+ecore_x_window_prop_property_set(Ecore_X_Window win,
+                                 Ecore_X_Atom property,
+                                 Ecore_X_Atom type,
+                                 int size,
+                                 void *data,
+                                 int number)
 {
    LOGFN(__FILE__, __LINE__, __FUNCTION__);
-   if (win == 0) win = DefaultRootWindow(_ecore_x_disp);
+   if (win == 0)
+      win = DefaultRootWindow(_ecore_x_disp);
+
    if (size != 32)
-     XChangeProperty(_ecore_x_disp, win, property, type, size, PropModeReplace,
-                    (unsigned char *)data, number);
+             XChangeProperty(_ecore_x_disp,
+                      win,
+                      property,
+                      type,
+                      size,
+                      PropModeReplace,
+                      (unsigned char *)data,
+                      number);
    else
      {
-       unsigned long *dat;
-       int            i, *ptr;
-       
-       dat = malloc(sizeof(unsigned long) * number);
-       if (dat)
-         {
-            for (ptr = (int *)data, i = 0; i < number; i++) dat[i] = ptr[i];
-            XChangeProperty(_ecore_x_disp, win, property, type, size, 
-                            PropModeReplace, (unsigned char *)dat, number);
-            free(dat);
-         }
+        unsigned long *dat;
+        int i, *ptr;
+
+        dat = malloc(sizeof(unsigned long) * number);
+        if (dat)
+          {
+             for (ptr = (int *)data, i = 0; i < number; i++) dat[i] = ptr[i];
+             XChangeProperty(_ecore_x_disp, win, property, type, size,
+                             PropModeReplace, (unsigned char *)dat, number);
+             free(dat);
+          }
      }
 }
 
@@ -459,7 +467,12 @@ ecore_x_window_prop_property_set(Ecore_X_Window win, Ecore_X_Atom property, Ecor
  * FIXME: To be fixed.
  */
 EAPI int
-ecore_x_window_prop_property_get(Ecore_X_Window win, Ecore_X_Atom property, Ecore_X_Atom type, int size __UNUSED__, unsigned char **data, int *num)
+ecore_x_window_prop_property_get(Ecore_X_Window win,
+                                 Ecore_X_Atom property,
+                                 Ecore_X_Atom type,
+                                 int size __UNUSED__,
+                                 unsigned char **data,
+                                 int *num)
 {
    Atom type_ret = 0;
    int ret, size_ret = 0;
@@ -467,51 +480,59 @@ ecore_x_window_prop_property_get(Ecore_X_Window win, Ecore_X_Atom property, Ecor
    unsigned char *prop_ret = NULL;
 
    /* make sure these are initialized */
-   if (num) *num = 0;
+   if (num)
+      *num = 0;
 
    if (data)
-     *data = NULL;
+      *data = NULL;
    else /* we can't store the retrieved data, so just return */
-     return 0;
+      return 0;
 
    LOGFN(__FILE__, __LINE__, __FUNCTION__);
-   if (!win) win = DefaultRootWindow(_ecore_x_disp);
+   if (!win)
+      win = DefaultRootWindow(_ecore_x_disp);
 
    ret = XGetWindowProperty(_ecore_x_disp, win, property, 0, LONG_MAX,
                             False, type, &type_ret, &size_ret,
                             &num_ret, &bytes, &prop_ret);
 
    if (ret != Success)
-       return 0;
-
-   if (!num_ret) {
-      XFree(prop_ret);
-      return 0;
-   }
-   
-   if (!(*data = malloc(num_ret * size_ret / 8))) {
-      XFree(prop_ret);
       return 0;
-   }
-   
+
+   if (!num_ret)
+     {
+        XFree(prop_ret);
+        return 0;
+     }
+
+   if (!(*data = malloc(num_ret * size_ret / 8)))
+     {
+        XFree(prop_ret);
+        return 0;
+     }
+
    switch (size_ret) {
       case 8:
-        for (i = 0; i < num_ret; i++)
-          (*data)[i] = prop_ret[i];
-        break;
+         for (i = 0; i < num_ret; i++)
+            (*data)[i] = prop_ret[i];
+         break;
+
       case 16:
-        for (i = 0; i < num_ret; i++)
-          ((unsigned short *) *data)[i] = ((unsigned short *) prop_ret)[i];
-        break;
+         for (i = 0; i < num_ret; i++)
+            ((unsigned short *)*data)[i] = ((unsigned short *)prop_ret)[i];
+         break;
+
       case 32:
-        for (i = 0; i < num_ret; i++)
-          ((unsigned int *) *data)[i] = ((unsigned long *) prop_ret)[i];
-        break;
-   }
+         for (i = 0; i < num_ret; i++)
+            ((unsigned int *)*data)[i] = ((unsigned long *)prop_ret)[i];
+         break;
+     }
 
-   XFree(prop_ret);
+        XFree(prop_ret);
+
+   if (num)
+      *num = num_ret;
 
-   if (num) *num = num_ret;
    return size_ret;
 }
 
@@ -528,19 +549,23 @@ ecore_x_window_prop_list(Ecore_X_Window win, int *num_ret)
    Ecore_X_Atom *atoms;
    Atom *atom_ret;
    int num = 0, i;
-       
+
    LOGFN(__FILE__, __LINE__, __FUNCTION__);
-   if (num_ret) *num_ret = 0;
+   if (num_ret)
+      *num_ret = 0;
 
    atom_ret = XListProperties(_ecore_x_disp, win, &num);
-   if (!atom_ret) return NULL;
+   if (!atom_ret)
+      return NULL;
 
    atoms = malloc(num * sizeof(Ecore_X_Atom));
    if (atoms)
      {
-       for (i = 0; i < num; i++) atoms[i] = atom_ret[i];
-       if (num_ret) *num_ret = num;
+        for (i = 0; i < num; i++) atoms[i] = atom_ret[i];
+        if (num_ret)
+           *num_ret = num;
      }
+
    XFree(atom_ret);
    return atoms;
 }
@@ -550,16 +575,20 @@ ecore_x_window_prop_list(Ecore_X_Window win, int *num_ret)
  * @param win The window
  * @param type The property
  * @param str The string
- * 
+ *
  * Set a window string property
  */
 EAPI void
-ecore_x_window_prop_string_set(Ecore_X_Window win, Ecore_X_Atom type, const char *str)
+ecore_x_window_prop_string_set(Ecore_X_Window win,
+                               Ecore_X_Atom type,
+                               const char *str)
 {
-   XTextProperty       xtp;
+   XTextProperty xtp;
 
    LOGFN(__FILE__, __LINE__, __FUNCTION__);
-   if (win == 0) win = DefaultRootWindow(_ecore_x_disp);
+   if (win == 0)
+      win = DefaultRootWindow(_ecore_x_disp);
+
    xtp.value = (unsigned char *)str;
    xtp.format = 8;
    xtp.encoding = ECORE_X_ATOM_UTF8_STRING;
@@ -571,50 +600,49 @@ ecore_x_window_prop_string_set(Ecore_X_Window win, Ecore_X_Atom type, const char
  * Get a window string property.
  * @param win The window
  * @param type The property
- * 
+ *
  * Return window string property of a window. String must be free'd when done.
  */
 EAPI char *
 ecore_x_window_prop_string_get(Ecore_X_Window win, Ecore_X_Atom type)
 {
-   XTextProperty       xtp;
-   char               *str = NULL;
+   XTextProperty xtp;
+   char *str = NULL;
 
    LOGFN(__FILE__, __LINE__, __FUNCTION__);
-   if (win == 0) win = DefaultRootWindow(_ecore_x_disp);
+   if (win == 0)
+      win = DefaultRootWindow(_ecore_x_disp);
+
    if (XGetTextProperty(_ecore_x_disp, win, &xtp, type))
      {
-       int      items;
-       char   **list = NULL;
-       Status   s;
-       
-       if (xtp.encoding == ECORE_X_ATOM_UTF8_STRING)
-         {
-            str = strdup((char *)xtp.value);
-         }
-       else
-         {
+        int items;
+        char **list = NULL;
+        Status s;
+
+        if (xtp.encoding == ECORE_X_ATOM_UTF8_STRING)
+           str = strdup((char *)xtp.value);
+        else
+          {
 #ifdef X_HAVE_UTF8_STRING
-            s = Xutf8TextPropertyToTextList(_ecore_x_disp, &xtp,
-                                            &list, &items);
+             s = Xutf8TextPropertyToTextList(_ecore_x_disp, &xtp,
+                                             &list, &items);
 #else
-            s = XmbTextPropertyToTextList(_ecore_x_disp, &xtp,
-                                          &list, &items);
+             s = XmbTextPropertyToTextList(_ecore_x_disp, &xtp,
+                                           &list, &items);
 #endif
-            if ((s == XLocaleNotSupported) ||
-                (s == XNoMemory) || (s == XConverterNotFound))
-              {
-                 str = strdup((char *)xtp.value);
-              }
-            else if ((s >= Success) && (items > 0))
-              {
-                 str = strdup(list[0]);
-              }
-            if (list)
-              XFreeStringList(list);
-         }
-       XFree(xtp.value);
+             if ((s == XLocaleNotSupported) ||
+                 (s == XNoMemory) || (s == XConverterNotFound))
+                str = strdup((char *)xtp.value);
+             else if ((s >= Success) && (items > 0))
+                str = strdup(list[0]);
+
+             if (list)
+                XFreeStringList(list);
+          }
+
+        XFree(xtp.value);
      }
+
    return str;
 }
 
@@ -627,20 +655,20 @@ ecore_x_window_prop_protocol_isset(Ecore_X_Window win,
 
    /* check for invalid values */
    if (protocol >= ECORE_X_WM_PROTOCOL_NUM)
-       return 0;
+      return 0;
 
    LOGFN(__FILE__, __LINE__, __FUNCTION__);
    proto = _ecore_x_atoms_wm_protocols[protocol];
 
    if (!XGetWMProtocols(_ecore_x_disp, win, &protos, &protos_count))
-       return ret;
+      return ret;
 
    for (i = 0; i < protos_count; i++)
-       if (protos[i] == proto)
-         {
-            ret = 1;
-            break;
-         }
+      if (protos[i] == proto)
+        {
+           ret = 1;
+           break;
+        }
 
    XFree(protos);
 
@@ -658,30 +686,33 @@ ecore_x_window_prop_protocol_list_get(Ecore_X_Window win, int *num_ret)
    Atom *protos = NULL;
    int i, protos_count = 0;
    Ecore_X_WM_Protocol *prot_ret = NULL;
-   
+
    LOGFN(__FILE__, __LINE__, __FUNCTION__);
    if (!XGetWMProtocols(_ecore_x_disp, win, &protos, &protos_count))
-     return NULL;
+      return NULL;
+
+   if ((!protos) || (protos_count <= 0))
+      return NULL;
 
-   if ((!protos) || (protos_count <= 0)) return NULL;
    prot_ret = calloc(1, protos_count * sizeof(Ecore_X_WM_Protocol));
    if (!prot_ret)
      {
-       XFree(protos);
-       return NULL;
+        XFree(protos);
+        return NULL;
      }
+
    for (i = 0; i < protos_count; i++)
      {
-       Ecore_X_WM_Protocol j;
-       
-       prot_ret[i] = -1;
-       for (j = 0; j < ECORE_X_WM_PROTOCOL_NUM; j++)
-         {
-            if (_ecore_x_atoms_wm_protocols[j] == protos[i])
-              prot_ret[i] = j;
-         }
+        Ecore_X_WM_Protocol j;
+
+        prot_ret[i] = -1;
+        for (j = 0; j < ECORE_X_WM_PROTOCOL_NUM; j++)
+          {
+             if (_ecore_x_atoms_wm_protocols[j] == protos[i])
+                prot_ret[i] = j;
+          }
      }
-   XFree(protos);
+        XFree(protos);
    *num_ret = protos_count;
    return prot_ret;
 }
index c6c0314..bddb847 100644 (file)
@@ -37,121 +37,211 @@ EAPI void
 ecore_x_window_shape_window_set(Ecore_X_Window win, Ecore_X_Window shape_win)
 {
    LOGFN(__FILE__, __LINE__, __FUNCTION__);
-   XShapeCombineShape(_ecore_x_disp, win, ShapeBounding, 0, 0, shape_win, ShapeBounding, ShapeSet);
+   XShapeCombineShape(_ecore_x_disp,
+                      win,
+                      ShapeBounding,
+                      0,
+                      0,
+                      shape_win,
+                      ShapeBounding,
+                      ShapeSet);
 }
 
 EAPI void
-ecore_x_window_shape_window_set_xy(Ecore_X_Window win, Ecore_X_Window shape_win, int x, int y)
+ecore_x_window_shape_window_set_xy(Ecore_X_Window win,
+                                   Ecore_X_Window shape_win,
+                                   int x,
+                                   int y)
 {
    LOGFN(__FILE__, __LINE__, __FUNCTION__);
-   XShapeCombineShape(_ecore_x_disp, win, ShapeBounding, x, y, shape_win, ShapeBounding, ShapeSet);
+   XShapeCombineShape(_ecore_x_disp,
+                      win,
+                      ShapeBounding,
+                      x,
+                      y,
+                      shape_win,
+                      ShapeBounding,
+                      ShapeSet);
 }
 
 EAPI void
-ecore_x_window_shape_rectangle_set(Ecore_X_Window win, int x, int y, int w, int h)
+ecore_x_window_shape_rectangle_set(Ecore_X_Window win,
+                                   int x,
+                                   int y,
+                                   int w,
+                                   int h)
 {
    XRectangle rect;
-   
+
    LOGFN(__FILE__, __LINE__, __FUNCTION__);
    rect.x = x;
    rect.y = y;
    rect.width = w;
    rect.height = h;
-   XShapeCombineRectangles(_ecore_x_disp, win, ShapeBounding, 0, 0, &rect, 1, ShapeSet, Unsorted);
+   XShapeCombineRectangles(_ecore_x_disp,
+                           win,
+                           ShapeBounding,
+                           0,
+                           0,
+                           &rect,
+                           1,
+                           ShapeSet,
+                           Unsorted);
 }
 
 EAPI void
-ecore_x_window_shape_rectangles_set(Ecore_X_Window win, Ecore_X_Rectangle *rects, int num)
+ecore_x_window_shape_rectangles_set(Ecore_X_Window win,
+                                    Ecore_X_Rectangle *rects,
+                                    int num)
 {
    XRectangle *rect = NULL;
    int i;
-   
+
    LOGFN(__FILE__, __LINE__, __FUNCTION__);
    if (num > 0)
      {
-       rect = malloc(sizeof(XRectangle) * num);
-       if (rect)
-         {
-            for (i = 0; i < num; i++)
-              {
-                 rect[i].x = rects[i].x;
-                 rect[i].y = rects[i].y;
-                 rect[i].width = rects[i].width;
-                 rect[i].height = rects[i].height;
-              }
-         }
-       else
-         num = 0;
+        rect = malloc(sizeof(XRectangle) * num);
+        if (rect)
+           for (i = 0; i < num; i++)
+             {
+                rect[i].x = rects[i].x;
+                rect[i].y = rects[i].y;
+                rect[i].width = rects[i].width;
+                rect[i].height = rects[i].height;
+             }
+        else
+           num = 0;
      }
-   XShapeCombineRectangles(_ecore_x_disp, win, ShapeBounding, 0, 0, rect, num, ShapeSet, Unsorted);
-   if (rect) free(rect);
+
+   XShapeCombineRectangles(_ecore_x_disp,
+                           win,
+                           ShapeBounding,
+                           0,
+                           0,
+                           rect,
+                           num,
+                           ShapeSet,
+                           Unsorted);
+   if (rect)
+      free(rect);
 }
 
 EAPI void
 ecore_x_window_shape_window_add(Ecore_X_Window win, Ecore_X_Window shape_win)
 {
    LOGFN(__FILE__, __LINE__, __FUNCTION__);
-   XShapeCombineShape(_ecore_x_disp, win, ShapeBounding, 0, 0, shape_win, ShapeBounding, ShapeUnion);
+   XShapeCombineShape(_ecore_x_disp,
+                      win,
+                      ShapeBounding,
+                      0,
+                      0,
+                      shape_win,
+                      ShapeBounding,
+                      ShapeUnion);
 }
 
 EAPI void
-ecore_x_window_shape_window_add_xy(Ecore_X_Window win, Ecore_X_Window shape_win, int x, int y)
+ecore_x_window_shape_window_add_xy(Ecore_X_Window win,
+                                   Ecore_X_Window shape_win,
+                                   int x,
+                                   int y)
 {
    LOGFN(__FILE__, __LINE__, __FUNCTION__);
-   XShapeCombineShape(_ecore_x_disp, win, ShapeBounding, x, y, shape_win, ShapeBounding, ShapeUnion);
+   XShapeCombineShape(_ecore_x_disp,
+                      win,
+                      ShapeBounding,
+                      x,
+                      y,
+                      shape_win,
+                      ShapeBounding,
+                      ShapeUnion);
 }
 
 EAPI void
-ecore_x_window_shape_rectangle_add(Ecore_X_Window win, int x, int y, int w, int h)
+ecore_x_window_shape_rectangle_add(Ecore_X_Window win,
+                                   int x,
+                                   int y,
+                                   int w,
+                                   int h)
 {
    XRectangle rect;
-   
+
    LOGFN(__FILE__, __LINE__, __FUNCTION__);
    rect.x = x;
    rect.y = y;
    rect.width = w;
    rect.height = h;
-   XShapeCombineRectangles(_ecore_x_disp, win, ShapeBounding, 0, 0, &rect, 1, ShapeUnion, Unsorted);
+   XShapeCombineRectangles(_ecore_x_disp,
+                           win,
+                           ShapeBounding,
+                           0,
+                           0,
+                           &rect,
+                           1,
+                           ShapeUnion,
+                           Unsorted);
 }
 
 EAPI void
-ecore_x_window_shape_rectangle_clip(Ecore_X_Window win, int x, int y, int w, int h)
+ecore_x_window_shape_rectangle_clip(Ecore_X_Window win,
+                                    int x,
+                                    int y,
+                                    int w,
+                                    int h)
 {
    XRectangle rect;
-   
+
    LOGFN(__FILE__, __LINE__, __FUNCTION__);
    rect.x = x;
    rect.y = y;
    rect.width = w;
    rect.height = h;
-   XShapeCombineRectangles(_ecore_x_disp, win, ShapeBounding, 0, 0, &rect, 1, ShapeIntersect, Unsorted);
+   XShapeCombineRectangles(_ecore_x_disp,
+                           win,
+                           ShapeBounding,
+                           0,
+                           0,
+                           &rect,
+                           1,
+                           ShapeIntersect,
+                           Unsorted);
 }
 
 EAPI void
-ecore_x_window_shape_rectangles_add(Ecore_X_Window win, Ecore_X_Rectangle *rects, int num)
+ecore_x_window_shape_rectangles_add(Ecore_X_Window win,
+                                    Ecore_X_Rectangle *rects,
+                                    int num)
 {
    XRectangle *rect = NULL;
    int i;
-   
+
    LOGFN(__FILE__, __LINE__, __FUNCTION__);
    if (num > 0)
      {
-       rect = malloc(sizeof(XRectangle) * num);
-       if (rect)
-         {
-            for (i = 0; i < num; i++)
-              {
-                 rect[i].x = rects[i].x;
-                 rect[i].y = rects[i].y;
-                 rect[i].width = rects[i].width;
-                 rect[i].height = rects[i].height;
-              }
-         }
-       else
-         num = 0;
+        rect = malloc(sizeof(XRectangle) * num);
+        if (rect)
+           for (i = 0; i < num; i++)
+             {
+                rect[i].x = rects[i].x;
+                rect[i].y = rects[i].y;
+                rect[i].width = rects[i].width;
+                rect[i].height = rects[i].height;
+             }
+        else
+           num = 0;
      }
-   XShapeCombineRectangles(_ecore_x_disp, win, ShapeBounding, 0, 0, rect, num, ShapeUnion, Unsorted);
-   if (rect) free(rect);
+
+   XShapeCombineRectangles(_ecore_x_disp,
+                           win,
+                           ShapeBounding,
+                           0,
+                           0,
+                           rect,
+                           num,
+                           ShapeUnion,
+                           Unsorted);
+   if (rect)
+      free(rect);
 }
 
 EAPI Ecore_X_Rectangle *
@@ -160,25 +250,27 @@ ecore_x_window_shape_rectangles_get(Ecore_X_Window win, int *num_ret)
    XRectangle *rect;
    Ecore_X_Rectangle *rects = NULL;
    int i, num = 0, ord;
-   
+
    LOGFN(__FILE__, __LINE__, __FUNCTION__);
    rect = XShapeGetRectangles(_ecore_x_disp, win, ShapeBounding, &num, &ord);
    if (rect)
      {
-       rects = malloc(sizeof(Ecore_X_Rectangle) * num);
-       if (rects)
-         {
-            for (i = 0; i < num; i++)
-              {
-                 rects[i].x = rect[i].x;
-                 rects[i].y = rect[i].y;
-                 rects[i].width = rect[i].width;
-                 rects[i].height = rect[i].height;
-              }
-         }
-       XFree(rect);
+        rects = malloc(sizeof(Ecore_X_Rectangle) * num);
+        if (rects)
+           for (i = 0; i < num; i++)
+             {
+                rects[i].x = rect[i].x;
+                rects[i].y = rect[i].y;
+                rects[i].width = rect[i].width;
+                rects[i].height = rect[i].height;
+             }
+
+        XFree(rect);
      }
-   if (num_ret) *num_ret = num;
+
+   if (num_ret)
+      *num_ret = num;
+
    return rects;
 }
 
@@ -187,9 +279,9 @@ ecore_x_window_shape_events_select(Ecore_X_Window win, int on)
 {
    LOGFN(__FILE__, __LINE__, __FUNCTION__);
    if (on)
-     XShapeSelectInput(_ecore_x_disp, win, ShapeNotifyMask);
+      XShapeSelectInput(_ecore_x_disp, win, ShapeNotifyMask);
    else
-     XShapeSelectInput(_ecore_x_disp, win, 0);
+      XShapeSelectInput(_ecore_x_disp, win, 0);
 }
 
 /**
@@ -204,8 +296,8 @@ ecore_x_window_shape_input_mask_set(Ecore_X_Window win, Ecore_X_Pixmap mask)
 {
    LOGFN(__FILE__, __LINE__, __FUNCTION__);
 #ifdef ShapeInput
-   XShapeCombineMask(_ecore_x_disp, win, ShapeInput, 0, 0, mask, ShapeSet);
-#else   
+   XShapeCombineMask(_ecore_x_disp, win, ShapeInput,    0, 0, mask, ShapeSet);
+#else
    XShapeCombineMask(_ecore_x_disp, win, ShapeBounding, 0, 0, mask, ShapeSet);
 #endif
 }
index 5812728..ebb9742 100644 (file)
@@ -29,22 +29,23 @@ _ecore_x_input_init(void)
 #ifdef ECORE_XI2
    int event, error;
    int major = 2, minor = 0;
-   
-   if (!XQueryExtension(_ecore_x_disp, "XInputExtension", 
+
+   if (!XQueryExtension(_ecore_x_disp, "XInputExtension",
                         &_ecore_x_xi2_opcode, &event, &error))
      {
         _ecore_x_xi2_opcode = -1;
         return;
      }
-   
+
    if (XIQueryVersion(_ecore_x_disp, &major, &minor) == BadRequest)
      {
         _ecore_x_xi2_opcode = -1;
         return;
      }
-   _ecore_x_xi2_devs = XIQueryDevice(_ecore_x_disp, XIAllDevices, 
+
+   _ecore_x_xi2_devs = XIQueryDevice(_ecore_x_disp, XIAllDevices,
                                      &_ecore_x_xi2_num);
-#endif   
+#endif
 }
 
 void
@@ -56,75 +57,78 @@ _ecore_x_input_shutdown(void)
         XIFreeDeviceInfo(_ecore_x_xi2_devs);
         _ecore_x_xi2_devs = NULL;
      }
+
    _ecore_x_xi2_num = 0;
    _ecore_x_xi2_opcode = -1;
-#endif   
+#endif
 }
 
 void
-_ecore_x_input_handler(XEventxevent)
+_ecore_x_input_handler(XEvent *xevent)
 {
 #ifdef ECORE_XI2
    XIDeviceEvent *evd = (XIDeviceEvent *)(xevent->xcookie.data);
    int devid = evd->deviceid;
-   
+
    //printf("deviceID = %d\n", devid);
    switch (xevent->xcookie.evtype)
      {
-     case XI_Motion:
-        _ecore_mouse_move
-          (evd->time,
-           0, // state
-           evd->event_x, evd->event_y,
-           evd->root_x, evd->root_y,
-           evd->event,
-           (evd->child ? evd->child : evd->event),
-           evd->root,
-           1, // same_screen
-           devid, 1, 1, 
-           1.0, // pressure
-           0.0, // angle
-           evd->event_x, evd->event_y,
-           evd->root_x, evd->root_y);
-        break;
-     case XI_ButtonPress:
-        _ecore_mouse_button
-          (ECORE_EVENT_MOUSE_BUTTON_DOWN,
-           evd->time,
-           0, // state
-           0, // button
-           evd->event_x, evd->event_y,
-           evd->root_x, evd->root_y,
-           evd->event,
-           (evd->child ? evd->child : evd->event),
-           evd->root,
-           1, // same_screen
-           devid, 1, 1,
-           1.0, // pressure
-           0.0, // angle
-           evd->event_x, evd->event_y,
-           evd->root_x, evd->root_y);
-        break;
-     case XI_ButtonRelease:
-        _ecore_mouse_button
-          (ECORE_EVENT_MOUSE_BUTTON_UP,
-           evd->time,
-           0, // state
-           0, // button
-           evd->event_x, evd->event_y,
-           evd->root_x, evd->root_y,
-           evd->event,
-           (evd->child ? evd->child : evd->event),
-           evd->root,
-           1, // same_screen
-           devid, 1, 1,
-           1.0, // pressure
-           0.0, // angle
-           evd->event_x, evd->event_y,
-           evd->root_x, evd->root_y);
-        break;
+      case XI_Motion:
+         _ecore_mouse_move
+            (evd->time,
+            0, // state
+            evd->event_x, evd->event_y,
+            evd->root_x, evd->root_y,
+            evd->event,
+            (evd->child ? evd->child : evd->event),
+            evd->root,
+            1, // same_screen
+            devid, 1, 1,
+            1.0, // pressure
+            0.0, // angle
+            evd->event_x, evd->event_y,
+            evd->root_x, evd->root_y);
+         break;
+
+      case XI_ButtonPress:
+         _ecore_mouse_button
+            (ECORE_EVENT_MOUSE_BUTTON_DOWN,
+            evd->time,
+            0, // state
+            0, // button
+            evd->event_x, evd->event_y,
+            evd->root_x, evd->root_y,
+            evd->event,
+            (evd->child ? evd->child : evd->event),
+            evd->root,
+            1, // same_screen
+            devid, 1, 1,
+            1.0, // pressure
+            0.0, // angle
+            evd->event_x, evd->event_y,
+            evd->root_x, evd->root_y);
+         break;
+
+      case XI_ButtonRelease:
+         _ecore_mouse_button
+            (ECORE_EVENT_MOUSE_BUTTON_UP,
+            evd->time,
+            0, // state
+            0, // button
+            evd->event_x, evd->event_y,
+            evd->root_x, evd->root_y,
+            evd->event,
+            (evd->child ? evd->child : evd->event),
+            evd->root,
+            1, // same_screen
+            devid, 1, 1,
+            1.0, // pressure
+            0.0, // angle
+            evd->event_x, evd->event_y,
+            evd->root_x, evd->root_y);
+         break;
      }
-#endif   
+#endif
 }
 
 EAPI Eina_Bool
@@ -133,7 +137,8 @@ ecore_x_input_multi_select(Ecore_X_Window win)
 #ifdef ECORE_XI2
    int i, find = 0;
 
-   if (!_ecore_x_xi2_devs) return 0;
+   if (!_ecore_x_xi2_devs)
+      return 0;
 
    LOGFN(__FILE__, __LINE__, __FUNCTION__);
    for (i = 0; i < _ecore_x_xi2_num; i++)
index cb6c8db..f7f4236 100644 (file)
@@ -26,14 +26,18 @@ ecore_x_xinerama_screen_count_get(void)
 #ifdef ECORE_XINERAMA
    int event_base, error_base;
 
-   LOGFN(__FILE__, __LINE__, __FUNCTION__);
-   if (_xin_info) XFree(_xin_info);
+      LOGFN(__FILE__, __LINE__, __FUNCTION__);
+   if (_xin_info)
+      XFree(_xin_info);
+
    _xin_info = NULL;
    if (XineramaQueryExtension(_ecore_x_disp, &event_base, &error_base))
      {
-       _xin_info = XineramaQueryScreens(_ecore_x_disp, &_xin_scr_num);
-       if (_xin_info) return _xin_scr_num;
+        _xin_info = XineramaQueryScreens(_ecore_x_disp, &_xin_scr_num);
+        if (_xin_info)
+           return _xin_scr_num;
      }
+
 #endif
    return 0;
 }
@@ -45,24 +49,41 @@ ecore_x_xinerama_screen_geometry_get(int screen, int *x, int *y, int *w, int *h)
 #ifdef ECORE_XINERAMA
    if (_xin_info)
      {
-       int i;
-       
-       for (i = 0; i < _xin_scr_num; i++)
-         {
-            if (_xin_info[i].screen_number == screen)
-              {
-                 if (x) *x = _xin_info[i].x_org;
-                 if (y) *y = _xin_info[i].y_org;
-                 if (w) *w = _xin_info[i].width;
-                 if (h) *h = _xin_info[i].height;
-                 return 1;
-              }
-         }
+        int i;
+
+        for (i = 0; i < _xin_scr_num; i++)
+          {
+             if (_xin_info[i].screen_number == screen)
+               {
+                  if (x)
+                     *x = _xin_info[i].x_org;
+
+                  if (y)
+                     *y = _xin_info[i].y_org;
+
+                  if (w)
+                     *w = _xin_info[i].width;
+
+                  if (h)
+                     *h = _xin_info[i].height;
+
+                  return 1;
+               }
+          }
      }
+
 #endif
-   if (x) *x = 0;
-   if (y) *y = 0;
-   if (w) *w = DisplayWidth(_ecore_x_disp, 0);
-   if (h) *h = DisplayHeight(_ecore_x_disp, 0);
+   if (x)
+      *x = 0;
+
+   if (y)
+      *y = 0;
+
+   if (w)
+      *w = DisplayWidth(_ecore_x_disp, 0);
+
+   if (h)
+      *h = DisplayHeight(_ecore_x_disp, 0);
+
    return 0;
 }