Commit Graph

349 Commits

Author SHA1 Message Date
Elyes HAOUAS 1fd0435f21 Get rid of trailing whitespaces (4 / 14)
Remove trailing whitespaces
Differential Revision: https://phab.enlightenment.org/D12002
2020-06-23 10:29:14 +02:00
Vincent Torri 3c619b96fc remove arguments of LOGFN in ecre_x and ecore_wayland as the are always the same
Reviewers: raster

Subscribers: cedric, #reviewers, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D11769
2020-05-04 15:15:07 +01:00
Xavi Artigas e7f4bc4c2a doxygen docs: Fix all invalid @param names
There were quite a few of these...
2020-04-20 12:24:41 +02:00
Xavi Artigas 5b2d2a85b2 doxygen docs: Fix tons of invalid Doxygen commands
Mostly typos
2020-03-10 21:36:34 +01:00
Xavi Artigas 5c2dfd80a6 doxygen docs: Adapt to Doxygen syntax
I don't know where did these comments come from, but it was not Doxygen.
2020-03-10 21:36:34 +01:00
Wonki Kim 34477e1cbe ecore_wl: removes unreachable statements
Summary: this patch removes unreachable statements

Reviewers: Hermet

Reviewed By: Hermet

Subscribers: cedric, #reviewers, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D11437
2020-03-02 18:26:39 +09:00
Marcel Hollerbach 46d464e5bf here comes meson
a new shiny buildtool that currently completes in the total of ~ 4 min..
1 min. conf time
2:30 min. build time
Where autotools takes:
1:50 min. conf time
3:40 min. build time.

meson was taken because it went quite good for enlightenment, and is a traction gaining system that is also used by other mayor projects. Additionally, the DSL that is defined my meson makes the configuration of the builds a lot easier to read.

Further informations can be gathered from the README.meson

Right now, bindings & windows support are missing.

It is highly recommented to use meson 0.48 due to optimizations in meson
that reduced the time the meson call would need.

Co-authored-by: Mike Blumenkrantz <zmike@samsung.com>

Differential Revision: https://phab.enlightenment.org/D7012
Depends on D7011
2018-10-02 17:22:50 +02:00
JongMin Lee b1caf014ef ecore_wl_dnd: correct wrong variable assignment
@fix
2018-04-20 15:29:44 +09:00
Bowon Ryu 72c263d5f2 ecore_wayland: remove logically dead code.
Summary:
remove logically dead code.
execution cannot reach this statement.

Reviewers: cedric

Differential Revision: https://phab.enlightenment.org/D5876

Reviewed-by: Cedric Bail <cedric@osg.samsung.com>
2018-04-06 10:10:44 -07:00
Shinwoo Kim 3cd2243028 Fix static analysis result
[Dereference after null check]

(1) src/lib/ecore/ecore_main.c
 - _efl_loop_handler_efl_object_finalize checks if pd->loop_data is NULL.
   After that, _handler_reset > _handler_clear > _ecore_main_fd_handler_del >
   _ecore_main_fdh_pool_del is directly dereferencing pd->pool_data.
 - _efl_loop_handler_efl_object_parent_set checks if pd->loop_data as well.
   Then it calls _handler_reset as well.

(2) src/lib/ecore_wayland/ecore_wl_dnd.c
  - ecore_wl_dnd_selection_set checks if t - result of wl_array_add - is NULL.
    And it is dereferecing t directly for wl_data_source_offer.

(3) src/lib/elementary/efl_ui_dnd.c
 - Third parameter const char *data could be NULL.
   In this case strlen dereferences NULL. The data should be non NULL value.
   I have checked this with Mr. Thiep Ha.

(4) src/lib/evas/canvas/evas_object_inform.c
 - _efl_canvas_object_efl_gfx_stack_stack_below checks if obj->layer is NULL.
   So it could call evas_object_inform_call_call_restack which is dereferencing
   obj->layer directly.
2018-04-05 19:40:57 +09:00
Jean-Philippe Andre ff24ac2d6d efl: Reset ecore event types on init
This fixes cycles of init/shutdown/init where ecore event types would
become invalid, since they are now stored in a dynamic array rather than
a statically stored array.

The risk here is that if a module of EFL tends to init/shutdown in a
"normal" scenario then the event type array will grow in a leaking
manner. This could be fixed by resetting those event ID's only when the
loop actually exits (EFL_EVENT_DEL on the main loop). I'm not using
EFL_EVENT_DEL in this patch as this would add too many event callbacks
to the main loop object, which may result in slightly slower event calls
to it, affecting the overall performance.
2017-12-19 11:14:37 +09:00
Subodh Kumar 71f0daa9d1 ecore_wayland: fix assigned value is never used.
Summary:
Fix assigned value is never used.

@fix

Reviewers: cedric

Subscribers: shilpasingh, jpeg

Differential Revision: https://phab.enlightenment.org/D5283

Signed-off-by: Cedric BAIL <cedric@osg.samsung.com>
2017-10-16 13:28:10 -07:00
Cedric BAIL 88889f5369 ecore_wayland: avoid crash during shutdown due to Ecore_Event queue. 2017-03-09 16:17:58 -08:00
Myoungwoon Roy, Kim 5d389a1df6 doxygen: fix typos and some wrong expressions in API reference.
Summary: I had fixed some typos and some wrong expressions, such as capital letters, singular, and orders of groups in API reference doxygen.

Test Plan: Doxygen revision

Reviewers: stefan, cedric, raster, Jaehyun_Cho, jpeg

Subscribers: conr2d

Differential Revision: https://phab.enlightenment.org/D4658

Signed-off-by: Cedric BAIL <cedric@osg.samsung.com>
2017-02-15 16:30:22 -08:00
Taehyub Kim 3a98ee3796 ecore_wayland: fix over writing file descriptor bug for reading
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
2016-11-18 19:53:15 +09:00
JengHyun Kang 71fab49325 ecore-wayland: Prevent duplicated mouse up events.
Summary:
Prevent duplicated mouse up events generated from input_ungrab.
         If you touch downs and ups about all of fingers,
         that is sufficient condition to call ecore_wl_input_ungrab().
         And then one mouse up event is generated from that function.
         So if you set a callback about ECORE_EVENT_MOUSE_BUTTON_UP,
         you can watch two mouse up events are occurred.

Test Plan: Touch and release. And watch mouse up events.

Reviewers: raster, zmike, devilhorns

Reviewed By: devilhorns

Subscribers: ohduna, input.hacker, cedric, jpeg

Differential Revision: https://phab.enlightenment.org/D4112
2016-06-28 09:01:09 -04:00
Chris Michael 89b955db51 ecore-wayland: Deprecate Ecore_Wayland library
This patch deprecates the Ecore_Wayland library with a warning to not
use it. This (imo) is a better method of deprecation rather than
adding EINA_DEPRECATED to every function.

Signed-off-by: Chris Michael <cpmichael@osg.samsung.com>
2016-05-03 08:35:48 -04:00
Mike Blumenkrantz ad9ae67e46 ecore-wl(2): add copyright headers (MIT) from weston
these files were created containing code which was very obviously copied from
weston. when copying code, copyright headers must also be copied in order to
comply with licenses.
2016-04-20 08:47:01 -04:00
Duna Oh fbe4e4b6ad Ecore: Use calloc() to initialize Ecore_Event_Mouse_XXXX
Summary:
To ensure initialize all fields of Ecore_Event_Mouse_XXX,
use calloc() instead of malloc().

Test Plan: N/A

Reviewers: gwanglim, cedric, raster, devilhorns, ManMower, zmike

Subscribers: jpeg, input.hacker, JHyun

Differential Revision: https://phab.enlightenment.org/D3906
2016-04-20 08:33:20 -04:00
JengHyun Kang 1a27f1274e ecore_wayland: Add a new API to get keymap - ecore_wl_input_keymap_get()
Summary:
Each Ecore_Wl_Input structure has there own keymap.
         This keymap is struct xkb_keymap used in libxkbcommon lib and
         the client can get this keymap from server in wayland system.
         So if the client want to get keymap and use some libxkbcommon APIs,
         use this API to get keymap.

Test Plan: Use this api after initialize wayland system.

Reviewers: raster, zmike, ManMower, devilhorns

Reviewed By: devilhorns

Subscribers: input.hacker, ohduna, cedric, jpeg

Differential Revision: https://phab.enlightenment.org/D3819
2016-03-24 08:53:15 -04:00
Duna Oh 01dc2540db ecore_wayland: move check for pointer capability
Summary:
We don't need to work for cursor if system doesn't have pointer devices.
Since this function is called by elementary(e.g. entry) also, we move a check condition into the function.

@fix

Reviewers: raster, zmike, devilhorns, ManMower, gwanglim

Subscribers: cedric, JHyun, input.hacker, jpeg

Differential Revision: https://phab.enlightenment.org/D3566
2016-01-14 11:19:24 -05:00
Duna Oh 49ef37457a ecore_wayland: send mouse_move when sets touch_focus window in cb_touch_down
Summary:
When user touches the screen, ecore_drm generates MOUSE_MOVE event before MOUSE_BUTTON_DOWN.
But when ecore_wayland gets touch_motion before touch_down, touch_focus window is NULL and sending MOUSE_MOVE event fails.
Also in terms of 'touch' input, touch_focus needs be set in cb_touch_down, not in cb_pointer_enter.
So this commit makes sure that ecore_wayland generates MOUSE_MOVE when touch_focus is set.

@fix

Test Plan:
when the application is launched for first time, user clicks on any area of the screen.
We can see the posion of touch event wrong.

Reviewers: raster, zmike, devilhorns, gwanglim, ManMower

Reviewed By: ManMower

Subscribers: jpeg, JHyun, cedric, input.hacker

Differential Revision: https://phab.enlightenment.org/D3555
2016-01-13 10:10:35 -05:00
Duna Oh 999dd527d8 ecore_wayland: set touch_focus window when gets pointer_enter
Summary:
When user touches the screen, ecore_wayland gets touch_motion event before touch_down event.
But touch_focus would be NULL in cb_touch_motion, so doesn't send ECORE_EVENT_MOUSE_MOVE event to client.
This fix set touch_focus when gets pointer_enter same as pointer_focus.

Test Plan:
when the application is launched for first time, user clicks on any area of the screen.
We can see the posion of touch event wrong.

@fix

Reviewers: devilhorns, raster, ManMower, zmike

Subscribers: input.hacker, cedric, jpeg, JHyun

Differential Revision: https://phab.enlightenment.org/D3545
2016-01-07 08:49:46 -05:00
Stefan Schmidt 337939ef14 ecore_wayland: rename session recovery to align namespace
Align out extension naming with other unstable wayland protocols.
The unstable protocols from the wayland-protocols repo are prefixed
with a zwp additionally we keep a e prefix for now as we are still
developing this here. No functional change, just rename.

Pointed out by Derek that the session-recovery interface name is a
bit to generic here.
2015-12-18 14:51:04 +01:00
Stefan Schmidt 680eec5c5c ecore_wayland: add listener for uuid and provide already existing one
Setup a listener to receive an uid from the compositor. If we already have
one during creation, aka we are re-connecting to recover a session, we provide
it to the compositor so it can look our attributes up based on it. Again hidden
behind and env var to avoid problems with other developments, for now.

ref T2922
2015-12-16 22:18:08 +01:00
Stefan Schmidt d4d3f63653 ecore_wayland: store uuid received from compositor
If we get an uuid assigned from the compositor we will store them locally to
provide it later on if needed.

ref T2922
2015-12-16 22:18:08 +01:00
Stefan Schmidt 900fd5446f ecore_wayland: create session recovery listener only if env var is set
Same as for the global we make sure here we only add the listener if the,
for now, needed env var is set.

ref T2922
2015-12-16 22:18:08 +01:00
Stefan Schmidt 598f46f25e ecore_wayland: only bind session recovery interface when env var is set
To avoid trouble for other wayland testing we hide the session recovery work
behind EFL_WAYLAND_SESSION_RECOVERY. Without this env var being set we do not
bind the global.

ref T2922
2015-12-16 22:18:08 +01:00
Stefan Schmidt 56cc11c3b1 ecore_wayland: remove disabled code for session recovery listener
The listener is handled inside ecore_wl_window. Remove the dead code from here.
2015-12-16 22:18:08 +01:00
Chris Michael d29acc3613 ecore-wl: Remove setting window animator in server mode
Signed-off-by: Chris Michael <cp.michael@samsung.com>
2015-12-03 12:02:40 -05:00
Chris Michael 0a4660c77d ecore-wl: Make "server mode" a global
Signed-off-by: Chris Michael <cp.michael@samsung.com>
2015-12-03 12:02:40 -05:00
Chris Michael 518531ea00 ecore-wayland: Add support for using timer based animators if in
server mode

Summary: For E internal windows, we cannot use custom animator sources
due to Other animators using a timer-based solution. For this case,
when running in "server mode" for internal windows we will default to
a timer based animator solution.

Signed-off-by: Chris Michael <cp.michael@samsung.com>
2015-12-03 12:02:40 -05:00
Chris Michael 2ebef8010e ecore-wayland: Reduce overhead for maximize/fullscreen set functions
This patch just gets the state flags directly from the window rather
than calling "get" functions to return the same parameter.

@fix

Signed-off-by: Chris Michael <cp.michael@samsung.com>
2015-11-18 12:56:12 -05:00
Chris Michael 4534c4aec3 ecore-wayland: Fix iconified functions for consistency
* sanitize bool params
* enforce window state flag setting
* correctly detect window state using window flag

@fix

Signed-off-by: Chris Michael <cp.michael@samsung.com>
2015-11-18 12:54:00 -05:00
Chris Michael 35b4794c4a ecore-wayland: Add EINA_SAFETY checks to window functions
This adds EINA_SAFETY returns for all public facing ecore_wl_window
functions.

@fix

Signed-off-by: Chris Michael <cp.michael@samsung.com>
2015-11-18 12:19:17 -05:00
Mike Blumenkrantz ab3ab4feaa ecore-wayland: rewrite maximize/fullscreen set functions for consistency
* use safety macros for win struct param (should be the case for all fns here)
* sanitize bool params
* enforce window state flag setting
* correctly detect window state using window flag instead of type

@fix

ref T2841
2015-11-17 18:24:09 -05:00
Mike Blumenkrantz 3b480804fc ecore-wayland: return only the relevant state value for maximize/fullscreen
having window types for fullscreen/maximize is not defined by spec and leads
to state mismatches when toggling from api vs receiving events from the compositor

@fix
2015-11-17 18:23:07 -05:00
Chris Michael eacd4cc6f6 ecore-wayland: Make ecore_wl_window_maximized_get return proper values
This brings ecore_wl_window_maximized_get more inline with
ecore_wl_fullscreen_get function in that it will now check either the
window maximized state, or the window type, to determine if a window
is actually maximized

@fix

Signed-off-by: Chris Michael <cp.michael@samsung.com>
2015-11-17 15:57:45 -05:00
Stefan Schmidt 6fa8452d48 ecore_wayland: fix build for ivi-shell.
During a rework this bit got missed and made the build fail if ivi-shell was
enabled. Thanks a lot to aerodynamik for bringing this to our attention and
even pointed out the fix.

Fixes T2798
2015-10-26 09:04:22 +01:00
Mike Blumenkrantz fe10889ec7 ecore-wayland: plug some trivial leaks 2015-10-20 17:51:44 -04:00
Mike Blumenkrantz 89245476c0 ecore-wayland: only do deferred shell surface creation when a surface exists 2015-10-19 16:20:45 -04:00
Mike Blumenkrantz 265ad8b5d0 ecore-wayland: defer shell surface creation for windows if shell is not bound
in the case where a surface is created before the compositor binds its shell(s),
a shell surface would never be created

fixes case where internal windows would not create frames in enlightenment

@fix
2015-10-19 16:15:46 -04:00
Mike Blumenkrantz 5ad3c6358f Revert "ecore-wayland: Redo window animators to not use Custom source animators"
This reverts commit bd83d4c03a.

adding an animator (and then not managing its ticks) causes the animator
to fire constantly. in this case, it was causing 100% cpu usage and forcing a
compositor re-render for every frame regardless of damages
2015-10-16 15:55:40 -04:00
Chris Michael bd83d4c03a ecore-wayland: Redo window animators to not use Custom source animators
Summary: This moves window animators (for frame callbacks) to not use
a custom animator source but rather use a timer-based source. This
also moves animators to be per-window based (in that an animator is
created per-window).

@fix

Signed-off-by: Chris Michael <cp.michael@samsung.com>
2015-10-14 14:54:54 -04:00
Chris Michael 2f2bfec810 ecore-wl: Add missing EINA_UNUSED for unused function paramaters
Signed-off-by: Chris Michael <cp.michael@samsung.com>
2015-10-13 15:14:12 -04:00
Chris Michael 6263fcc716 ecore-wl: Don't update window size during ecore_wl_window_resize
function

Summary: As we call ecore_wl_window_update_size from various places
when needed, don't call it inside the resize function. This addresses
an issue where sizes for the Ecore_Wl_Window may be out of sync

@fix

Signed-off-by: Chris Michael <cp.michael@samsung.com>
2015-10-12 10:55:50 -04:00
Chris Michael 2a2a7e54b9 ecore-wayland: Comment out unused functions
Summary: As we do not listen for surface enter/leave events, we do not
need these functions so comment them out.

Thanks to Tom for the report :)

@fix

Signed-off-by: Chris Michael <cp.michael@samsung.com>
2015-10-09 08:55:26 -04:00
Chris Michael ff9703efc3 ecore-wayland: Comment out unused functions for session listener
Summary: As session listener is currently disabled in Ecore_Wayland,
we don't need these functions defined so comment them out.

Thanks to Tom for the report :)

@fix

Signed-off-by: Chris Michael <cp.michael@samsung.com>
2015-10-09 08:54:41 -04:00
Chris Michael 571c67c6a5 ecore-wayland: Don't use custom animator when in server mode
Signed-off-by: Chris Michael <cp.michael@samsung.com>

Reviewed-by: @zmike

necessary to avoid breaking the compositor canvas animator
2015-10-05 16:47:32 -04:00
Boram Park 3ebdfd8779 ecore_wl: abort if wl_display_dispatch returns negative value
Summary:
If the connection between server and client has problems, wl_display_dispatch
an return negative value. i.e. when enlightenment has been killed accidently.
In this case, app can enter into infinite loop.

Signed-off-by: Boram Park <boram1288.park@samsung.com>

Reviewers: stefan_schmidt, zmike, gwanglim, raster, devilhorns

Subscribers: cedric

Differential Revision: https://phab.enlightenment.org/D3077
2015-09-23 09:22:29 -04:00