summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorHannes Janetzek <hannes.janetzek@gmail.com>2009-03-04 13:04:35 +0000
committerHannes Janetzek <hannes.janetzek@gmail.com>2009-03-04 13:04:35 +0000
commit1f986f4b28b482b6c981b0ced4027321cee9328c (patch)
treec598ca0df2740e881ab4e29fa8f08356de1b01c1 /src
parent2c3c2e955c3e7585499e28dddb99a9a68e65dbbc (diff)
downloadenlightenment-1f986f4b28b482b6c981b0ced4027321cee9328c.tar.gz
use argb window for drag object when composite is enabled
SVN revision: 39365
Diffstat (limited to 'src')
-rw-r--r--src/bin/e_dnd.c23
1 files changed, 17 insertions, 6 deletions
diff --git a/src/bin/e_dnd.c b/src/bin/e_dnd.c
index 07311f4bdf..4c97b80326 100644
--- a/src/bin/e_dnd.c
+++ b/src/bin/e_dnd.c
@@ -175,9 +175,22 @@ e_drag_new(E_Container *container, int x, int y,
drag->ecore_evas = e_canvas_new(e_config->evas_engine_drag, drag->container->win,
drag->x, drag->y, drag->w, drag->h, 1, 1,
&(drag->evas_win), NULL);
- /* avoid excess exposes when shaped - set damage avoid to 1 */
- ecore_evas_avoid_damage_set(drag->ecore_evas, 1);
-
+ if (e_config->use_composite)
+ {
+ ecore_evas_alpha_set(drag->ecore_evas, 1);
+ if (e_config->evas_engine_drag == ECORE_EVAS_ENGINE_SOFTWARE_16_X11)
+ drag->evas_win = ecore_evas_software_x11_window_get(drag->ecore_evas);
+ else if (e_config->evas_engine_drag == ECORE_EVAS_ENGINE_XRENDER_X11)
+ drag->evas_win = ecore_evas_xrender_x11_window_get(drag->ecore_evas);
+ }
+ else
+ {
+ /* avoid excess exposes when shaped - set damage avoid to 1 */
+ ecore_evas_avoid_damage_set(drag->ecore_evas, 1);
+ ecore_evas_shaped_set(drag->ecore_evas, 1);
+ ecore_x_window_shape_events_select(drag->evas_win, 1);
+ }
+
e_canvas_add(drag->ecore_evas);
drag->shape = e_container_shape_add(drag->container);
e_container_shape_move(drag->shape, drag->x, drag->y);
@@ -185,13 +198,11 @@ e_drag_new(E_Container *container, int x, int y,
drag->evas = ecore_evas_get(drag->ecore_evas);
e_container_window_raise(drag->container, drag->evas_win, drag->layer);
- ecore_x_window_shape_events_select(drag->evas_win, 1);
+
ecore_evas_name_class_set(drag->ecore_evas, "E", "_e_drag_window");
ecore_evas_title_set(drag->ecore_evas, "E Drag");
ecore_evas_ignore_events_set(drag->ecore_evas, 1);
- ecore_evas_shaped_set(drag->ecore_evas, 1);
-
drag->object = evas_object_rectangle_add(drag->evas);
evas_object_color_set(drag->object, 255, 0, 0, 255);
evas_object_show(drag->object);