Commit Graph

711 Commits

Author SHA1 Message Date
Christopher Michael 49e8334024 ecore_wl2: Move ecore_wl2_buffer_fit function to be internal
The ecore_wl2_buffer_fit function is only used internally in EFL so
move it out of the public API header.

ref T8013
2019-08-06 08:51:05 -04:00
Christopher Michael 43a49007f7 ecore_wl2: Move ecore_wl2_window_false_commit to be internal
The ecore_wl2_window_false_commit function is only used internally
inside efl so there is no need for it to be a public API.

ref T8013
2019-08-06 08:49:38 -04:00
Christopher Michael b273bf7f9a ecore_wl2: Move ecore_wl2_window_rotation_change functions to be
internal

These functions are not used in efl wayland clients nor are they used
in Enlightenment. As such, there is no reason that they need to be
public API so this commit moves them to be Internal and updates
Ecore_Evas engine code to include the internal header.

ref T8013
2019-08-06 08:40:41 -04:00
Woochanlee 740b91c9de ecore_wl2: Changed log macro ERR->EINA_LOG_ERR.
Summary:
When the ecore_wl2_shutdown() calling without ecore_wl2_init().

It makes crash.

Reviewers: eagleeye, devilhorns

Reviewed By: devilhorns

Subscribers: cedric, #reviewers, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D9452
2019-07-31 07:34:56 -04:00
Carsten Haitzler de5eea226a ecore wl2 - fall back to shm if dmabuf fails in buf init
so even if shm was an allowed mode/flag, we never fell back to shm if
dmabufs were not possible (/dev/dri/renderD128  didn't exist or wansn't
open-able). that's decidedly a bad thing to do.

@fix
2019-07-22 00:36:07 +01:00
Christopher Michael e962e6be4f ecore-wl2: Add missing doxygen for ecore_wl2_window_resizing_get
function

ref T8014
2019-06-26 10:00:59 -04:00
Christopher Michael 9247b5aac3 ecore-wl2: Add missing @since for ecore_wl2_offer_mimes_get function
ref T8014
2019-06-26 10:00:59 -04:00
Christopher Michael ecbb9ca46e ecore-wl2: Add TODO notes for missing doxygen
I have marked these as TODO (for doxygen) because we still need to
determine if we are keeping these functions in the public API

ref T8014
2019-06-11 09:49:11 -04:00
Christopher Michael 3b23496c1c ecore-wl2: Add doxygen for ecore_wl2_input_seat_get
ref T8014
2019-06-11 09:49:00 -04:00
Christopher Michael 39bc89256a ecore-wl2: Add missing doxygen for ecore_wl2_window_display_get
ref T8014
2019-06-11 09:48:48 -04:00
Wonki Kim b376391078 wl2_input: fix a problem that occurs in case of using both pointer/touch input devices
Summary:
if wl2_input logic gets a 'touch down' event from touch device,
input->focus.touch has set and it cause the logic handles every input as touch input
from that moment at _ecore_wl2_input_mouse_move_send function.
that is the reason why the patch(410c1f9587) has written for.

however, if there are multiple touch input devices,
clearing focus.touch variable without checking any conditions causes another problem.

I mean a case such as 'touch 1 down' -> 'touch 2 down' -> 'touch 1 up' -> 'touch 2 up'
at the moment 'touch 1 up' event executed, focus.touch would be cleared,
and 'touch 2 up' and following touch events will not be executed properly at the moment.

this patch counts a number of touch devices which are grabbing to clear focus.touch at proper time.

Reviewers: devilhorns

Reviewed By: devilhorns

Subscribers: cedric, #reviewers, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D8787
2019-04-30 11:27:25 -04:00
Christopher Michael e053c6e458 ecore-wl2: Minor formatting fixes
NB: No functional changes
2019-04-29 09:59:17 -04:00
Christopher Michael 049521557a ecore-wl2: Minor formatting fixes
NB: No functional changes
2019-04-29 09:58:05 -04:00
Wonki Kim 410c1f9587 ecore_wl2_input: fix a way it works when it has multiple input devices
Summary:
if there are multiple input devices, especially touch and mouse type devices simultaneous.
a logic can't recognize the current input device in _ecore_wl2_input_mouse_move_send function.
because focus.touch would not be cleared even touch actions from user has finished.

This patch clears input->focus.touch if users release their finger from touch device.

Reviewers: raster, eagleeye, devilhorns

Reviewed By: devilhorns

Subscribers: cedric, #reviewers, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D8673
2019-04-22 07:06:58 -04:00
Xavi Artigas 68c530080b docs: Fix common misspellings in H files
Fixed all appearances of words from this list in H files:
https://en.wikipedia.org/wiki/Wikipedia:Lists_of_common_misspellings/For_machines
2019-04-02 13:28:48 +02:00
Carsten Haitzler c695dde8c3 ecore wl2 - remove pointless sntrcpys causing warnings
again pointless:

strcpy(dest, x); -> len - strlen(x); strncpy(dest, x, len);

code put in causing new warnings. this kind of "get rid of strcpy" is
actua;;y dangerous as it's more likely a mistake is made along the way
and bugs are added. strcpy's  should be reviewed and if ok - left
as-is. doing otherwise makes the code worse, not better and raises
risk. it now also produces warnings at compile time which creates
noise we just shouldnt' have.
2019-02-14 09:31:02 +00:00
Derek Foreman 87cf5188b4 ecore_wl2: Make our wayland socket handling thread safe
By using the prepare read code properly we can do wayland dispatch of
multiple queues in multiple threads.  I'm not advocating we ever do so,
but if a library (perhaps a gl implementation) wants to dispatch its own
queue, and that happens in a separate thread from our event loop, we
probably don't want the world to explode.

Reviewed-by: Chris Michael <cp.michael@samsung.com>
Differential Revision: https://phab.enlightenment.org/D7915
2019-02-13 10:33:41 -06:00
Wonki Kim 33c4041950 ecore_wl2: replace strcpy with strncpy
Summary: this patch replaces a volnerable function with a safer one.

Reviewers: devilhorns

Reviewed By: devilhorns

Subscribers: cedric, #reviewers, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D7920
2019-02-13 10:43:23 -05:00
Christopher Michael 0fed1c77ae Revert this as it should not have been pushed yet
Revert "ecore_wl2: Make our wayland socket handling thread safe"

This reverts commit efa85f35f4.
2019-02-13 10:01:47 -05:00
Wonki Kim e355373e32 ecore_wl2: fix a non-thread safe call.
Summary:
this patch contains a change to
replace non-thread safe call 'strerror' with eina_error_msg_get.

Reviewers: cedric, bu5hm4n, devilhorns

Reviewed By: devilhorns

Subscribers: #reviewers, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D7921
2019-02-13 09:58:11 -05:00
Derek Foreman efa85f35f4 ecore_wl2: Make our wayland socket handling thread safe
Summary:
By using the prepare read code properly we can do wayland dispatch of
multiple queues in multiple threads.  I'm not advocating we ever do so,
but if a library (perhaps a gl implementation) wants to dispatch its own
queue, and that happens in a separate thread from our event loop, we
probably don't want the world to explode.
Depends on D7914

Reviewers: zmike, devilhorns

Subscribers: cedric, #reviewers, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D7915
2019-02-13 09:58:06 -05:00
Wonki Kim 3bedc63315 ecore_wl2_input: update a timestamp whenever possible
Summary:
gettimeofday function returns a accumulated timestamp since around 1970 by the way,
a argument from server looks like a system uptime based timestamp
in some distribution such as tizen.

so that this patch appends a logic that updates a timestamp
inside Ecore_Wl2_Input* whenever possible to
prevent gettimeofday function from being called.

Reviewers: #reviewers, cedric, devilhorns

Reviewed By: #reviewers, devilhorns

Subscribers: devilhorns, cedric, #reviewers, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D7766
2019-01-29 07:06:33 -05:00
Derek Foreman be3020b0ab ecore_wl2: Convert frame callbacks to inlist
They're only ever on a single list, and never counted.  inlist makes
more sense.

Signed-off-by: Derek Foreman <derek.foreman.samsung@gmail.com>
Reviewed-by: Chris Michael <cp.michael@samsung.com>
Differential Revision: https://phab.enlightenment.org/D7610
2019-01-15 13:47:17 -06:00
Wonki Kim ee39639294 meson: refactor meson.build for ecore_wl2
this patch cleans emson.build for ecore_wl2 up little.
Differential Revision: https://phab.enlightenment.org/D7565
2019-01-10 10:57:42 +01:00
Carsten Haitzler 6fcc3a56d8 meson - vix ecore wl2 pc generation to not include nonexistent wl lib
the ecore wl2.pc wanted to -lwayland_protocol ... which is never
installed. it's an in-tree .a we stattically link in, so remove it
from the pub libs in the pc. rthis was causing things that build
against efl to fail (like enlightenment).
2018-12-20 19:00:37 +00:00
Derek Foreman c90826f72c ecore_wl2: Fix anchor for xdg pop-ups
Anchors are in window geometry, so we should be using 0,0 instead
of the parent x,y for the top left corner of the window.

Signed-off-by: Derek Foreman <derek.foreman.samsung@gmail.com>
Reviewed-by: Chris Michael <cp.michael@samsung.com>
Differential Revision: https://phab.enlightenment.org/D7436
2018-12-14 10:29:59 -06:00
Derek Foreman f53c7341c3 ecore_wl2: Replace direct usage of set_config.geometry with getters
I'm going to deal with some ugly geometry problems in the getter func
shortly.

Signed-off-by: Derek Foreman <derek.foreman.samsung@gmail.com>
Reviewed-by: Chris Michael <cp.michael@samsung.com>
Differential Revision: https://phab.enlightenment.org/D7431
2018-12-14 10:29:53 -06:00
Derek Foreman b32e5da641 ecore_wl2: remove uniconify path from ecore_wl2_window_iconified_set
Wayland shells have no way to unset iconified state.  What this code
did was corrupt current window state in potentially fatal ways.

Signed-off-by: Derek Foreman <derek.foreman.samsung@gmail.com>
Reviewed-by: Chris Michael <cp.michael@samsung.com>
Differential Revision: https://phab.enlightenment.org/D7430
2018-12-14 10:29:52 -06:00
Yeongjong Lee 788507961a ecore_wl2_dnd: initialize source to NULL when it destroy
Summary:
This prevent double destruction of source. if _ecore_wl2_input_del is called
with destroyed source, it can make unexpected troubles.

Reviewers: Hermet, id213sin, devilhorns

Reviewed By: devilhorns

Subscribers: cedric, #reviewers, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D7265
2018-11-15 09:11:38 -05:00
Carsten Haitzler d52709eca6 ecore wl2 - fix wl touch handler struct to set extra cb fields
sape and orient were not set, set them to NULL with fixme's
2018-11-09 11:44:00 +00:00
Carsten Haitzler 37806b5bf9 ecore wl2 - fix wl protocol listyener to init all struct fields 2018-11-09 11:43:59 +00:00
Wonki Kim 97e71b9dc4 ecore_wl2: Fix a memory leaking case
Summary:
there is a memory leaking in some case.
this patch fixes it.

Signed-off-by: Wonki Kim <wonki_.kim@samsung.com>

Subscribers: cedric, #reviewers, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D7167
2018-10-17 10:19:44 +09:00
Marcel Hollerbach a0562aa066 meson: add buildsystem to ecore_wl2
this was missing. Reported by jf_simon.
2018-10-12 11:15:29 +02:00
Marcel Hollerbach 07b69d3d85 ecore_wl2: fix build break
when i tested this commit i had wayland turned off. Sorry for the noise.
2018-10-10 14:09:24 +02:00
Hosang Kim 185a1f739b ecore_wl2: fix coverity issue. (Resource Leak)
Module is not freed when eina_module_load is failed.
Differential Revision: https://phab.enlightenment.org/D7152
2018-10-10 12:55:21 +02: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
Woochanlee d702f714fe ecore_wl2_window: Fix incorrectly implemented null check.
Summary: It checks 'window->xdg_toplevel'  two times.

Reviewers: ManMower, devilhorns

Reviewed By: devilhorns

Subscribers: cedric, #reviewers, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D7065
2018-09-19 07:01:01 -04:00
Marcel Hollerbach 4aa480f6d3 ecore_wl2: add support for intree loading of the module
Summary: the module was not loaded when we were running intree.

Reviewers: ManMower, devilhorns

Reviewed By: devilhorns

Subscribers: devilhorns, cedric, #reviewers, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D7023
2018-09-12 08:39:14 -04:00
Derek Foreman b43033e393 ecore_wl2: Move surface module file to modules directory
It is now similar to how other modules are handled.

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

Signed-off-by: Derek Foreman <derek.foreman.samsung@gmail.com>
2018-09-11 09:54:49 +02:00
Yeongjong Lee 02d83ebcd4 docs: Fix typos in API reference doc and comments.
Reviewers: Hermet, segfaultxavi

Reviewed By: Hermet, segfaultxavi

Subscribers: cedric, #reviewers, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D6948
2018-08-31 17:45:31 +09:00
Hermet Park 568ddfe397 ecore wl2: change logging level.
Summary: ease the error message to warning because it's not serious one.

Reviewers: devilhorns, ManMower

Reviewed By: devilhorns

Subscribers: cedric, #reviewers, #committers, zmike

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D6899
2018-08-23 07:29:35 -04:00
Marcel Hollerbach bda4565d9c ecore_wl2&elput: correctly fill the key structure
Summary: the key structure has two fields key and keyname, those should be identical to the keystructures from x. the method xkb_keysym_to_utf8 however returns different values for keys like "minus" thus only relying on xkb_keysym_name files this issue.

Reviewers: eagleeye, devilhorns

Reviewed By: eagleeye

Subscribers: cedric, #committers, zmike

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D6520
2018-07-10 14:44:36 -04:00
Derek Foreman 0fe553cf06 ecore_wl2: Remove ecore_wl2_display_window_find
Summary:
This is now totally trivial and needs not exist.
Depends on D6522

Reviewers: devilhorns

Reviewed By: devilhorns

Subscribers: cedric, #committers, zmike

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D6523
2018-07-06 10:16:36 -04:00
Derek Foreman 78f27a3eff ecore_wl2: Replace window ids with pointers
Summary:
There's no benefit to generating ids instead of just using the
Ecore_Wl2_Window pointer in events.

This has the added benefit of working around a really nasty hash collision
bug when multiple ecore_evas engines are used at once.

ref T7053
ref T6222

@beta_break
Depends on D6521

Reviewers: devilhorns

Reviewed By: devilhorns

Subscribers: cedric, #committers, zmike

Tags: #efl

Maniphest Tasks: T7053, T6222

Differential Revision: https://phab.enlightenment.org/D6522
2018-07-06 10:16:21 -04:00
Derek Foreman ee3df4efc3 ecore_wl2: Better error handling for dmabuf sync ioctls
Summary:
Turns out these can fail with EINTR or EAGAIN, and we're supposed
to try again.

Reviewers: zmike

Reviewed By: zmike

Subscribers: cedric, #committers, zmike

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D6250
2018-06-19 13:43:55 -04:00
Derek Foreman e4641649e2 ecore_wl2: purge surface buffers in semi_free
Summary:
This fixes a session recovery bug with software render.

An attempt to re-use a buffer in a new wayland connection resulted
in another disconnect and broken rendering.
Depends on D6281

Reviewers: devilhorns, zmike

Reviewed By: zmike

Subscribers: cedric, #committers, zmike

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D6282
2018-06-15 13:18:56 -05:00
Derek Foreman 54a877981c ecore_wl2: Add purge to ecore_wl2_window_surface_flush
Summary:
It's convenient to be able to pass this through this api too.

@betabreak
Depends on D6280

Reviewers: devilhorns, zmike

Reviewed By: zmike

Subscribers: cedric, #committers, zmike

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D6281
2018-06-15 13:18:53 -05:00
Derek Foreman b8d6923782 ecore_wl2: Handle purging flush in dmabuf module
Summary:
Allow destroying all buffers, even attached ones, in the dmabuf surface
module.
Depends on D6279

Reviewers: devilhorns, zmike

Reviewed By: zmike

Subscribers: cedric, #committers, zmike

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D6280
2018-06-15 13:18:39 -05:00
Derek Foreman a310667bec ecore_wl2: Add a purge option to surface flush
Summary:
We need to be able to forcibly destroy all surface buffers to make
session recovery work safely for software rendering.

@betabreak
Depends on D6278

Reviewers: devilhorns, zmike

Reviewed By: zmike

Subscribers: cedric, #committers, zmike

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D6279
2018-06-15 13:18:30 -05:00
Derek Foreman 551101b4cd ecore_wl2: Set the parent window's surface to NULL on surface destroy
Summary:
Prevents potential use after free.
Depends on D6277

Reviewers: devilhorns, zmike

Reviewed By: zmike

Subscribers: cedric, #committers, zmike

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D6278
2018-06-15 13:18:15 -05:00