My previous patches have broken E Wayland internal windows, as
the compositor wants to create Server-Side Decorations[1] but
based on some mysterious heuristics, E will decide to show or
not SSD. It seems the surface geometry, window geometry,
input region and maybe opaque region need to all match. There
was a pixel difference in the theme which broke everything,
also CSD shadows must be turned off in that case.
This also fixes inputs as for some reason a mismatching input
region vs window geometry would break pointer move/up/down in
those internal windows.
[1] I believe this is not a great idea and E should never draw
any server-side decorations in Wayland. Wayland was supposed
to mean only CSD, no more SSD.
as soon as we report 'can_read' or 'can_write', stop monitoring the
events until the user executes the operation, which will clear these
flags and we resume monitoring.
Summary:
when scroller page is enabled and key is pressed,
scroller will move in page by page.
Test Plan: elementary_test -> scroller
Reviewers: woohyun, cedric, jaehwan, raster, Hermet
Subscribers: akanad, jpeg
Differential Revision: https://phab.enlightenment.org/D4425
If we let the user know he can read or write, stop monitoring
otherwise fd handler will constanly report of data to read/write until
its actually done, which would clear the kernel flag.
Since we use "can_read" and "can_write" for that, toggle the callback
connection that manages the actual Ecore_Fd_Handler monitor.
instead of always delete and recreate it, modify if it already exists
and only delete if it's not needed anymore.
This results in epoll_ctl() to modify an existing handle, instead of
add one.
Each client (Ecore_Ipc_Client) is very similar to the handle
configured by ecore_ipc_server_connect() (the dialer), except we do
not have events such as "connected" and "error", as well as we don't
delete the socket as it's owned by the server, instead we close it.
The UNIX socket is configured similarly to ecore_con, setting the same
masks and mode for directories.
Instead of adding a job to create the socket and call bind(), do it
straight from the serve() method, this allows the caller to set
umask(), permissions and so on.
Document this behavior in the class, since we can't extend the
method's documentation.
Use the new Efl.Net.Dialer classes to implement
ecore_con_server_connect() scenario.
Note that since Windows still doesn't provide any equivalent to
Efl.Net.Dialer.Unix, we keep the legacy code for it.
Using the ecore_ipc_server_example with -m/--single-message, if we
deleted the client from the callback it would find a dead "cl".
As the "cl" handle is removed from svr->clients before it's deleted,
it's safe to check if we have that handle in the list before
proceeding.
The new efl_net code won't compose any path own its own, allowing the
user to connect to non-EFL systems.
However we need a way to use the same path Ecore_Con_Server does, so
we can reach it. Then export and use ecore_con_local_path_new() to do
exactly that.
This method will force a read-write cycle and returns if it's fully
done or not. It may be used to force data to be written before a
handle is deleted (when one can't wait for the data to be written
asynchronously).
E Wayland internal windows are a special beast. Somehow all their
events are intercepted by a special input_obj... but never get
propagated back to the elm_win.
Major side-effect: you get 2 window decorations. I believe there is
some dark magic inside E that tries to figure out when to show
a decoration and this conflicts with CSD.
But hey, it's late so I want to "fix" this and figure out the details
later.
elm_suite would crash when CK_FORK=no is set, because evas was
badly initializing or shutting down. Note that elm_suite still
crashes with CK_FORK=no but valgrind doesn't complain.
Func _eina_file_win32_first_file try to find the first file in directory
but if any file not found the file handler stay open, and func will
return error. But in this case while handle is open impossible to do
any actions. For example call eina_file_ls for empty folder, func will
return error and fold folder open. And if we try to remove this folder
Windows only mark it to delete, and remove it after the process is
complete.
Solution: close handler in error case.
if there is a event the callback counter should be incremented not
decremented. This should fix a few crashes i found in edje, since edje
did not knew that a element was deletion.
For standard windows, we want to create an elm_bg object if
the theme is a legacy one. Otherwise the default theme
doesn't require an extra object, just a rectangle.
This fixes compatibility with legacy themes (ie. every single
theme in existence beyond the default one, for now), by checking
where to swallow the menu widget. If a legacy theme is used,
the legacy swallow should be used, and it will all look correct.
Moving forward I hope to get rid of the internal edje object
entirely, except for compatibility reasons.
This simplifies the cases by adding a border edje on all
windows except fake (damn fake windows). Shadows and borders
are always disabled on such windows (but we could easily change
that in the future).
The idea is to not have resize object in a stack anymore,
but a couple of swallows in the frame and if the stack of
resize objects is wanted, then the user can still explicitely
create it.
This fixes invalid mouse cursor used when windows are
created.
Due to the changes in the border theme and the fact that
a border is now always created, the event region
"elm.resize.bl" contains the point (0,0) when the window
size itself is 1x1. As a consequence every EFL application
would permanently have a cursor like the resize bottom/left
handle.
This fixes that by properly checking whether the pointer is
inside an object based on the ins list, and not just the
object geometry.
@feature
See also: b735386a45
All windows, except for fake, inline & socket images,
should have a frame object to handle all the new APIs and
slots (background, content, indicator, etc...).
The theme will need to handle various modes:
- full CSD
- solid CSD without shadows
- server-side decoration (borderless without shadows)
- borderless with shadows
This means that the default theme must be used for windows,
so that the required edc parts exist. Apart from the standard
background, it is very unlikely that a theme will have changed
anything in win.edc, conformant.edc or border.edc.
This might prove a controversial move, but the alternative would
be to have increasingly complex code handling new themes with
a single edje object and older themes by swallowing tons of
components magically.
Eventually, the win edje object should also not be used anymore.
By default, windows should not have CSD enabled, except on Wayland.
This patch does not handle frame_obj with server-side decorations
yet.
Use Efl.Part for window to manipulate the background.
Two part names are used in EDC:
- elm.rect.background
- elm.swallow.background
For apps the part name is only "background".
To set a solid color background (alpha is ok):
efl_gfx_color_set(efl_part(win, "background"), r, g, b, a);
To set an image:
efl_file_set(efl_part(win, "background"), "image.jpg", NULL);
To set an object:
efl_content_set(efl_part(win, "background"), subobj);
The solid bg is invisible by default, will become visible and use
COPY render mode if a color is set. Standard window uses the
swallow part.
@feature
This is for client-side decorations on Xorg.
Mouse-based move and resize of the window now work fine, but
there are still a few glitches:
1- GL resize is awful (nothing much we can do)
2- Move/resize requests trigger a focus out event,
this in turn changes the style of the window from focussed to
unfocussed. This is thus different from what we see in Wayland
(no focus state change at all) and in usual X11 (focus changes,
but the frame keeps its focussed style).
To counteract this effect, we prevent the frame from changing
style on focus,out if we know we are moving or resizing. But
we don't know that if the compositor moves/resizes (eg. with
Alt key); The focus event happens too early, before the move
or resize events. At least in E.
The flag 'delete_me' is set when there are pending events to be
dispatched. Once these events are freed, they will check if the server
was pending delete and call ecore_ipc_server_del() again, thus we must
not return, otherwise data will be leaked.
Remove Elm_Url and use efl_net_dialer_http with an efl_io_copier to
fetch stuff.
The code was also slightly improved, particularly in elm_photocam
destruction be explicit and clear the grid before deleting... this
will ensure any pending preload are stopped before we remove the
backing memory.
this refactors _evas_render_phase1_object_process() into a bunch of
sub functions with leaner code, some LIKELY/UNLIKELY hints etc. etc.
in the hope that we have better l1 instruction cache use when
executing. this actually measureably helps and drops the overhead of
this func ANd all its sub functions from (in my tests in enlightenment
compositing while a video plays) from about 13.2% of all cpu usage by
e to 10%. that's about a 25% drop in cost for passing through phase 1
of evas render... and thats a good thing.
and it also makes the code nicer and more broken up.
@optimize
we are passing the same things into every phase 1 process func - the
same ptrs to the same arrays of objects... why eat up valuable
registers with this? collect into context struct and just pass a ptr
to that. this also makes the code easier to read and maintain too so
bonus all over. also a tiny win in performance but i'd say its "within
error margins" (go from 11.48% to 11.42% overhead).
this tests rendering of images with border scaling if they are small
(smaller than 256x256) to reduce geometry. part of testing a cpu
reduction effort in gl engine by pre-rendering primitive objects to
buffers.
Summary:
In case of thread creation failure, shutdown logic will be stuck.
To prevent stuck, set exit variables to make thread_shutdown working
even if init fails.
Also modify init logics to return init result to a caller.
Reviewers: jypark, woohyun, cedric, jpeg
Subscribers: cedric
Differential Revision: https://phab.enlightenment.org/D4411
Note (@jpeg):
I have modified the patch just a little bit.
Signed-off-by: Jean-Philippe Andre <jp.andre@samsung.com>
The proper way to use the pixel_get callback and dirty flag
is to also specify which exact region has been updated
with data_update_add.
Unfortunately many apps and even GLView are relying on
invalid behaviour that forced full redraw of the image
even though data_update_add was never called.
This amends c1a080f5e4
There is no dirty flag equivalent in EO as there is no
pixel_get callback defined (yet). One problem is that the GL
API is not defined, and may prove hard to define for bindings...
Summary:
fix warnings while generating documents
- end of file while inside a group (eina_util.h)
- missing title after \defgroup
- ignoring title "Ecore_Con_Lib_Group" that does not match old title
Reviewers: Hermet
Subscribers: cedric, jpeg
Differential Revision: https://phab.enlightenment.org/D4420
Summary:
"cursor,changed" smart callback should be called when only the main cusor's
position is changed. But, It was called when elm_layout_sizing_eval() is called
for elm_entry.
@fix
Test Plan: N/A
Reviewers: raster, cedric, woohyun, herdsman
Subscribers: jpeg
Differential Revision: https://phab.enlightenment.org/D4419
Greatly reduce code complexity while providing better support, at
least according to @netstar efl_net_dialer_http works better than
traditional ecore_con_url on BSD.
The result of this API can only guarantee that the request has been forwared to the server,
In fact, there is no guarantee that the request can be processed by the server.
In order to use this API correctly, avoid the following conditions.
(The following situations will return a failure)
1. Calling a function in the absence of a touch(mouse) down event.
2. Calling the function twice more than once before the touch(mouse) up event.
3. Calling the function when the elm win already resizing or moving the window.
4. Calling the function using a combination of unsupported modes.
Right usage
1. touch(mouse) down event
2. efl_ui_win_move_resize_start only once using the supported mode combination.
3. touch(mouse) up event
If a touch(mouse) up event occurs after calling the function, it automatically ends the window move and resize operation.
Since there are some non-exclusive modes, you can use a combination of modes.(ELM_WIN_MOVE_RESIZE_MOVE is exclusive with others)
However, Some combination of mode is limited for technical reasons.
At present, only the following nine combinations are allowed.
For more information, see the Elm.Win.Move_Resize_Mode.
1. EFL_UI_WIN_MOVE_RESIZE_MOVE
2. EFL_UI_WIN_MOVE_RESIZE_TOP
3. EFL_UI_WIN_MOVE_RESIZE_BOTTOM
4. EFL_UI_WIN_MOVE_RESIZE_LEFT
5. EFL_UI_WIN_MOVE_RESIZE_RIGHT
6. EFL_UI_WIN_MOVE_RESIZE_TOP | EFL_UI_WIN_MOVE_RESIZE_LEFT
7. EFL_UI_WIN_MOVE_RESIZE_TOP | EFL_UI_WIN_MOVE_RESIZE_RIGHT
8. EFL_UI_WIN_MOVE_RESIZE_BOTTOM | EFL_UI_WIN_MOVE_RESIZE_LEFT
9. EFL_UI_WIN_MOVE_RESIZE_BOTTOM | EFL_UI_WIN_MOVE_RESIZE_RIGHT
Summary:
the new iterator represents the order from the elements of the original
iterator, elements where the filter callback return false will be
skipped.
The container of this iterator is the original iterator.
Test Plan: Just run `make check` there is a testcase
Reviewers: cedric, jpeg, raster, herdsman
Differential Revision: https://phab.enlightenment.org/D4417
During the replacement of the image with the new preloaded one,
the previous image is deleted but not removed from the list of
children of the icon (efl_ui_image), leading to Eo errors when
walking over the icon children.
@fix
Since connman is specific to linux, on other platforms just compile a
dummy "none" backend that will always report online and no other
details. This will be used in Windows, MacOS and other platforms that
still lack a proper backend.
The compile-time infrastructure also allows for networkmanager to be
added with ease, simply copy "efl_net*-none.c" or "efl_net*-connman.c"
to be a starting point and then add its specifics, adapting
configure.ac and Makefile_Ecore_Con.am
Compiling on rpi3 indicated that there are some unused variables in
the neon codepaths for several evas op functions. This patch just adds
EINA_UNUSED to the function parameters where needed.
NB: No functional changes
Signed-off-by: Chris Michael <cp.michael@samsung.com>
Compiling on rpi3 using neon indicates that 'alpha' and 'tmp'
variables are unused. Reading through the source confirms it, so
remove them.
Signed-off-by: Chris Michael <cp.michael@samsung.com>
Previously we'd call this only when we absolutely needed to, so it made
sense to always attempt to free a buffer, including ones on scanout or
pending flip.
However, it's useful to have a way to release the "next" only, so we can
do that before starting a render to free up the buffer that's never going
to be scanned out.
The time to live hop limit should not be named loopback and have a type that
can actuall hold the number of hops. It already was always uint8 in the code.
Just fix the eo file.
windows is nasty and defines the value to be set or retrieved as
'char *', which triggers a warning when we use another kind of
pointer.
Partially addresses D4357.
windows is nasty and defines the payload to be sent or received as
'char *', which triggers a warning when we use another kind of
pointer.
Partially addresses D4357.
On Windows SOCKET is unsigned, thus will cause sign errors when
formatting with "%d" or comparing with signed values.
On UNIX it was quiet and easy to miss, thus a new #define can be used
to check for those. It will use 'unsigned long' as SOCKET, thus will
complain out loud and not even work correctly when using pointers on
64bits UNIX on mistakes -- which should improve the situation.
This helped to fix lots of missing conversions, all fixed.
This partially addresses D4357.
Normally when debugging Eo with gdb you can just use any of the internal
eo functions to resolve the id to its internal pointer. However, when
loading a coredump you can't execute any code, not even the id resolve
code.
This change adds a gdb function that resolves the id to its pointer form
without executing any code in the process space. This plugin is
essentially the id resolve code written in python as a gdb function.
Usage:
Print the pointer:
(gdb) print $eo_resolve(obj)
$1 = (_Eo_Object *) 0x5555559bbe70
Use it directly (e.g. to print the class name):
(gdb) $eo_resolve(obj)->klass->desc.name
This plugin requires that the coredump would be loaded with the exact
same libeo.so binary (or at least one that hasn't changed eo internals),
and that the debug symbols for libeo.so would be available for gdb to
use.
Note:
This feature is incomplete and only resolves IDs that are owned by the
main thread and in the main domain. This is not a big issue at the
moment, because almost all of our IDs are like that.
@feature
Summary:
fix over writing file descriptor bug for reading.
when we paste data to entry very fast, source->fd is over wrote by latest fd.
It cause blocking of read function since the read function use invalid fd.
so I make memorizing valid fd and using it in read function.
@fix
Reviewers: Hermet, jpeg, cedric, devilhorns, ManMower, raster
Differential Revision: https://phab.enlightenment.org/D4410
this fixes T4904
dif e pops up menus it uses zoomap to zoom an existing object in and
out by forcing it to be mapped and controlling the map geom based on
smart obj geom. this will do a minimum update region for the case
where a map just got turned on or off for an obj since last frame and
cut this out.
@optimize
Summary:
elm_calendar already have minimum and maximum year set/get APIs.
I've added new APIs that exapanded from the year to the date.
These APIs help us not only set min/max month but also set min/max day.
If you set the minimum date, changing the displayed month or year if needed.
Displayed day also to be disabled if it is smaller than minimum date.
Reviewers: woohyun, Hermet, jpeg, CHAN, cedric
Reviewed By: CHAN, cedric
Subscribers: CHAN, cedric, jpeg
Differential Revision: https://phab.enlightenment.org/D4226
Signed-off-by: Cedric Bail <cedric@osg.samsung.com>
Summary:
This will eliminate unnecessary initialization of local variable in case the type is not EFL_UI_CLOCK_TYPE_YEAR.
Also, ELM_DATETIME_YEAR case is merged with the default case.
Reviewers: singh.amitesh, cedric
Subscribers: minkyu, jpeg
Differential Revision: https://phab.enlightenment.org/D4409
Signed-off-by: Cedric Bail <cedric@osg.samsung.com>
so hunting another callback issue i noticed some of THE most popular
callbacks are:
1411 tick
1961 move
4157 pointer,move
7524 dirty
8090 damage
13052 render,flush,post
13052 render,flush,pre
13205 render,post
13205 render,pre
21706 recalc
21875 idle
27224 resize
27779 del
31011 idle,enter
31011 idle,exit
60461 callback,del
104546 callback,add
126400 animator,tick
as you can see callback del, add and the general obj del cb's are
right up there... so it is very likely a good idea to CHECK to see if
anyone is listening before calling the callback for these very very
very common calls.
this is ifdef'd and turned on for now. it can be turned off. it
shouldnt use more memory due to the way memory alignment works (likely
all allocations will be multiples of 8 bytes anyway) so we're using
spare unused space. the only q is - is management of the counts AND
checking them worth it in general? it's really hard to tell given we
dont have a lot of benchmarks that cover a lot of use cases... it
doesnt seem to slow or speed anything up much in the genlist bounce
test... so i think i need something more specific.
@optimize
i found a massive slowdown that over time ended up with 10000's of
cb's in objects like the ecore loop object. this fixes that by
ACTUALLY flagging event deletions waiting to be true rather than false.
this is how you would possibly use prepare stages for objects like
image objects by pre-rendering them to a buffer. this is not complete
and it's actually disabled right now, but it's to show how it might be
done. some more exploring is needed, but this is to share how it
might/should work.
for gl noscale buffers are texture atlases that are fbo's. the point
is never to scale or transofmr them but to render them pixel for pixel
and just store pre-rendered data where its cheaper to do this than
rebuild every time. this is the enigne infra for sw and gl with the gl
code... it SHOULD work... in theory...
preparing an object is a good idea. especially with gl. you want to do
texture uploads BEFORE using textures all in one batch. otherwise this
may mean the gl implementation has to make a copy of your data in a
tmp location then copy it in later when texture becomes "unused" as it
may be in use at the moment, or it may have to stall and wait.
i have seen somewhere around 7-10% speedups on nvidia and intel
drivers with this on given a very special test case i brewed up (1000
32x32 images where i change 1 pixel every frame). this should have
impact really when we are modifying textures a lot. this is all i've
implemented for now, but this should/would/could do much more like
re-order map, proxy renders to render FIRST in a pre-render list
instead of inline and to pre-render fbo/buffer content for complex
objects like text or textblock etc.
During window deletion, decreasing modality depends on
the window visibility.
Because the visibility was set to false before treating the
modality, it was never decreased, leading to never have still
existing windows being reachable.
Now, we check window visibility before it is modified.
@fix
Moved rects caching into draw context to avoid the use of __thread
slot. Draw context are defined per thread anyway and should be just
fine. This doesn't really change the picture regarding glibc problem
when to many __thread are needed, but slightly improve the global
picture. Also this patch doesn't affect our performance in expedite
benchmark as far as I can tell.
@fix
Summary:
Only eet_connection_empty hasn't checking on NULL and try to read from field of object.
Add NULL-check for connection and return result of empty connection.
Reviewers: jpeg, cedric, myoungwoon
Subscribers: t.naumenko, NikaWhite
Differential Revision: https://phab.enlightenment.org/D4399
Signed-off-by: Cedric BAIL <cedric@osg.samsung.com>
Summary:
Without propagating event by hit_rect, user's mouse up event
callback may not be called if image file is replaced in user's mouse
down event callback.
Test Plan:
1. Register mouse up event callback for elm_image by calling
evas_object_event_callback_add() with EVAS_CALLBACK_MOUSE_UP.
2. Register mouse down event callback for elm_image by calling
evas_object_event_callback_add() with EVAS_CALLBACK_MOUSE_DOWN.
3. Replace image file of elm_image by calling elm_image_file_set() in
mouse down event callback.
4. Mouse down on elm_image.
5. Mouse up on elm_image.
6. Since image file object is newly created in mouse down event
callback, mouse up event is not triggered for the newly created image
file object. As a result, mouse up event is not propagated to elm_image
and user's mouse up callback for elm_image is not called.
Reviewers: cedric, woohyun, eunue, jpeg
Reviewed By: jpeg
Subscribers: jpeg
Differential Revision: https://phab.enlightenment.org/D4401
Signed-off-by: Cedric BAIL <cedric@osg.samsung.com>
Summary:
It's not possible to have an Ecore_Wl2_Input without a seat.
Ecore Evas Wayland: Remove seat existence check.
At this point every seat advertised is considered new, therefore
it will not be in the devices list.
Reviewers: barbieri, jpeg, cedric, bdilly
Reviewed By: bdilly
Subscribers: cedric, jpeg
Differential Revision: https://phab.enlightenment.org/D4408
Summary:
It should avoid issues when device is removed after the ecore
event addition but before listeners are called (so pointer
would be invalid).
Reviewers: iscaro
Reviewed By: iscaro
Subscribers: cedric, jpeg
Differential Revision: https://phab.enlightenment.org/D4407
After a few patches trying to fix clipping of frame or
non-frame objects the icon finally ended up invisible. Even
if the elm_icon was marked as is_frame, its internal evas
object image would not have the flag set, thus it would be
clipped out.
Solution: Propagate the is_frame flag to all smart children,
not only when setting it but also when adding new members.
A hack with the API indicates that the frame edje is a very
special object that does not propagate the flag.
See also:
7ce79be1a10f6c33eff19c9c8809a7ac5ca9281c
Test cases (in WL or X with client-side decorations on):
1. elementary_test -to Animation
Resize the window to a small size (eg, 100x100) and observe the
balls overflowing outside the window content part. This tests
unclipped normal objects.
2. elementary_test "Window Plug" (requires also Window Socket)
Drag the handles outside the window, observe overflow in the
framespace area. This tests mapped images ('can_map').
3. elementary_test -to "Gesture Layer"
Drag a photo around. This tests non-image mapped objects.
NOTE: This test is badly broken!
This patch fixes both of those issues. I'm not sure what I'm
breaking, though.
Summary:
When launching an Elementary App using Wayland the elm_config will
automatically connect to the Wayland's display server and all events
regarding seats are lost, since by the time that Ecore_Evas is created
the global events were already dispatched. To fix this problem,
everytime an Ecore_Evas is created, the code must check if there
are any seat capabilities available, if so, the devices will be created.
Reviewers: bdilly, barbieri, cedric, jpeg
Subscribers: devilhorns, cedric, jpeg
Differential Revision: https://phab.enlightenment.org/D4390
Seems to me there is little benefit of inlining this function, but this
also had a pervert effect on Windows and C++ with some recent mingw
versions. Mingw failed its implementation of pthread_cleanup_pop(). It
does not compile when compiled in C++. There is a type mismatch that is
caught by the compiler, and everything goes nuts...
This made the EFL build fail because some files of ecore_win32 are C++
sources, and they require Eina... so this macro appears in a C++ code
indirectly, because of its inlining.
By removing the inlining, this build issue is fixed. Will also fix
builds of other programs that would have used Eina.h in their C++
programs :)
Small patch to reorganize defines & structures from included files,
and to add copyright information related to each file where defines &
structures were borrowed from.
Signed-off-by: Chris Michael <cp.michael@samsung.com>
As we are not compile-time linking to libdrm anymore, Ecore_Evas_Drm
needs to be able to call drmHandleEvent, so add an API function to
Ecore_Drm2 that can be used there.
@feature
Signed-off-by: Chris Michael <cp.michael@samsung.com>
Instead of linking to libdrm and calling drmMode functions, we will
instead symlink the functions we need during runtime and call those
symlinks.
Signed-off-by: Chris Michael <cp.michael@samsung.com>
As we are moving away from linking to libdrm during compile time, and
instead dlsym to things we need at runtime, we need to include copies
of the libdrm structures that we will be using along with function
declarations that we symlink to.
@feature
Signed-off-by: Chris Michael <cp.michael@samsung.com>
Summary:
Make atspi mixin inherit from Efl.Interface class and add Efl.Object
as it extensions class to gain acccess to destructor function.
This allow to better share code between implementations and avoid possible
mistakes during accessibilityt implementations.
Reviewers: cedric, jpeg, raster, kimcinoo
Subscribers: cedric, jpeg
Differential Revision: https://phab.enlightenment.org/D4393
Signed-off-by: Cedric BAIL <cedric@osg.samsung.com>
Summary:
Before focusing an object, the intercept focus callback
is called. This callback may ask Evas to focus another object
instead, so it's necessary to check if the seat in question still
have a focused object event after a efl_canvas_object_seat_focus_del() call.
Reviewers: cedric, bdilly, barbieri, ProhtMeyhet, netstar
Subscribers: cedric, jpeg
Maniphest Tasks: T4864, T4886
Differential Revision: https://phab.enlightenment.org/D4396
Signed-off-by: Cedric BAIL <cedric@osg.samsung.com>
printf() was not happy with a void* being used with the %s format.
Since the 'key' values are actually strings and let's declare them
as const char* to fully embrace the string semantics.
This splits the current Efl.Part implementation for the edje container
objects. These are now split to a edje_part.c, edje_part_helper.h and
separate sources for swallow, box and table.
It's going to make things a bit easier for porting the rest of the
logic.
this will make a freeq bypass that is enabled by using valgrind or env
var not affect a freeq that has manually changed its queue count max
or mem max. these now become explicit deferred freeers.
this checks for clock_gettime + CLOCK_MONOTONIC or CLOCK_REALTIME at
evlog init to avoid a cmp+brang and l1 instr cache hit every get.
slightly less overhead when this is on.
In the case of an entry inside a draggable gengrid, trying to select
text was always resulting in starting a DnD operation because mouse
coordinates were not checked.
Now we check that the mouse coords don't move more than a finger size.
@fix
Summary:
The accessible name is char*, this could confuse API user.
If we provide user callback to get description, an user would return allocated string.
The usage of elm_interface_atspi_description_get/set should be same with elm_interface_atspi_name_get/set
Reviewers: lukasz.stanislawski, cedric, raster
Reviewed By: raster
Subscribers: stanluk, jpeg
Differential Revision: https://phab.enlightenment.org/D4378
this runs a 1000hz (or as best the kernel will allow) polling system
monitor thread that will logg the cpu frequencies of all cores (linux
only) as well as cpu usage per thread. this leads to much more
information able to be logged from an efl app (any efl app).
@feature
Since this code will be required in many use cases
of the multiseat feature, including examples.
Reviewers: iscaro, barbieri, cedric
Subscribers: jpeg
Differential Revision: https://phab.enlightenment.org/D4385
When many states are set on an item, the icon is deleted when the state
is changed. This shouldn't be as it leads to an unstable state whose
icon is still considered as existing and errors displayed on the screen.
We need to check that the icon is not used inside any state to permit its
deletion. Otherwise we should just hide it.
@fix
There should be no problem that the prev_state is the first state.
The last state should be returned only if there is nothing before the
current state.
@fix
When an object inside a genlist is masked, scrolling would
cause render issues as the mask is not redrawn on move (only
the clip geometry is marked as dirty and recalculated, the
mask pixels are assumed to be well prepared already). As a
result, masked objects in a genlist would not show up
properly once you start scrolling.
This fixes that by hacking into evas a safety test to avoid
unnecessary clipping, and by using parent masks even if they
are not the direct clipper.
Note that no_render is still quite broken (eg. a no_render
mask may cause major issues, even crashes).
This reverts 5917b49f59
These are objects to allow control of networking devices
(efl_net_control) as well as an application to request for
connectivity (efl_net_session).
They are loosely based on ConnMan.org, which we already use in
Enlightenment Window Manager via DBus access with Eldbus. However they
do not map 1:1 as the goal was to expose a viable subset of controls
but in a simple and general way, thus nome strings were converted to
enums, some arrays of strings were converted to bitwise flags, some
names were made more general, such as "service" was turned into
"access point" so it doesn't generate confusion with other "network
services" (ie: http server), or "favorite" that was renamed to
"remembered". Some behavior are slightly different (yet able to be
implemented on top), such as "Service.MoveBefore" and "MoveAfter" were
converted to a numeric "priority", calculated from service's list
index, changing the priority will reoder the list and thus generate
the MoveBefore and MoveAfter DBus commands.
ConnMan was chosen not only because we already use it, but because its
DBus API is sane and simple, with the server doing almost all that we
need. This is visible in the efl_net_session, which is completely done
in the server and do not require any extra work on our side -- aside
from talking DBus and converting to Eo, which is a major work :-D
NOTE: ConnMan doesn't use FreeDesktop.Org DBus interfaces such as
Properties and ObjectManager, thus we cannot use
eldbus_model_object.
There are two examples added:
- efl_net_session_example: monitors the connection available for an
application and try to connect. You need a connman compiled with
session_policy_local and a configuration file explained in
https://github.com/aldebaran/connman/blob/master/doc/session-policy-format.txt
to get a connection if nothing is connected. Otherwise it will just
monitor the connectivity state.
- efl_net_control_example: monitors, plays the agent and configure
the network details. It can enable/disable technologies, connect to
access points (services) and configure them. It's quite extensive
as allows testing all of ConnMan's DBus API except P2P (Peers).
Using the multi-seat support, Evas is able to handle multiple focused objects.
This implementation allows one focused object per seat.
This patch introduces new APIs and events to handle this new scenario,
while keeping compatible with the old focus APIs.
See T4749, 11b7cf6b72 introduced an issue and
e1e28ce320 fixed it but caused a massive
performance impact.
This should fix that. Thanks @zmike for the first patch.
Fixes T4840
Summary:
Ecore Evas VNC: Properly unregister the region push hook callback.
This callback must be unregistered when the VNC server is deleted.
Reviewers: bdilly, barbieri, cedric
Subscribers: cedric, jpeg
Differential Revision: https://phab.enlightenment.org/D4384
Signed-off-by: Cedric BAIL <cedric@osg.samsung.com>
Summary: Add checking on NULL like in other API in module, to avoid segmentation fault
Reviewers: NikaWhite, cedric
Reviewed By: cedric
Subscribers: myoungwoon, jpeg
Differential Revision: https://phab.enlightenment.org/D4383
Signed-off-by: Cedric BAIL <cedric@osg.samsung.com>
Summary:
the canvas image is the only one presenting the load api, in all other
implementations you would only see error messages.
Reviewers: jpeg
Subscribers: cedric, raster
Differential Revision: https://phab.enlightenment.org/D4380
Signed-off-by: Cedric BAIL <cedric@osg.samsung.com>
so i have been doing some profiling on my rpi3 ... and it seems
memcmp() is like the number one top used function - especially running
e in wayland compositor mode. it uses accoring to perf top about 9-15%
of samples (samples are not adding up to 100%). no - i cant seem to
get a call graph because all that happens is the whole kernel locks up
solid if i try, so i can only get the leaf node call stats. what
function was currently active at the sample time. memcmp is the
biggest by far. 2-3 times anything else.
13.47% libarmmem.so [.] memcmp
6.43% libevas.so.1.18.99 [.] _evas_render_phase1_object_pro
4.74% libevas.so.1.18.99 [.] evas_render_updates_internal.c
2.84% libeo.so.1.18.99 [.] _eo_obj_pointer_get
2.49% libevas.so.1.18.99 [.] evas_render_updates_internal_l
2.03% libpthread-2.24.so [.] pthread_getspecific
1.61% libeo.so.1.18.99 [.] efl_data_scope_get
1.60% libevas.so.1.18.99 [.] _evas_event_object_list_raw_in
1.54% libevas.so.1.18.99 [.] evas_object_smart_changed_get
1.32% libgcc_s.so.1 [.] __udivsi3
1.21% libevas.so.1.18.99 [.] evas_object_is_active
1.14% libc-2.24.so [.] malloc
0.96% libevas.so.1.18.99 [.] evas_render_mapped
0.85% libeo.so.1.18.99 [.] efl_isa
yeah. it's perf. it's sampling so not 100% accurate, but close to
"good enough" for the bigger stuff. so interestingly memcmp() is
actually in a special library/module (libarmmem.so) and is a REAL
function call. so doing memcmp's for small bits of memory ESPECIALLY
when we know their size in advance is not great. i am not sure our own
use of memcmp() is the actual culprit because even with this patch
memcmp still is right up there. we use it for stringshare which is
harder to remove as stringshare has variable sized memory blobs to
compare.
but the point remains - memcmp() is an ACTUAL function call. even on
x86 (i checked the assembly). and replacing it with a static inline
custom comparer is better. in fact i did that and benchmarked it as a
sample case for eina_tiler which has 4 ints (16 bytes) to compare
every time. i also compiled to assembly on x86 to inspect and make sure
things made sense.
the text color compare was just comparing 4 bytes as a color (an int
worth) which was silly to use memcmp on as it could just cast to an
int and do a == b. the map was a little more evil as it was 2 ptrs
plus 2 bitfields, but the way bitfields work means i can assume the
last byte is both bitfields combined. i can be a little more evil for
the rect tests as 4 ints compared is the same as comparing 2 long
longs (64bit types). yes. don't get pedantic. all platforms efl works
on work this way and this is a base assumption in efl and it's true
everywhere worth talking about.
yes - i tried __int128 too. it was not faster on x86 anyway and can't
compile on armv7. in my speed tests on x86-64, comparing 2 rects by
casting to a struct of 2 long long's and comparing just those is 70%
faster than comapring 4 ints. and the 2 long longs is 360% faster than
a memcmp. on arm (my rpi3) the long long is 12% faster than the 4 ints,
and it is 226% faster than a memcmp().
it'd be best if we didnt even have to compare at all, but with these
algorithms we do, so doing it faster is better.
we probably should nuke all the memcmp's we have that are not of large
bits of memory or variable sized bits of memory.
i set breakpoints for memcmp and found at least a chunk in efl. but
also it seems the vc4 driver was also doing it too. i have no idea how
much memory it was doing this to and it may ultimately be the biggest
culprit here, BUT we may as well reduce our overhead since i've found
this anyway. less "false positives" when hunting problems.
why am i doing this? i'm setting framerate hiccups. eg like we drop 3,
5 or 10 frames, then drop another bunch, then go back to smooth, then
this hiccup again. finding out WHAT is causing that hiccup is hard. i
can only SEE the hiccups on my rpi3 - not on x86. i am not so sure
it's cpufreq bouncing about as i've locked cpu to 600mhz and it still
happens. it's something else. maybe something we are polling? maybe
it's something in our drm/kms backend? maybe its in the vc4 drivers or
kernel parts? i have no idea. trying to hunt this is hard, but this is
important as this is something that possibly is affecting everyone but
other hw is fast enough to hide it...
in the meantime find and optimize what i find along the way.
@optimize
this adds eina_freeq api's for c land for deferring freeing of
pointers and can be used a s a simple copy & paste drop-in for free()
just to "do this later". the pointer will eveentually be freed as
eina_shutdown will free the main free queue and this will in turn free
everything in it. as long as the main lo0op keeps pumping things will
og on the queue and then be freed from it. free queues have limits so
if they get full they will clear out old pointers and free them so it
won't grow without bound. the default max is 1mb of data or 16384
items whichever limit is hit first and at that point the oldest item
will be freed to make room for the newest. the mainloop whenever it
finishes idle enterers will add an idler to spin and free while idle.
the sizes can be tuned and aruged about as to what defaults should be.
this also allows for better memory debugging too by being able to fill
freed memory with patterns if its small enough etc. etc.
@feature
remove setters that do not make sense, they are set in the constructor
functions and cannot be changed.
define the Eldbus_Connection_Type in .eo, properly type functions
using it.
Transit zoom effect didn't care image fill area in case of manual filling.
This additional logic computes map uvs with regards to the current image fill area.
@fix
Evil implementation of pipe() function uses sockets. Windows functions
"write", "read" and "close" doesn't works with sockets. In this commit
added macros, that replace "read" with "recv", "write" with "send" and
"close" with "closesocket".
@fix
post event callbacks must return 0 to stop processing when an event is
consumed, and 1 when processing should continue. this is the only place in
all of efl which used this functionality, and it did so incorrectly.
@fix
ref 248b6beeee
ref D2393
so bu5hman pointed out a compile warning from clang that
{ 0x20000, 42711, EVAS_SCRIPT_HAN },
has 42711 exceeding a signed short. true. so this should be an
unsigned short. but this drew me to the fact the whole array could be
shorter by packing this short with the style memeber after it making
them pack into a nicely aligned 4 byte chunk next to the start unicode
value before it, thus chopping 1324 bytes off this table. even worse
the 8192 entry fast table above is using a full 32bits per entry where
they data they store is not even exceeding 7bits, so move this to an
unsigned char saving another 24k. this should reduce cache misses and
memory footprint and binary footprint of the evas .so files etc.
@fix + @optimize
as per mailing list discussion about dropping xcb support now. it
hasn't been complete for a long time, thus not recommented for being
turned on. as we are moving to a wayland world xcbmakes even less
sense. as agreed, time to clean up a bit and remove a distraction as
well as not well tested code. this also updates po's too.
@feature
Clang 3.9.0 told me:
warning: passing an object that undergoes default argument
promotion to 'va_start' has undefined behavior [-Wvarargs]
So I told it to shut up and changed Eina_Bool to int.
Note that edje_edit_state_external_param_set has the same issue.
I'm trying to fix a crash that seems to happens in some very odd
circumstances under stress testing. I have absolutely no idea
what is going wrong... So let's just add some extra safety.
This fixes a a crash on NULL and ensures the EAPI call is
done on an elm_image. Just checking NULL is not good enough
as _efl_ui_image_sizing_eval() doesn't check the type first.
draw_frame is a legacy feature that draws a very ugly window border
with a white rect and a black text as title bar. This could be
used in wayland when using only the ecore_evas APIs, rather than
elm_win.
Note that the API ecore_evas_draw_frame_set() can not possibly work
as the flag is checked when the ecore_evas is created, so changing
the flag has no effect on existing windows.
Summary:
Datetime widget is module based, so datetime widget is used as base for efl_ui_clock and merged dayselector/clock features into efl_ui_clock.
Added day selection and seconds support in efl_ui_clock.
Added clock features like auto updation of time, stop timer etc in efl_ui_clock.
Added API to enable/disable edit_mode. efl_ui_clock can be configurable to display either only day/date/time or display any two of them or display all three.
Added efl_ui_clock.c and test_ui_clock.c. Theme and Module is added in another patch by Amitesh.
Original author is Yeshwanth <r.yeshwanth@samsung.com>. I have polished this patch a bit and make it compatible with current EFL code.
Test Plan: test_ui_clock
Reviewers: bu5hm4n, tasn, yashu21985, jpeg, cedric, raster
Subscribers: CHAN, woohyun
Differential Revision: https://phab.enlightenment.org/D3938
If a NULL surface gets passed into ecore_wl2_window_pointer_set that
would mean we are unsetting the cursor surface, so we should still be
calling wl_pointer_set_cursor even with a NULL surface.
Signed-off-by: Chris Michael <cp.michael@samsung.com>
This patch adds an API that can be used to set a pointer acceleration
profile. This API should be used when addressing T4736
ref T4736
@feature
Signed-off-by: Chris Michael <cp.michael@samsung.com>
not the ideal solution, but we need a decision if we're going to copy
the long code from OpenSSL into our library just to support legacy
users, given that Efl.Net targeted at the future.
Summary:
The style user should be kept when entry's mode is changed.
@fix
Test Plan:
1. Run "elementary_test -to "entry style user"
2. Click "Singleline Mode" toggle
3. See the result
Reviewers: raster, tasn, herdsman, cedric
Reviewed By: cedric
Subscribers: jpeg
Differential Revision: https://phab.enlightenment.org/D4366
Signed-off-by: Cedric BAIL <cedric@osg.samsung.com>
Summary:
It was kind of bug state before.
There was no any action when the user gives a focus on an item. then press the enter key.
The item should be set as selected state after that should call clicked signal.
@fix
Test Plan: elementary test MBE sample.
Reviewers: woohyun, bu5hm4n, Hermet
Subscribers: cedric, jpeg
Differential Revision: https://phab.enlightenment.org/D4368
Signed-off-by: Cedric BAIL <cedric@osg.samsung.com>
So when mouse / keyboard are present or not it will
generate events.
ecore_evas/wayland will handle that creating or
deleting evas devices for each one (seat device
will be used as parent).