diff options
author | Ander Conselvan de Oliveira <ander.conselvan.de.oliveira@intel.com> | 2012-05-25 16:03:06 +0300 |
---|---|---|
committer | Kristian Høgsberg <krh@bitplanet.net> | 2012-05-25 23:28:59 -0400 |
commit | 210eb9d2bafda34f30b56171ba7adefc3df4c82d (patch) | |
tree | 6b698e1318387196c572ed0970e5141e6a5ed506 /clients/dnd.c | |
parent | dc8c8fce72a169fe5d1dd716e29b406ea044ae4b (diff) |
dnd: work around cairo-gl brokenness
If cairo-gl is used, display_create_surface() will create an
wl_egl_window for each surface and this will result in errors if this
surface is used as a source. Also, one can't get a wl_buffer for such
a surface wich led to crashes when trying to do so for the drag icon.
This patch works around both problems by forcing the item and drag icon
surfaces to use shm.
Diffstat (limited to 'clients/dnd.c')
-rw-r--r-- | clients/dnd.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/clients/dnd.c b/clients/dnd.c index 32dec96..de1ca47 100644 --- a/clients/dnd.c +++ b/clients/dnd.c @@ -106,7 +106,8 @@ item_create(struct display *display, int x, int y, int seed) rect.width = item_width; rect.height = item_height; - item->surface = display_create_surface(display, NULL, &rect, 0); + item->surface = + display_create_surface(display, NULL, &rect, SURFACE_SHM); item->x = x; item->y = y; @@ -322,7 +323,8 @@ create_drag_cursor(struct dnd_drag *dnd_drag, rectangle.width = item_width + 2 * pointer->width; rectangle.height = item_height + 2 * pointer->height; - surface = display_create_surface(dnd->display, NULL, &rectangle, 0); + surface = display_create_surface(dnd->display, NULL, &rectangle, + SURFACE_SHM); cr = cairo_create(surface); cairo_translate(cr, pointer->width, pointer->height); |