Hi,
  I found some bugs which come from the difference of frame processing
between X and Wayland:
  http://trac.enlightenment.org/e/ticket/1024
  http://trac.enlightenment.org/e/ticket/1193
  As you know, window client area is smaller in Wayland engine because
elementary has to keep frame space. But  evas_object_resize() reduces frame
space for every widget. This is wrong. It causes widget height is
subtracted
to negative and couldn't be display because its condition isn't enough
only by checking obj->smart->parent. So I add one condition
strcmp(obj->type, "elm_win") == 0 for making sure only elm_win do frame
calculation. Please review evas_object_resize_frame.patch.
  It also need calling evas_object_move() once for re-calculating widget
position based on frame space. (label_example_moving.patch)
  But because smaller window client area couldn't keep all content (e.g.
text of all labels in label_example_01) of window like X. Otherwise, it is
also OK to enlarge elm_win size for wayland engine specially in
label_example_01.c. But this will make application code different
between X and Wayland. it may not make sense because platform engine
dependency.
  It may be better to enlarge (not reduce) window size in elm_win
construction/layout/rendering and keep the same size of window client area
with X. Frame will be drawn on additional area. But it means modify
current elm_win construction/layout/rendering mechanism. So we may have to
convince community and need more time to implement it because it is a big
change.
  Which path is better choice? At least, evas_object_resize_frame.patch
may be temp solution for workaround.
  Thanks.

Yan Wang



Index: src/lib/canvas/evas_object_main.c
===================================================================
--- src/lib/canvas/evas_object_main.c	(revision 74333)
+++ src/lib/canvas/evas_object_main.c	(working copy)
@@ -683,7 +683,7 @@ evas_object_resize(Evas_Object *obj, Evas_Coord w,
         int fw, fh;
 
         evas_output_framespace_get(obj->layer->evas, NULL, NULL, &fw, &fh);
-        if (!obj->smart.parent)
+        if (!obj->smart.parent && strcmp(obj->type, "elm_win") == 0)
           {
              nw = w - fw;
              nh = h - fh;
Index: src/examples/label_example_01.c
===================================================================
--- src/examples/label_example_01.c	(revision 74333)
+++ src/examples/label_example_01.c	(working copy)
@@ -25,6 +25,7 @@ elm_main(int argc, char **argv)
    elm_label_slide_set(label, EINA_TRUE);
    elm_object_style_set(label, "slide_bounce");
    evas_object_resize(label, 200, 15);
+   evas_object_move(label, 0, 0);
    evas_object_show(label);
 
    label2 = elm_label_add(win);
------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and 
threat landscape has changed and how IT managers can respond. Discussions 
will include endpoint security, mobile security and the latest in malware 
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
_______________________________________________
enlightenment-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/enlightenment-devel

Reply via email to