http://bugs.enlightenment.org/show_bug.cgi?id=444

Steps to reproduce
===================
1 Download the source attached source code.
2 Compile with "gcc -g -o example `pkg-config --cflags --libs evas ecore-evas
edje` main.c"
3 Execute ./example

Actual results
==============
Two rectangles are drawn, a smaller red rectangle over a blue rectangle.

Expected results
================
Two rectangles are be drawn, the smaller red rectangle *under* a blue
rectangle.

Additional notes
================
Commenting the call to "evas_object_clip_set" solves the issue, the clipper
(white rectangle) stays on top.

I updated, recompiled and installed all the libraries involved right before I
submitted this bug.
#include <stdlib.h>
#include <stdio.h>
#include <Evas.h>
#include <Ecore.h>
#include <Ecore_Evas.h>
#include <Edje.h>

//The pointer to a canvas wrapper
Ecore_Evas *ecore_evas = NULL;
//The pointer to an Evas canvas
Evas *evas = NULL;
//The pointer to a given Edje object
Evas_Object *edje = NULL;
//Width and height for resizing Evas/Edje objects
Evas_Coord width, height;
//Pointers to Ecore handlers
Ecore_Event_Handler* close = NULL;

int main() {

    //Control that the libraries are properly initialized
    if (!ecore_init()) return EXIT_FAILURE;
    if (!ecore_evas_init()) return EXIT_FAILURE;
    if (!edje_init()) return EXIT_FAILURE;
 
    //Check the canvas wrapper (800x600 X11 window) is created correctly
    ecore_evas = ecore_evas_software_x11_new(NULL, 0, 0, 0, 800, 600);
    if (!ecore_evas) return EXIT_FAILURE;

    //We set some window attributes and make the wrapper visible
    ecore_evas_title_set(ecore_evas, "Example Application");
    ecore_evas_name_class_set(ecore_evas, "testapp", "Testapp");
    ecore_evas_show(ecore_evas);

    //Get the pointer to the canvas and add tan object
    evas = ecore_evas_get(ecore_evas);

    Evas_Object *blue;
    blue = evas_object_rectangle_add(evas);
    evas_object_color_set(blue,0,0,255,255);
    evas_object_resize(blue,500,500);
    evas_object_move(blue,0,0);
    evas_object_show(blue);

    Evas_Object *red;
    red = evas_object_rectangle_add(evas);
    evas_object_color_set(red,255,0,0,255);
    evas_object_resize(red,100,100);
    evas_object_move(red,25,25);
    evas_object_show(red);
    evas_object_stack_above(red,blue);

    Evas_Object *clipper;
    clipper = evas_object_rectangle_add(evas);
    evas_object_color_set(clipper,255,255,255,255);
    evas_object_resize(clipper,250,250);
    evas_object_move(clipper,50,50);
    evas_object_show(clipper);

    evas_object_clip_set(blue,clipper);
    evas_object_stack_above(clipper,red); //does not work! red stays on top.

    //Starting the main application loop
    ecore_main_loop_begin();
} 
-------------------------------------------------------------------------
This SF.net email is sponsored by the 2008 JavaOne(SM) Conference 
Don't miss this year's exciting event. There's still time to save $100. 
Use priority code J8TL2D2. 
http://ad.doubleclick.net/clk;198757673;13503038;p?http://java.sun.com/javaone
_______________________________________________
enlightenment-devel mailing list
enlightenment-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/enlightenment-devel

Reply via email to