forked from enlightenment/efl
hmm commit.. prolyl to wrong branch tho...
SVN revision: 6094
This commit is contained in:
parent
a2ea45fcd6
commit
d0ddb5b0ab
|
@ -43,30 +43,30 @@
|
|||
if (!atom) (atom) = ecore_atom_get(name);
|
||||
#define MEMCPY(src, dst, type, num) \
|
||||
memcpy(dst, src, sizeof(type) * (num))
|
||||
#define NEW(dat, num) \
|
||||
malloc(sizeof(dat) * (num))
|
||||
#define ZERO(ptr, dat, num) \
|
||||
memset((ptr), 0, sizeof(dat) * (num))
|
||||
#define NEW(type, num) \
|
||||
malloc(sizeof(type) * (num))
|
||||
#define ZERO(ptr, type, num) \
|
||||
memset((ptr), 0, sizeof(type) * (num))
|
||||
#define NEW_PTR(num) \
|
||||
malloc(sizeof(void *) * (num))
|
||||
#define FREE(dat) \
|
||||
#define FREE(ptr) \
|
||||
{ \
|
||||
free(dat); \
|
||||
(dat) = NULL; \
|
||||
free(ptr); \
|
||||
(ptr) = NULL; \
|
||||
}
|
||||
#define IF_FREE(dat) \
|
||||
{if (dat) FREE(dat);}
|
||||
#define REALLOC(dat, type, num) \
|
||||
#define IF_FREE(ptr) \
|
||||
{if (ptr) FREE(ptr);}
|
||||
#define REALLOC(ptr, type, num) \
|
||||
{ \
|
||||
if ((dat) && (num == 0)) {free(dat); dat = NULL;} \
|
||||
else if (dat) dat = realloc((dat), sizeof(type) * (num)); \
|
||||
else dat = malloc(sizeof(type) * (num)); \
|
||||
if ((ptr) && (num == 0)) {free(ptr); ptr = NULL;} \
|
||||
else if (ptr) ptr = realloc((ptr), sizeof(type) * (num)); \
|
||||
else ptr = malloc(sizeof(type) * (num)); \
|
||||
}
|
||||
#define REALLOC_PTR(dat, num) \
|
||||
#define REALLOC_PTR(ptr, num) \
|
||||
{ \
|
||||
if ((dat) && (num == 0)) {free(dat); dat = NULL;} \
|
||||
else if (dat) dat = realloc(dat, sizeof(void *) * (num)); \
|
||||
else dat = malloc(sizeof(void *) * (num)); \
|
||||
if ((ptr) && (num == 0)) {free(ptr); ptr = NULL;} \
|
||||
else if (ptr) ptr = realloc(ptr, sizeof(void *) * (num)); \
|
||||
else ptr = malloc(sizeof(void *) * (num)); \
|
||||
}
|
||||
|
||||
#define START_LIST_DEL(type, base, cmp) \
|
||||
|
|
|
@ -106,7 +106,8 @@ ecore_event_x_init(void)
|
|||
event_translator[SelectionNotify] = ecore_event_x_handle_selection_notify;
|
||||
event_translator[SelectionClear] = ecore_event_x_handle_selection_clear;
|
||||
event_translator[SelectionRequest] = ecore_event_x_handle_selection_request;
|
||||
event_translator[shape_event_id] = ecore_event_x_handle_shape_change;
|
||||
if (shape_event_id > SelectionRequest)
|
||||
event_translator[shape_event_id] = ecore_event_x_handle_shape_change;
|
||||
|
||||
lock_mask_scroll = ecore_lock_mask_scroll_get();
|
||||
lock_mask_num = ecore_lock_mask_num_get();
|
||||
|
|
|
@ -219,6 +219,7 @@ ecore_add_xid(Window win, int x, int y, int w, int h, int depth, Window parent)
|
|||
xid->children_num = 0;
|
||||
xid->children = NULL;
|
||||
xid->gravity = ecore_window_get_gravity(win);
|
||||
xid->coords_invalid = 0;
|
||||
xid->bw = 0;
|
||||
xid->grab_button_auto_replay = NULL;
|
||||
XSaveContext(disp, xid->win, xid_context, (XPointer) xid);
|
||||
|
@ -282,6 +283,7 @@ ecore_validate_xid(Window win)
|
|||
xid->mouse_in = 0;
|
||||
xid->gravity = att.win_gravity;
|
||||
xid->bw = att.border_width;
|
||||
xid->coords_invalid = 0;
|
||||
xid->grab_button_auto_replay = NULL;
|
||||
XSaveContext(disp, xid->win, xid_context, (XPointer) xid);
|
||||
ecore_add_child(xid->parent, win);
|
||||
|
|
Loading…
Reference in New Issue