Commit Graph

17491 Commits

Author SHA1 Message Date
Mike Blumenkrantz 16d28c6bc8 eina: add macros for determining whether floats are nonzero
this is a commonly-used functionality, so make it faster to write

@feature
2017-01-06 12:57:08 -05:00
Mike Blumenkrantz 1b4c26be8e eina: add functions for warningless exact comparisons of floats
in some cases a user does want to check exact values, so these functions
should be used to indicate this intent

needs windows support

@feature
2017-01-06 12:57:08 -05:00
Chris Michael 6cf290faec evas-wayland-shm: Fix formatting
NB: No functional changes, just reformatting so that this insane
one-liner wraps to 80...

Signed-off-by: Chris Michael <cp.michael@samsung.com>
2017-01-06 09:33:58 -05:00
Marcel Hollerbach 04c0e5609c eina: fix up last commit
i am sorry. I missed that i just freed the string and not the complete
buf. This now really frees the buf.
2017-01-06 13:02:37 +01:00
Marcel Hollerbach 4d6d177ff7 eina_buf: replace eina_strbuf_free_return with eina_xXxbuf_release
The api name free_return wasnt a good choice so it is changed to
release. This also moves the implementation to binbuf template so it is
available in all buf types.
2017-01-06 12:45:27 +01:00
Carsten Haitzler c7d23534d9 eina - fix redefinition of word size if already defined 2017-01-06 19:25:50 +09:00
YeongJong Lee 13730d7a75 elm_code: Add 2 spaces auto indent after keywords
Summary:
When insert newline, check the previous line has keyword.
If so, insert 2 spaces indent more.

Test Plan:
1. run elementry_test - Code Editor or Edi.
2. Type some code with keywords.
3. Type <Return>.
4. Check that the indentation of newline is correct.

Reviewers: ajwillia.ms

Reviewed By: ajwillia.ms

Subscribers: cedric, jpeg

Differential Revision: https://phab.enlightenment.org/D4543
2017-01-06 10:16:41 +00:00
Carsten Haitzler bb6c324e73 evas gl - avoid a possible crash of tex upload of invalid sized image
so i had a crash where my bt said the image size is 1x1 but the img
struct said its 0x0, so put in protection to not upload a texture from
a 0x0 image... just for now... because this is odd - the image data is
a real ptr i can access and there should be at least 1 pixel... but i
can't be sure this fixes it as this is one of those "one offs" i cant
reproduce...

@fix
2017-01-06 17:46:13 +09:00
Carsten Haitzler 0690d47880 evas image preload - fix race condition that stops preloads
so if you queue a preload while a cancel is still pending the new
preload never happens. this fixes that. now it does but checking for
leftover tasks in the cancel cb and rescheduling a preload thread.

@fix
2017-01-06 17:46:13 +09:00
Mykyta Biliavskyi a3426a38ac edje_edit: fix set the images set as image.normal value.
Added ability to set the images set by name into image
part image.normal attribute.
Add search the images set id for case when the image id doesn't find in
image entries list.

@fix
2017-01-06 10:36:57 +02:00
Jiyoun Park 8ee0c30eb0 evas_image_main: fix memory leak of camera app -PLM[P161206-03545]
In gl engine, image objects try to unload image's pixel data after creating or updating the texture.
but image entry's reference is still 1, it is added to the pending_unloads list,
and it is cleaned when evas render function.

If elm image use preload feature, preload_done flag is true, so this image data cannot be removed from
pending_unloads list, it cause memory leak.

I think it is better to free image's pixel data in evas_cache_image_unload_data,
(not add to the pending_unloads list)
but it it complicated to modify.

so I'll remove the code to check preload_done flag in  evas_common_rgba_pending_unloads_cleanup function.
this flag check was added because of gl preloading, but now gl preloading feature is disabled.
this flag is related with https://phab.enlightenment.org/D2823

I tested photocam, but crash doesn't occur anymore, even though removing flag check.
2017-01-06 15:40:09 +09:00
Carsten Haitzler 3842e87d3a evas image skip header - more fixes for when images fail to load
this fixes some more issues i have found in using skip header like if
the file doesn't exist etc. recent feature add so not a fix.
2017-01-06 09:38:44 +09:00
Cedric BAIL 273238d725 eina: try to provide __WORDSIZE to system that don't have it aka OpenBSD. 2017-01-05 16:33:59 -08:00
Derek Foreman 44517fca5c wayland_shm: Yeah I dunno
This doesn't make any sense to me so it can't be right, right?

Fixes session recovery.  If it breaks something else talk to devilhorns. :)
2017-01-05 13:40:31 -06:00
Derek Foreman 4c1227433f wayland_shm: Add a way to update the stored wayland objects
On session recovery the engine needs to be given new copies of the
surface, dmabuf, and shm objects to run in the new connection.

This fixes session recovery breakage introduced when we stopped recreating
the outbuf on reconfigure.
2017-01-05 13:40:31 -06:00
Derek Foreman 7b0f937880 wayland_shm: Add a force flag to surface reconfigure
We're going to need a way to force reconfigure unconditionally to make
session recovery work again.
2017-01-05 13:40:31 -06:00
Derek Foreman bc000f3ad2 ecore_wl2: Fix accidental re-use of tmp var
Oops, same tmp var for a nested inlist traverse.  That won't end well.
2017-01-05 13:40:31 -06:00
Derek Foreman df72ddf43c ecore_wl2: Don't request shell surfaces for all window types
Now that cursors are "windows", this results in a mess.  So skip at least
NONE and DND for now.
2017-01-05 13:40:31 -06:00
Derek Foreman 120063ad76 ecore_wl2: Prevent use after free on input deletion
Window structs keep inputs around, so we should sweep through them
and NULL out any stale ones on a delete.
2017-01-05 13:40:31 -06:00
Derek Foreman 8328d4db89 ecore_wl2: Remove the rest of the cursor frame callback
Oops, I made a clean spot, now I need to clean up the rest of this.

ref 641dfab516
2017-01-05 13:40:31 -06:00
Daniel Kolesa 5355699859 eolian: stricter implement/constructor verification
The system now verifies whether the class of an implement or
constructor exists within the inheritance hierarchy. It also
properly checks duplicates everywhere and prints better error
messages.
2017-01-05 16:00:14 +01:00
Marcel Hollerbach 2f1d0fb189 eina_strbuf: add eina_strbuf_free_return
Summary:
For a function which just composes a string with strbuf its quite
usefull to return the string while its freed.

This makes a function like:

{
   Eina_Strbuf *buf;
   char *path;

   buf = eina_strbuf_new();
   eina_strbuf_append(buf, "test");
   eina_strbuf_append_printf(buf, "%s-%d.edj", "test", 0);
   path = eina_strbuf_string_steal(buf);
   eina_strbuf_free(buf);
   return path;
}

To:

{
   Eina_Strbuf *buf;

   buf = eina_strbuf_new();
   eina_strbuf_append(buf, "test");
   eina_strbuf_append_printf(buf, "%s-%d.edj", "test", 0);
   return eina_strbuf_free_return(buf);
}

Which is a bit more handy.

Test Plan: just run make check

Reviewers: raster, cedric

Subscribers: jpeg

Differential Revision: https://phab.enlightenment.org/D4545
2017-01-05 14:08:23 +01:00
JEONGHYUN YUN e998529f2e elm_panel: Add _scrollable_layout_resize internal funcion for refactoring
Summary:
Remove duplicated code in _elm_panel_efl_gfx_size_set
and _elm_panel_scrollable_content_size_set.

Reviewers: jpeg, woohyun, eunue, jypark

Subscribers: cedric, jpeg

Differential Revision: https://phab.enlightenment.org/D4553
2017-01-05 17:26:32 +09:00
Jean-Philippe Andre b11f371703 colorselector: Switch to Efl.Ui.Box internally
This doesn't change anything (in theory) but was to test the
box implementation. Conclusion: it's not much better than
elm_box. Also, homogenous mode isn't set because the layout
is completely broken (+ sets a min size equal to the object
size, thus can not resize down ever). The palette's objects
have the same size anyway.
2017-01-05 17:26:15 +09:00
Jean-Philippe Andre a6e54c6109 evas: Slightly optimize size hints
Object size hints are stored in a specially allocated struct
(from a mempool) and even a call to size_hint_set(default_values)
will allocate this struct. This patch avoids unnecessary allocations.

Originally I was trying to fix an infinite recalc loop but it
magically vanished...
2017-01-05 17:26:14 +09:00
Jean-Philippe Andre b5b78c0232 button: Add support for efl_text_set
For now a very quick and dirty solution, relying on elm_layout
legacy APIs.
2017-01-05 10:37:20 +09:00
Jean-Philippe Andre 1ce8c1c3d1 Revert "elm_layout: Implement Efl.Text"
This reverts commit 584e17ae84.

After talking to @herdsman (before xmas) we concluded that we
didn't necessarily want a generic version of efl_text_set/get
for elm_layout. Instead, each widget that should have a default
text part should implement text_set/get themselves (very simple).

Note that Efl.Ui.Text somehow does not "implement" efl_text when
looking at the eolian files. It works by composition.
2017-01-05 10:37:19 +09:00
JEONGHYUN YUN 401488cea7 elm_panel: Add get function in scrollable_content_size property
Summary:
Added get function for getting the size of the scrollable panel.
Additionally, added some exception handling code in scrollable_content_size_set

Reviewers: woohyun, eunue

Subscribers: cedric, jpeg

Differential Revision: https://phab.enlightenment.org/D4549
2017-01-05 10:26:29 +09:00
Chris Michael 459a23244f elementary: Support xdg_shell version 6 show_window_menu function
As we now support xdg_shell version 6 on the client-side, we need to
use the zxdg_toplevel_v6 function call to show window menus.

Signed-off-by: Chris Michael <cp.michael@samsung.com>
2017-01-04 14:25:24 -05:00
Chris Michael 4c04958f87 ecore-evas-wayland: Support zxdg_shell version 6 configure_ack
Small patch to support configure acknowledgement with xdg_shell
version 6.

Signed-off-by: Chris Michael <cp.michael@samsung.com>
2017-01-04 14:25:24 -05:00
Chris Michael d86b296813 ecore-wl2: Add support for xdg shell version 6
This patch adds support (client-side) for xdg_shell version 6.
Enlightenment is currently using this version as it's desktop shell,
so we need to support it client-side also.

fixes T4998

@feature

Signed-off-by: Chris Michael <cp.michael@samsung.com>
2017-01-04 14:25:18 -05:00
Chris Michael 4ba4efb8fc ecore-wl2: Fix formatting
NB: No functional changes, just cleaning up formatting before the
serious work begins.

Signed-off-by: Chris Michael <cp.michael@samsung.com>
2017-01-04 11:08:49 -05:00
Derek Foreman 780293ac93 wayland_shm: Shut up coverity
Quite cosmetic, but I suppose this is better than flagging as false
positive.

CID1368209
2017-01-04 08:54:03 -06:00
Chris Michael 80f5860c68 evas-gl-generic: Mark 'data' parameter as unused
Signed-off-by: Chris Michael <cp.michael@samsung.com>
2017-01-04 08:12:21 -05:00
Carsten Haitzler 309e490bc0 efl header skip with preload - fix seg on invalid file
for invalid files we didn't handle this case, so fix it - recent
commit/feature add.
2017-01-04 20:18:42 +09:00
Carsten Haitzler b68280bd85 wayland egl - unbork after manmower broke rendering removing swapinterval
so removing eglSwapInterval() is a very poor idea as then... who knwos
what it is? this broke at least nouveau (under weston AND under
enlightenment). a very skillful b0rk here than i luckily caught
quickly! :)
2017-01-04 19:21:02 +09:00
Carsten Haitzler 2842165415 openssl 1.1 build break fixes
this fixes building against openssl 1.1 since it broke api in various
ways by hiding structs and deprecating api's (this causes warnings not
breaks unlike the struct hiding). this adapts to these changes and
makes efl build again.

@fix
2017-01-04 17:47:38 +09:00
Haegeun Park 0ac95c40bc [Evas GL Thread 1] evas: Fixed indentation of evas_thread_render.c
Summary:
@fix

Change-Id: I411fe6d75dc7b15c0d7f19f165ea4b0cc3b28c12

Reviewers: sung, jpeg, cedric, raster

Subscribers: cedric, jpeg

Differential Revision: https://phab.enlightenment.org/D4525
2017-01-04 15:30:21 +09:00
Jee-Yong Um a6c1c2d08f edje_cc: Keep lookups for removed program
Summary:
Program lookups triggered by removed edje program should be removed when removing
edje program, but program lookups for removed program should be kept to check
exitence of removed program.
This patch keeps lookups for removed program.

Reviewers: cedric, jpeg

Reviewed By: jpeg

Differential Revision: https://phab.enlightenment.org/D4544
2017-01-04 15:30:21 +09:00
Guilherme Iscaro 194d6b2f9b Evas Canvas: Remove focused_objects property.
Summary:
This property is not needed and it will only increase the API size.
One can simple achieve the same behaviour by simple doing:

//C code...

Eina_List *l;
Evas_Device *dev;

devices = evas_device_list(evas, NULL);

EINA_LIST_FOREACH(devices, l, dev)
{
   Evas_Object *obj;

   if (evas_device_class_get(dev) != EVAS_DEVICE_CLASS_SEAT)
      continue;
   obj = evas_canvas_seat_focus_get(dev);
   //Do something with the focused object.....
}
//More C code...

Reviewers: bdilly, barbieri, conr2d, jpeg

Reviewed By: jpeg

Subscribers: cedric, jpeg

Differential Revision: https://phab.enlightenment.org/D4547
2017-01-04 15:30:21 +09:00
SangHyeon Lee 5284912511 gengrid: adding sizing eval when gengrid min size is changed
Adding sizing eval when gengrid min width and height is changed,
so need to re-evaluate properly.

Signed-off-by: SangHyeon Lee <sh10233.lee@samsung.com>
2017-01-04 14:46:50 +09:00
SangHyeon Lee 7b6cd2862d genlist : fixing wrong item realize bug when block is changed
Summary :
If current realized item is changed to another block which
was unrealized, item still stay in realized states because
new block is unrealized.
so when adding item to new block, adding realized state check
to change block realized state correctly.

Test Plan :
The issue is happen in eflete edc group list view.
when you expand and contract the tree view, if child is
bigger then block size, items under the current tree still
floating on the child items.

Signed-off-by: SangHyeon Lee <sh10233.lee@samsung.com>
2017-01-04 14:32:14 +09:00
SangHyeon Lee 3d13678450 genlist : initialize disabled content for reusing
initialize disabled content for reusing again.

Signed-off-by: SangHyeon Lee <sh10233.lee@samsung.com>
2017-01-04 14:26:22 +09:00
Derek Foreman 44c69195d3 wayland_egl: Stop setting swap interval to 0
We have some "vsync" variable cargo culted from somewhere that is never
properly set, so is always 0 because it's in a calloced structure.

It's then used to set eglSwapInterval() to 0 always, which results
in mesa using wl_display_sync() instead of wl_surface_frame() for
its frame ready callback mechanism.

Remove it entirely and use the sensible default swapinterval.
2017-01-03 17:07:54 -06:00
Derek Foreman 641dfab516 wayland: Fix cursor surface frame calls
The common code was skipping frame callback when no shell surface was
present - cursors aren't shell surfaces.

Add the frame callback to the common path and remove the bespoke callback
from the cursor code.
2017-01-03 16:40:21 -06:00
Derek Foreman 06c05f853a evas_shm: Fix dmabuf failure
This keeps us from accidentally going through the fallback path twice and
crashing.  It also clears up some refcounting problems that would have led
to leaked memory in the crash case.

fix T5037
2017-01-03 14:20:18 -06:00
Gustavo Sverzut Barbieri 5e006baacf ecore_fb: allow ecore_fb to not setup VT.
Some systems won't allow VT to be setup due permissions to KDSETMODE
to KD_GRAPHICS.

Introduce $ECORE_FB_NO_VT envvar to allow skip that setup.
2017-01-03 12:44:54 -02:00
Gustavo Sverzut Barbieri 806be7adc0 ecore_fb_init(): use 'name' parameter similar to ecore_evas_fb_new().
Instead of assuming /dev/fb/0 or /dev/fb0, use the given 'name'
parameter in a similar way to ecore_evas_fb_new(): a number to be
parsed with 'strtoul()'.

Without this calling ecore_evas_fb_new() or ecore_evas_new() with
'display=1' will produce incorrect results.

@fix
2017-01-03 12:44:54 -02:00
Jaeyong Hwang 3f84aac424 evas: Add code to change the object's chage flag in evas_object_image_data_set
Summary:
When using evas_object_image_data_set(obj, data), if you give the value of data to NULL, the image data is free.
However, Since you have not set a flag in the image object to be modified, it will not be processed in the next render loop.
Eventually, the image data is erased, but you see the image before it was erased.
If evas_object_image_data_update_add() is used to solve this problem, the operation of the function is skipped because the values of w and h in image are 0.
So, If data is NULL, I modified it to call evas_object_change() in evas_object_image_data_set().

Test Plan:
Sample code

{F61599}
{F61601}

Reviewers: Hermet, jiin.moon, eunue, jpeg

Reviewed By: jpeg

Subscribers: jpeg, cedric

Differential Revision: https://phab.enlightenment.org/D4520
2017-01-03 17:42:12 +09:00
SangHyeon Lee e1b6e9b18a gengrid : enable layout sizing eval and content min limit feature in gengrid
Summary :
As the child of layout and scroll interface user,
gengrid need to support content min limit feature to set min size
by layout sizing eval.

Test Plan :
Set elm_scroller_content_min_limit to gengrid and get min size off
gengrid object.

Signed-off-by: SangHyeon Lee <sh10233.lee@samsung.com>
2017-01-03 17:35:39 +09:00