Ecore_X(cb): Add some extra 'flush' calls to improve framerate.

NB: For the purests, I know some/most of these are erroneous (extra &
not needed), but please leave them for now until I get time to go
through each one separately to verify & remove (or leave).



SVN revision: 62610
This commit is contained in:
Christopher Michael 2011-08-20 02:33:57 +00:00
parent 3e4c83a87b
commit 64fdc36b02
12 changed files with 116 additions and 9 deletions

View File

@ -939,6 +939,7 @@ ecore_x_focus_reset(void)
xcb_set_input_focus(_ecore_xcb_conn, XCB_INPUT_FOCUS_POINTER_ROOT,
((xcb_screen_t *)_ecore_xcb_screen)->root,
XCB_CURRENT_TIME);
ecore_x_flush();
}
EAPI void
@ -947,6 +948,7 @@ ecore_x_events_allow_all(void)
LOGFN(__FILE__, __LINE__, __FUNCTION__);
xcb_allow_events(_ecore_xcb_conn, XCB_ALLOW_ASYNC_BOTH, XCB_CURRENT_TIME);
ecore_x_flush();
}
/**
@ -962,6 +964,7 @@ ecore_x_kill(Ecore_X_Window win)
LOGFN(__FILE__, __LINE__, __FUNCTION__);
xcb_kill_client(_ecore_xcb_conn, win);
ecore_x_flush();
}
/**

View File

@ -97,6 +97,7 @@ ecore_x_composite_redirect_window(Ecore_X_Window win, Ecore_X_Composite_Update_T
break;
}
xcb_composite_redirect_window(_ecore_xcb_conn, win, update);
ecore_x_flush();
#endif
}
@ -118,6 +119,7 @@ ecore_x_composite_redirect_subwindows(Ecore_X_Window win, Ecore_X_Composite_Upda
break;
}
xcb_composite_redirect_subwindows(_ecore_xcb_conn, win, update);
ecore_x_flush();
#endif
}
@ -139,6 +141,7 @@ ecore_x_composite_unredirect_window(Ecore_X_Window win, Ecore_X_Composite_Update
break;
}
xcb_composite_unredirect_window(_ecore_xcb_conn, win, update);
ecore_x_flush();
#endif
}
@ -160,6 +163,7 @@ ecore_x_composite_unredirect_subwindows(Ecore_X_Window win, Ecore_X_Composite_Up
break;
}
xcb_composite_unredirect_subwindows(_ecore_xcb_conn, win, update);
ecore_x_flush();
#endif
}
@ -173,6 +177,7 @@ ecore_x_composite_name_window_pixmap_get(Ecore_X_Window win)
#ifdef ECORE_XCB_COMPOSITE
pmap = xcb_generate_id(_ecore_xcb_conn);
xcb_composite_name_window_pixmap(_ecore_xcb_conn, win, pmap);
ecore_x_flush();
#endif
return pmap;
@ -185,6 +190,7 @@ ecore_x_composite_window_events_disable(Ecore_X_Window win)
#ifdef ECORE_XCB_SHAPE
ecore_x_window_shape_input_rectangle_set(win, -1, -1, 1, 1);
ecore_x_flush();
#else
return;
win = 0;
@ -198,6 +204,7 @@ ecore_x_composite_window_events_enable(Ecore_X_Window win)
#ifdef ECORE_XCB_SHAPE
ecore_x_window_shape_input_rectangle_set(win, 0, 0, 65535, 65535);
ecore_x_flush();
#else
return;
win = 0;
@ -225,6 +232,7 @@ ecore_x_composite_render_window_enable(Ecore_X_Window root)
free(reply);
ecore_x_composite_window_events_disable(win);
ecore_x_flush();
#endif
return win;
@ -237,5 +245,6 @@ ecore_x_composite_render_window_disable(Ecore_X_Window win)
#ifdef ECORE_XCB_COMPOSITE
xcb_composite_release_overlay_window(_ecore_xcb_conn, win);
ecore_x_flush();
#endif
}

View File

@ -143,6 +143,7 @@ ecore_x_cursor_new(Ecore_X_Window win, int *pixels, int w, int h, int hot_x, int
mask = XCB_CW_CURSOR;
list = cursor;
xcb_change_window_attributes(_ecore_xcb_conn, win, mask, &list);
ecore_x_flush();
}
return cursor;
@ -176,12 +177,12 @@ _ecore_xcb_cursor_image_create(int w, int h, int *pixels)
#ifdef ECORE_XCB_CURSOR
return xcb_image_create_native(_ecore_xcb_conn, w, h,
XCB_IMAGE_FORMAT_Z_PIXMAP,
32, pixels, (w * h * sizeof(int)), // 32
32, pixels, (w * h * sizeof(int)),
(uint8_t *)pixels);
#else
return xcb_image_create_native(_ecore_xcb_conn, w, h,
XCB_IMAGE_FORMAT_Z_PIXMAP,
1, pixels, (w * h * sizeof(int)), // 32
1, pixels, (w * h * sizeof(int)),
(uint8_t *)pixels);
#endif
}
@ -326,6 +327,7 @@ _ecore_xcb_cursor_image_load_cursor(Ecore_X_Window win, int w, int h, int hot_x,
xcb_free_pixmap(_ecore_xcb_conn, pixmap);
xcb_free_pixmap(_ecore_xcb_conn, mask);
ecore_x_flush();
return cursor;
}
@ -391,6 +393,7 @@ _ecore_xcb_cursor_image_load_argb_cursor(Ecore_X_Window win, int w, int h, int h
xcb_render_create_cursor(_ecore_xcb_conn, cursor, pict, hot_x, hot_y);
xcb_render_free_picture(_ecore_xcb_conn, pict);
ecore_x_flush();
return cursor;
}

View File

@ -86,6 +86,7 @@ ecore_x_damage_new(Ecore_X_Drawable drawable, Ecore_X_Damage_Report_Level level)
#ifdef ECORE_XCB_DAMAGE
damage = xcb_generate_id(_ecore_xcb_conn);
xcb_damage_create(_ecore_xcb_conn, damage, drawable, level);
ecore_x_flush();
#endif
return damage;
@ -107,6 +108,7 @@ ecore_x_damage_free(Ecore_X_Damage damage)
#ifdef ECORE_XCB_DAMAGE
xcb_damage_destroy(_ecore_xcb_conn, damage);
ecore_x_flush();
#endif
}
@ -135,5 +137,6 @@ ecore_x_damage_subtract(Ecore_X_Damage damage, Ecore_X_Region repair, Ecore_X_Re
#ifdef ECORE_XCB_DAMAGE
xcb_damage_subtract(_ecore_xcb_conn, damage, repair, parts);
ecore_x_flush();
#endif
}

View File

@ -28,6 +28,7 @@ ecore_x_drawable_rectangle_fill(Ecore_X_Drawable draw, Ecore_X_GC gc, int x, int
rect.height = h;
xcb_poly_fill_rectangle(_ecore_xcb_conn, draw, gc, 1,
(const xcb_rectangle_t *)&rect);
ecore_x_flush();
}
/**

View File

@ -100,6 +100,7 @@ ecore_x_gc_new(Ecore_X_Drawable drawable, Ecore_X_GC_Value_Mask value_mask, cons
gc = xcb_generate_id(_ecore_xcb_conn);
xcb_create_gc(_ecore_xcb_conn, gc, drawable, vmask, value_list);
ecore_x_flush();
return gc;
}
@ -113,6 +114,7 @@ ecore_x_gc_free(Ecore_X_GC gc)
LOGFN(__FILE__, __LINE__, __FUNCTION__);
xcb_free_gc(_ecore_xcb_conn, gc);
ecore_x_flush();
}
EAPI void
@ -124,6 +126,7 @@ ecore_x_gc_foreground_set(Ecore_X_GC gc, unsigned long foreground)
list = foreground;
xcb_change_gc(_ecore_xcb_conn, gc, XCB_GC_FOREGROUND, &list);
ecore_x_flush();
}
EAPI void
@ -135,4 +138,5 @@ ecore_x_gc_background_set(Ecore_X_GC gc, unsigned long background)
list = background;
xcb_change_gc(_ecore_xcb_conn, gc, XCB_GC_BACKGROUND, &list);
ecore_x_flush();
}

View File

@ -31,6 +31,7 @@ ecore_x_pixmap_new(Ecore_X_Window win, int w, int h, int dep)
pmap = xcb_generate_id(_ecore_xcb_conn);
xcb_create_pixmap(_ecore_xcb_conn, dep, pmap, win, w, h);
ecore_x_flush();
return pmap;
}
@ -49,6 +50,7 @@ ecore_x_pixmap_free(Ecore_X_Pixmap pmap)
LOGFN(__FILE__, __LINE__, __FUNCTION__);
xcb_free_pixmap(_ecore_xcb_conn, pmap);
ecore_x_flush();
}
/**
@ -71,6 +73,7 @@ ecore_x_pixmap_paste(Ecore_X_Pixmap pmap, Ecore_X_Drawable dest, Ecore_X_GC gc,
LOGFN(__FILE__, __LINE__, __FUNCTION__);
xcb_copy_area(_ecore_xcb_conn, pmap, dest, gc, sx, sy, dx, dy, w, h);
ecore_x_flush();
}
/**

View File

@ -58,6 +58,7 @@ _ecore_xcb_sync_magic_send(int val, Ecore_X_Window win)
LOGFN(__FILE__, __LINE__, __FUNCTION__);
ecore_x_client_message32_send(win, 27777, XCB_EVENT_MASK_NO_EVENT,
0x7162534, (0x10000000 + val), win, 0, 0);
ecore_x_flush();
}
/* public functions */
@ -107,6 +108,7 @@ ecore_x_sync_alarm_free(Ecore_X_Sync_Alarm alarm)
#ifdef ECORE_XCB_SYNC
xcb_sync_destroy_alarm(_ecore_xcb_conn, alarm);
ecore_x_flush();
return EINA_TRUE;
#endif
@ -154,6 +156,7 @@ ecore_x_sync_counter_inc(Ecore_X_Sync_Counter counter, int by)
v.lo = by;
xcb_sync_change_counter(_ecore_xcb_conn, counter, v);
ecore_x_flush();
#endif
}
@ -190,6 +193,7 @@ ecore_x_sync_counter_val_wait(Ecore_X_Sync_Counter counter, int val)
cond.event_threshold = v2;
xcb_sync_await(_ecore_xcb_conn, 1, &cond);
ecore_x_flush();
#endif
}
@ -211,6 +215,7 @@ ecore_x_sync_counter_new(int val)
counter = xcb_generate_id(_ecore_xcb_conn);
xcb_sync_create_counter(_ecore_xcb_conn, counter, v);
ecore_x_flush();
return counter;
#endif
@ -227,6 +232,7 @@ ecore_x_sync_counter_free(Ecore_X_Sync_Counter counter)
#ifdef ECORE_XCB_SYNC
xcb_sync_destroy_counter(_ecore_xcb_conn, counter);
ecore_x_flush();
#endif
}
@ -246,6 +252,7 @@ ecore_x_sync_counter_set(Ecore_X_Sync_Counter counter, int val)
v.lo = val;
xcb_sync_set_counter(_ecore_xcb_conn, counter, v);
ecore_x_flush();
#endif
}
@ -265,6 +272,7 @@ ecore_x_sync_counter_2_set(Ecore_X_Sync_Counter counter, int val_hi, unsigned in
v.lo = val_lo;
xcb_sync_set_counter(_ecore_xcb_conn, counter, v);
ecore_x_flush();
#endif
}

View File

@ -309,7 +309,7 @@ ecore_x_window_free(Ecore_X_Window win)
/* (const char *)&ev); */
xcb_destroy_window(_ecore_xcb_conn, win);
ecore_x_sync();
ecore_x_flush();
}
}
@ -379,6 +379,7 @@ ecore_x_window_configure(Ecore_X_Window win, Ecore_X_Window_Configure_Mask mask,
xcb_configure_window(_ecore_xcb_conn, win, vmask,
(const uint32_t *)&vlist);
ecore_x_flush();
}
/**
@ -413,6 +414,7 @@ ecore_x_window_move(Ecore_X_Window win, int x, int y)
xcb_configure_window(_ecore_xcb_conn, win, mask,
(const uint32_t *)&list);
ecore_x_flush();
}
/**
@ -439,6 +441,7 @@ ecore_x_window_resize(Ecore_X_Window win, int w, int h)
xcb_configure_window(_ecore_xcb_conn, win, mask,
(const uint32_t *)&list);
ecore_x_flush();
}
/**
@ -470,6 +473,7 @@ ecore_x_window_move_resize(Ecore_X_Window win, int x, int y, int w, int h)
xcb_configure_window(_ecore_xcb_conn, win, mask,
(const uint32_t *)&list);
ecore_x_flush();
}
/**
@ -506,6 +510,7 @@ ecore_x_window_border_width_set(Ecore_X_Window win, int border_width)
xcb_configure_window(_ecore_xcb_conn, win,
XCB_CONFIG_WINDOW_BORDER_WIDTH, &list);
ecore_x_flush();
}
/**
@ -528,6 +533,7 @@ ecore_x_window_raise(Ecore_X_Window win)
xcb_configure_window(_ecore_xcb_conn, win,
XCB_CONFIG_WINDOW_STACK_MODE, list);
ecore_x_flush();
}
/**
@ -544,6 +550,7 @@ ecore_x_window_lower(Ecore_X_Window win)
xcb_configure_window(_ecore_xcb_conn, win,
XCB_CONFIG_WINDOW_STACK_MODE, list);
ecore_x_flush();
}
/**
@ -668,6 +675,7 @@ ecore_x_window_hide(Ecore_X_Window win)
(const char *)&ev);
xcb_unmap_window(_ecore_xcb_conn, win);
ecore_x_flush();
}
}
@ -691,6 +699,7 @@ ecore_x_window_focus(Ecore_X_Window win)
xcb_set_input_focus(_ecore_xcb_conn,
XCB_INPUT_FOCUS_PARENT, win, XCB_CURRENT_TIME);
ecore_x_flush();
}
/**
@ -706,6 +715,7 @@ ecore_x_window_focus_at_time(Ecore_X_Window win, Ecore_X_Time time)
if (!win) win = ((xcb_screen_t *)_ecore_xcb_screen)->root;
xcb_set_input_focus(_ecore_xcb_conn, XCB_INPUT_FOCUS_PARENT, win, time);
ecore_x_flush();
}
/**
@ -731,6 +741,7 @@ ecore_x_window_reparent(Ecore_X_Window win, Ecore_X_Window parent, int x, int y)
parent = ((xcb_screen_t *)_ecore_xcb_screen)->root;
xcb_reparent_window(_ecore_xcb_conn, win, parent, x, y);
ecore_x_flush();
}
EAPI void
@ -744,6 +755,7 @@ ecore_x_window_pixmap_set(Ecore_X_Window win, Ecore_X_Pixmap pixmap)
xcb_change_window_attributes(_ecore_xcb_conn, win,
XCB_CW_BACK_PIXMAP, &list);
ecore_x_flush();
}
/**
@ -773,6 +785,7 @@ ecore_x_window_background_color_set(Ecore_X_Window win, unsigned short red, unsi
xcb_change_window_attributes(_ecore_xcb_conn, win,
XCB_CW_BACK_PIXEL, &list);
ecore_x_flush();
}
EAPI void
@ -786,6 +799,7 @@ ecore_x_window_pixel_gravity_set(Ecore_X_Window win, Ecore_X_Gravity gravity)
xcb_change_window_attributes(_ecore_xcb_conn, win,
XCB_CW_BIT_GRAVITY, &list);
ecore_x_flush();
}
EAPI void
@ -799,6 +813,7 @@ ecore_x_window_gravity_set(Ecore_X_Window win, Ecore_X_Gravity gravity)
xcb_change_window_attributes(_ecore_xcb_conn, win,
XCB_CW_WIN_GRAVITY, &list);
ecore_x_flush();
}
EAPI void
@ -812,6 +827,7 @@ ecore_x_window_override_set(Ecore_X_Window win, Eina_Bool override)
xcb_change_window_attributes(_ecore_xcb_conn, win,
XCB_CW_OVERRIDE_REDIRECT, &list);
ecore_x_flush();
}
/**
@ -865,6 +881,7 @@ ecore_x_window_cursor_show(Ecore_X_Window win, Eina_Bool show)
xcb_change_window_attributes(_ecore_xcb_conn, win,
XCB_CW_CURSOR, &list);
}
ecore_x_flush();
}
EAPI void
@ -877,6 +894,7 @@ ecore_x_window_cursor_set(Ecore_X_Window win, Ecore_X_Cursor cursor)
list = cursor;
xcb_change_window_attributes(_ecore_xcb_conn, win, XCB_CW_CURSOR, &list);
ecore_x_flush();
}
EAPI void
@ -891,6 +909,7 @@ ecore_x_window_container_manage(Ecore_X_Window win)
xcb_change_window_attributes(_ecore_xcb_conn, win,
XCB_CW_EVENT_MASK, &list);
ecore_x_flush();
}
EAPI void
@ -913,6 +932,7 @@ ecore_x_window_client_manage(Ecore_X_Window win)
#ifdef ECORE_XCB_SHAPE
xcb_shape_select_input(_ecore_xcb_conn, win, 1);
#endif
ecore_x_flush();
}
EAPI void
@ -927,6 +947,7 @@ ecore_x_window_sniff(Ecore_X_Window win)
xcb_change_window_attributes(_ecore_xcb_conn, win,
XCB_CW_EVENT_MASK, &list);
ecore_x_flush();
}
EAPI void
@ -948,7 +969,7 @@ ecore_x_window_client_sniff(Ecore_X_Window win)
#ifdef ECORE_XCB_SHAPE
xcb_shape_select_input(_ecore_xcb_conn, win, 1);
#endif
ecore_x_flush();
}
EAPI void
@ -957,6 +978,7 @@ ecore_x_window_area_clear(Ecore_X_Window win, int x, int y, int w, int h)
LOGFN(__FILE__, __LINE__, __FUNCTION__);
xcb_clear_area(_ecore_xcb_conn, 0, win, x, y, w, h);
ecore_x_flush();
}
EAPI void
@ -965,6 +987,7 @@ ecore_x_window_area_expose(Ecore_X_Window win, int x, int y, int w, int h)
LOGFN(__FILE__, __LINE__, __FUNCTION__);
xcb_clear_area(_ecore_xcb_conn, 1, win, x, y, w, h);
ecore_x_flush();
}
EAPI void
@ -1043,7 +1066,8 @@ ecore_x_window_manage(Ecore_X_Window win)
reply = xcb_get_window_attributes_reply(_ecore_xcb_conn, cookie, NULL);
if (!reply) return EINA_FALSE;
ecore_x_sync(); // needed
ecore_x_flush(); // needed
// ecore_x_sync(); // needed
/* FIXME: XLib uses XSelectInput */
/* FIXME: Add error handler trap */
@ -1059,7 +1083,8 @@ ecore_x_window_manage(Ecore_X_Window win)
change_cookie = xcb_change_window_attributes(_ecore_xcb_conn, win,
XCB_CW_EVENT_MASK, &list);
ecore_x_sync(); // needed
ecore_x_flush(); // needed
// ecore_x_sync(); // needed
err = xcb_request_check(_ecore_xcb_conn, change_cookie);
if (err) return EINA_FALSE;

View File

@ -48,6 +48,7 @@ ecore_x_window_prop_card32_set(Ecore_X_Window win, Ecore_X_Atom atom, unsigned i
#if SIZEOF_INT == SIZEOF_LONG
xcb_change_property(_ecore_xcb_conn, XCB_PROP_MODE_REPLACE, win, atom,
ECORE_X_ATOM_CARDINAL, 32, num, (unsigned char *)val);
ecore_x_flush();
#else
long *v2;
unsigned int i;
@ -60,6 +61,7 @@ ecore_x_window_prop_card32_set(Ecore_X_Window win, Ecore_X_Atom atom, unsigned i
xcb_change_property(_ecore_xcb_conn, XCB_PROP_MODE_REPLACE, win, atom,
ECORE_X_ATOM_CARDINAL, 32, num, (unsigned char *)v2);
free(v2);
ecore_x_flush();
#endif
}
@ -146,6 +148,7 @@ ecore_x_window_prop_xid_set(Ecore_X_Window win, Ecore_X_Atom atom, Ecore_X_Atom
xcb_change_property(_ecore_xcb_conn, XCB_PROP_MODE_REPLACE, win, atom,
type, 32, num, (unsigned char *)v2);
free(v2);
ecore_x_flush();
#endif
}
@ -194,6 +197,7 @@ ecore_x_window_prop_string_set(Ecore_X_Window win, Ecore_X_Atom type, const char
xcb_change_property(_ecore_xcb_conn, XCB_PROP_MODE_REPLACE, win, type,
ECORE_X_ATOM_UTF8_STRING, 8, strlen(str), str);
ecore_x_flush();
}
EAPI char *
@ -297,9 +301,12 @@ ecore_x_window_prop_property_set(Ecore_X_Window win, Ecore_X_Atom property, Ecor
if (win == 0)
win = ((xcb_screen_t *)_ecore_xcb_screen)->root;
if (size != 32)
xcb_change_property(_ecore_xcb_conn, XCB_PROP_MODE_REPLACE, win,
property, type, size, num, (unsigned char *)data);
if (size != 32)
{
xcb_change_property(_ecore_xcb_conn, XCB_PROP_MODE_REPLACE, win,
property, type, size, num, (unsigned char *)data);
ecore_x_flush();
}
else
{
unsigned long *dat;
@ -314,6 +321,7 @@ ecore_x_window_prop_property_set(Ecore_X_Window win, Ecore_X_Atom property, Ecor
property, type, size, num,
(unsigned char *)dat);
free(dat);
ecore_x_flush();
}
}
}

View File

@ -25,6 +25,7 @@ ecore_x_window_shape_input_mask_set(Ecore_X_Window win, Ecore_X_Pixmap mask)
#ifdef ECORE_XCB_SHAPE
xcb_shape_mask(_ecore_xcb_conn, XCB_SHAPE_SO_SET, XCB_SHAPE_SK_INPUT,
win, 0, 0, mask);
ecore_x_flush();
#else
return;
win = 0;
@ -47,6 +48,7 @@ ecore_x_window_shape_mask_set(Ecore_X_Window win, Ecore_X_Pixmap mask)
#ifdef ECORE_XCB_SHAPE
xcb_shape_mask(_ecore_xcb_conn, XCB_SHAPE_SO_SET, XCB_SHAPE_SK_BOUNDING,
win, 0, 0, mask);
ecore_x_flush();
#else
return;
win = 0;
@ -62,6 +64,7 @@ ecore_x_window_shape_window_set(Ecore_X_Window win, Ecore_X_Window shape_win)
#ifdef ECORE_XCB_SHAPE
xcb_shape_combine(_ecore_xcb_conn, XCB_SHAPE_SO_SET, XCB_SHAPE_SK_BOUNDING,
XCB_SHAPE_SK_BOUNDING, win, 0, 0, shape_win);
ecore_x_flush();
#else
return;
win = 0;
@ -77,6 +80,7 @@ ecore_x_window_shape_window_set_xy(Ecore_X_Window win, Ecore_X_Window shape_win,
#ifdef ECORE_XCB_SHAPE
xcb_shape_combine(_ecore_xcb_conn, XCB_SHAPE_SO_SET, XCB_SHAPE_SK_BOUNDING,
XCB_SHAPE_SK_BOUNDING, win, x, y, shape_win);
ecore_x_flush();
#else
return;
win = 0;
@ -103,6 +107,7 @@ ecore_x_window_shape_rectangle_set(Ecore_X_Window win, int x, int y, int w, int
xcb_shape_rectangles(_ecore_xcb_conn, XCB_SHAPE_SO_SET,
XCB_SHAPE_SK_BOUNDING, XCB_CLIP_ORDERING_UNSORTED,
win, 0, 0, 1, &rect);
ecore_x_flush();
#else
return;
win = 0;
@ -145,6 +150,7 @@ ecore_x_window_shape_rectangles_set(Ecore_X_Window win, Ecore_X_Rectangle *rects
win, 0, 0, num, (xcb_rectangle_t *)rect);
if (rect) free(rect);
ecore_x_flush();
#else
return;
win = 0;
@ -162,6 +168,7 @@ ecore_x_window_shape_window_add(Ecore_X_Window win, Ecore_X_Window shape_win)
xcb_shape_combine(_ecore_xcb_conn, XCB_SHAPE_SO_UNION,
XCB_SHAPE_SK_BOUNDING, XCB_SHAPE_SK_BOUNDING,
win, 0, 0, shape_win);
ecore_x_flush();
#else
return;
win = 0;
@ -178,6 +185,7 @@ ecore_x_window_shape_window_add_xy(Ecore_X_Window win, Ecore_X_Window shape_win,
xcb_shape_combine(_ecore_xcb_conn, XCB_SHAPE_SO_UNION,
XCB_SHAPE_SK_BOUNDING, XCB_SHAPE_SK_BOUNDING,
win, x, y, shape_win);
ecore_x_flush();
#else
return;
win = 0;
@ -204,6 +212,7 @@ ecore_x_window_shape_rectangle_add(Ecore_X_Window win, int x, int y, int w, int
xcb_shape_rectangles(_ecore_xcb_conn, XCB_SHAPE_SO_UNION,
XCB_SHAPE_SK_BOUNDING, XCB_CLIP_ORDERING_UNSORTED,
win, 0, 0, 1, &rect);
ecore_x_flush();
#else
return;
win = 0;
@ -231,6 +240,7 @@ ecore_x_window_shape_rectangle_subtract(Ecore_X_Window win, int x, int y, int w,
xcb_shape_rectangles(_ecore_xcb_conn, XCB_SHAPE_SO_SUBTRACT,
XCB_SHAPE_SK_BOUNDING, XCB_CLIP_ORDERING_UNSORTED,
win, 0, 0, 1, &rect);
ecore_x_flush();
#else
return;
win = 0;
@ -258,6 +268,7 @@ ecore_x_window_shape_rectangle_clip(Ecore_X_Window win, int x, int y, int w, int
xcb_shape_rectangles(_ecore_xcb_conn, XCB_SHAPE_SO_INTERSECT,
XCB_SHAPE_SK_BOUNDING, XCB_CLIP_ORDERING_UNSORTED,
win, 0, 0, 1, &rect);
ecore_x_flush();
#else
return;
win = 0;
@ -299,6 +310,7 @@ ecore_x_window_shape_rectangles_add(Ecore_X_Window win, Ecore_X_Rectangle *rects
win, 0, 0, num, (xcb_rectangle_t *)&rect);
if (rect) free(rect);
ecore_x_flush();
#else
return;
win = 0;
@ -368,6 +380,7 @@ ecore_x_window_shape_events_select(Ecore_X_Window win, Eina_Bool on)
#ifdef ECORE_XCB_SHAPE
xcb_shape_select_input(_ecore_xcb_conn, win, on);
ecore_x_flush();
#else
return;
win = 0;
@ -478,6 +491,7 @@ ecore_x_window_shape_input_rectangles_set(Ecore_X_Window win, Ecore_X_Rectangle
win, 0, 0, num, (xcb_rectangle_t *)rect);
if (rect) free(rect);
ecore_x_flush();
#else
return;
win = 0;
@ -503,6 +517,7 @@ ecore_x_window_shape_input_rectangle_subtract(Ecore_X_Window win, int x, int y,
xcb_shape_rectangles(_ecore_xcb_conn, XCB_SHAPE_SO_SUBTRACT,
XCB_SHAPE_SK_INPUT, XCB_CLIP_ORDERING_UNSORTED,
win, 0, 0, 1, &rect);
ecore_x_flush();
#else
return;
win = 0;
@ -530,6 +545,7 @@ ecore_x_window_shape_input_rectangle_add(Ecore_X_Window win, int x, int y, int w
xcb_shape_rectangles(_ecore_xcb_conn, XCB_SHAPE_SO_UNION,
XCB_SHAPE_SK_INPUT, XCB_CLIP_ORDERING_UNSORTED,
win, 0, 0, 1, &rect);
ecore_x_flush();
#else
return;
win = 0;
@ -557,6 +573,7 @@ ecore_x_window_shape_input_rectangle_set(Ecore_X_Window win, int x, int y, int w
xcb_shape_rectangles(_ecore_xcb_conn, XCB_SHAPE_SO_SET,
XCB_SHAPE_SK_INPUT, XCB_CLIP_ORDERING_UNSORTED,
win, 0, 0, 1, &rect);
ecore_x_flush();
#else
return;
win = 0;
@ -575,6 +592,7 @@ ecore_x_window_shape_input_window_set_xy(Ecore_X_Window win, Ecore_X_Window shap
#ifdef ECORE_XCB_SHAPE
xcb_shape_combine(_ecore_xcb_conn, XCB_SHAPE_SO_SET, XCB_SHAPE_SK_INPUT,
XCB_SHAPE_SK_INPUT, win, x, y, shape_win);
ecore_x_flush();
#else
return;
win = 0;
@ -592,6 +610,7 @@ ecore_x_window_shape_input_window_add_xy(Ecore_X_Window win, Ecore_X_Window shap
#ifdef ECORE_XCB_SHAPE
xcb_shape_combine(_ecore_xcb_conn, XCB_SHAPE_SO_UNION, XCB_SHAPE_SK_INPUT,
XCB_SHAPE_SK_INPUT, win, x, y, shape_win);
ecore_x_flush();
#else
return;
win = 0;
@ -609,6 +628,7 @@ ecore_x_window_shape_input_window_set(Ecore_X_Window win, Ecore_X_Window shape_w
#ifdef ECORE_XCB_SHAPE
xcb_shape_combine(_ecore_xcb_conn, XCB_SHAPE_SO_SET, XCB_SHAPE_SK_INPUT,
XCB_SHAPE_SK_INPUT, win, 0, 0, shape_win);
ecore_x_flush();
#else
return;
win = 0;
@ -633,6 +653,7 @@ ecore_x_window_shape_input_rectangle_clip(Ecore_X_Window win, int x, int y, int
xcb_shape_rectangles(_ecore_xcb_conn, XCB_SHAPE_SO_INTERSECT,
XCB_SHAPE_SK_INPUT, XCB_CLIP_ORDERING_UNSORTED,
win, 0, 0, 1, &rect);
ecore_x_flush();
#else
return;
win = 0;
@ -674,6 +695,7 @@ ecore_x_window_shape_input_rectangles_add(Ecore_X_Window win, Ecore_X_Rectangle
win, 0, 0, num, (xcb_rectangle_t *)&rect);
if (rect) free(rect);
ecore_x_flush();
#else
return;
win = 0;

View File

@ -133,6 +133,7 @@ ecore_x_region_new(Ecore_X_Rectangle *rects, int num)
region = xcb_generate_id(_ecore_xcb_conn);
xcb_xfixes_create_region(_ecore_xcb_conn, region, num, xrects);
free(xrects);
ecore_x_flush();
#endif
return region;
@ -157,6 +158,7 @@ ecore_x_region_new_from_bitmap(Ecore_X_Pixmap bitmap)
#ifdef ECORE_XCB_XFIXES
region = xcb_generate_id(_ecore_xcb_conn);
xcb_xfixes_create_region_from_bitmap(_ecore_xcb_conn, region, bitmap);
ecore_x_flush();
#endif
return region;
@ -183,6 +185,7 @@ ecore_x_region_new_from_window(Ecore_X_Window win, Ecore_X_Region_Type type)
#ifdef ECORE_XCB_XFIXES
region = xcb_generate_id(_ecore_xcb_conn);
xcb_xfixes_create_region_from_window(_ecore_xcb_conn, region, win, type);
ecore_x_flush();
#endif
return region;
@ -206,6 +209,7 @@ ecore_x_region_new_from_gc(Ecore_X_GC gc)
#ifdef ECORE_XCB_XFIXES
region = xcb_generate_id(_ecore_xcb_conn);
xcb_xfixes_create_region_from_gc(_ecore_xcb_conn, region, gc);
ecore_x_flush();
#endif
return region;
@ -229,6 +233,7 @@ ecore_x_region_new_from_picture(Ecore_X_Picture picture)
#ifdef ECORE_XCB_XFIXES
region = xcb_generate_id(_ecore_xcb_conn);
xcb_xfixes_create_region_from_picture(_ecore_xcb_conn, region, picture);
ecore_x_flush();
#endif
return region;
@ -248,6 +253,7 @@ ecore_x_region_free(Ecore_X_Region region)
#ifdef ECORE_XCB_XFIXES
xcb_xfixes_destroy_region(_ecore_xcb_conn, region);
ecore_x_flush();
#endif
}
@ -274,6 +280,7 @@ ecore_x_region_set(Ecore_X_Region region, Ecore_X_Rectangle *rects, int num)
xrects = _ecore_xcb_rect_to_xcb(rects, num);
xcb_xfixes_set_region(_ecore_xcb_conn, region, num, xrects);
free(xrects);
ecore_x_flush();
#endif
}
@ -293,6 +300,7 @@ ecore_x_region_copy(Ecore_X_Region dest, Ecore_X_Region source)
// NB: Hmmmm...this may need converting to/fro xcb_rectangle_t
#ifdef ECORE_XCB_XFIXES
xcb_xfixes_copy_region(_ecore_xcb_conn, source, dest);
ecore_x_flush();
#endif
}
@ -313,6 +321,7 @@ ecore_x_region_combine(Ecore_X_Region dest, Ecore_X_Region source1, Ecore_X_Regi
#ifdef ECORE_XCB_XFIXES
xcb_xfixes_union_region(_ecore_xcb_conn, source1, source2, dest);
ecore_x_flush();
#endif
}
@ -333,6 +342,7 @@ ecore_x_region_intersect(Ecore_X_Region dest, Ecore_X_Region source1, Ecore_X_Re
#ifdef ECORE_XCB_XFIXES
xcb_xfixes_intersect_region(_ecore_xcb_conn, source1, source2, dest);
ecore_x_flush();
#endif
}
@ -353,6 +363,7 @@ ecore_x_region_subtract(Ecore_X_Region dest, Ecore_X_Region source1, Ecore_X_Reg
#ifdef ECORE_XCB_XFIXES
xcb_xfixes_subtract_region(_ecore_xcb_conn, source1, source2, dest);
ecore_x_flush();
#endif
}
@ -383,6 +394,7 @@ ecore_x_region_invert(Ecore_X_Region dest, Ecore_X_Rectangle *bounds, Ecore_X_Re
xrects.height = bounds->height;
xcb_xfixes_invert_region(_ecore_xcb_conn, source, xrects, dest);
ecore_x_flush();
#endif
}
@ -402,6 +414,7 @@ ecore_x_region_translate(Ecore_X_Region region, int dx, int dy)
#ifdef ECORE_XCB_XFIXES
xcb_xfixes_translate_region(_ecore_xcb_conn, region, dx, dy);
ecore_x_flush();
#endif
}
@ -420,6 +433,7 @@ ecore_x_region_extents(Ecore_X_Region dest, Ecore_X_Region source)
#ifdef ECORE_XCB_XFIXES
xcb_xfixes_region_extents(_ecore_xcb_conn, source, dest);
ecore_x_flush();
#endif
}
@ -512,6 +526,7 @@ ecore_x_region_expand(Ecore_X_Region dest, Ecore_X_Region source, unsigned int l
#ifdef ECORE_XCB_XFIXES
xcb_xfixes_expand_region(_ecore_xcb_conn, source, dest, left, right, top, bottom);
ecore_x_flush();
#endif
}
@ -538,6 +553,7 @@ ecore_x_region_gc_clip_set(Ecore_X_Region region, Ecore_X_GC gc, int x, int y)
#ifdef ECORE_XCB_XFIXES
xcb_xfixes_set_gc_clip_region(_ecore_xcb_conn, gc, region, x, y);
ecore_x_flush();
#endif
}
@ -561,6 +577,7 @@ ecore_x_region_window_shape_set(Ecore_X_Region region, Ecore_X_Window dest, Ecor
#ifdef ECORE_XCB_XFIXES
xcb_xfixes_set_window_shape_region(_ecore_xcb_conn, dest, type, x, y, region);
ecore_x_flush();
#endif
}
@ -586,6 +603,7 @@ ecore_x_region_picture_clip_set(Ecore_X_Region region, Ecore_X_Picture picture,
#ifdef ECORE_XCB_XFIXES
xcb_xfixes_set_picture_clip_region(_ecore_xcb_conn, picture, region, x, y);
ecore_x_flush();
#endif
}