Commit Graph

443 Commits

Author SHA1 Message Date
Vincent Torri cfbdcdc9c8 Use extern after EAPI
Reviewed-by: Stefan Schmidt <stefan@datenfreihafen.org>
Differential Revision: https://phab.enlightenment.org/D11961
2020-06-10 10:07:57 +02:00
Marcel Hollerbach 8e3606698e refactor build
libraries are split into deps, external deps, and pub deps.
Evas engines are refactored to use the predefined engine deps.

this is preparation work for efl-one.

Reviewed-by: Stefan Schmidt <stefan@datenfreihafen.org>
Differential Revision: https://phab.enlightenment.org/D11806
2020-05-27 11:06:46 +02:00
Christopher Michael f240a528dd ecore-evas-wayland: Fix unused variables
Patch 09ab8c9967 added code to printf wl client animation
ticks, however the line that actually does the printing is commented
out (which is fine) but the variables used in that printf are not
needed if we are not printing things out
2020-05-26 14:51:53 -04:00
Taehyub Kim 0b96e63f82 ecore_evas_wayland_common: keep the backword compatibility for wayland dnd handler
Keep the backword compatibility for wayland ECORE_WL2_EVENT_DATA_SOURCE_END event handler.
If we don't use this handler, the dnd is not ended when the drop item is dropped.
@fix

Reviewed-by: Christopher Michael <devilhorns@comcast.net>
Reviewed-by: Marcel Hollerbach <mail@marcel-hollerbach.de>
Differential Revision: https://phab.enlightenment.org/D11846
2020-05-25 11:16:41 +02:00
Carsten Haitzler 09ab8c9967 ecore evas - tick printf debugs - disabled right now so no noise
this is here so it can be turned on and off to see what's happening
with ticking and tick latency
2020-05-23 09:34:57 +01:00
Christopher Michael 783e990819 ecore-evas-wayland: Fix formatting according to coding conventions
"80 column code whenever possible - Wrap longer lines where required."

NB: No functional changes
2020-05-18 09:58:43 -04:00
Mike Blumenkrantz ef3a09499f build: fix void* use in pointer maths
Summary:
void* is an invalid type for calculating pointer offsets, so ensure that
this is always cast to something else (e.g., char*) in the few cases
where it's been misused

Subscribers: cedric, #reviewers, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D11816
2020-05-12 16:55:59 +02:00
Vincent Torri 8db62cb22b remove arguments of LOGFN in ecore_wayland modules as the are always the same
Reviewers: raster, devilhorns

Reviewed By: devilhorns

Subscribers: devilhorns, cedric, #reviewers, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D11777
2020-05-06 09:18:31 -04:00
Christopher Michael 0880772442 ecore-evas-wayland: Fix formatting
NB: No functional changes
2020-04-20 18:21:53 -04:00
Carsten Haitzler 02da386da8 ecore evas - wl - fix useless iff case for rotation
rotationis handled later on in the func

thsi fixes CID 1419870
2020-04-17 12:08:27 +01:00
Marcel Hollerbach 11da918983 Replace strncmp code
the structure "!strcmp(X, "foo", strlen("foo"))" is equal to
"eina_has_prefix(X, "foo")", and the later is nicer to read, hence this
replaces it.

Reviewed-by: Stefan Schmidt <stefan@datenfreihafen.org>
Reviewed-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Differential Revision: https://phab.enlightenment.org/D11620
2020-04-03 14:51:11 +02:00
Christopher Michael 9fbe26998b ecore_evas_wayland: Do not pass negative parameter to close function
Coverity reports that 'fd' here is negative, and close() cannot accept
a negative parameter, so add a check to make sure 'fd' is not negative
before passing to close function.

Fixes CID1420318
2020-03-30 14:34:41 -04:00
Christopher Michael dc7283eb14 ecore_evas_wayland: Declare variables at top of function 2020-03-30 14:33:23 -04:00
Christopher Michael 8009817d07 ecore-evas-wayland: Check for valid 'fd' before passing to write()
write() cannot be passed a negative value. If
ecore_main_fd_handler_fd_get returns -1, then this is an issue. Check
for valid fd being returned from fd_handler_fd_get and if it is
negative, then cleanup and get out.

Fixes CID1420318
2020-03-10 10:31:46 -04:00
Christopher Michael be87c4a0c2 ecore-evas-wayland: Fix resource leak
If we are going to be exiting this function without setting up the
ecore_main_fd_handler (and thus passing forign_slice), then we should
free forign_slice as it was previously calloc'd above.

Fixes CID1420322
2020-03-10 10:28:01 -04:00
Xavi Artigas 7a79e15ea3 ecore_evas: Use EFL naming convention in cnp & dnd methods
Some methods were missing the "Drag" or "Selection" namespaces or the _Cb suffix.
Depends on D11219

Reviewed-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Differential Revision: https://phab.enlightenment.org/D11426
2020-03-08 11:01:24 +01:00
Marcel Hollerbach 5ac02ec9ac ecore_evas: introduce wayland support for cnp & dnd
This adds cnp support, actions are right now only mapped to "ask",
further support can be added there, and synchronization can be added to
register more available actions. However, i did not find *any* wayland
implementation in gtk qt nor chromiumos that even use the action to
indicate anything. This here also has a slightly different behaviour to
X11 in terms of coordinates for motion,leave,enter. They can contain
negative coordinates (which is due to the fact that wl is CSD and X11 is
SSD. However, I did not want to fix this in any regard, as you might
want to use that, and it would be a none trivial amount of code to fix
that.

Reviewed-by: Chris Michael <cp.michael@samsung.com>
Reviewed-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Differential Revision: https://phab.enlightenment.org/D11329
2020-03-08 10:59:37 +01:00
Marcel Hollerbach 39f3ce42dc ecore_evas: Introduce cnp / dnd API for ecore evas
The idea of copy and paste here is:
- The user specifies the content he wants to have in the selection
  buffer with a Eina_Content, these content pointer ownerships are
  passed to the called. Internally ecore_evas code will memorieze the
  pointer, and pass on function callbacks to the modules, which then do
  not have to deal with the ownership.

- In case the module does not specify these APIs, the callback
  implementation will be called, which only works for cnp *not* dnd.

- Action and mime types are handled as strings, which allows way better
  custom organisations.

(The docs needs improvement)

Reviewed-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Differential Revision: https://phab.enlightenment.org/D11192
2020-03-08 10:59:25 +01:00
Carsten Haitzler de4a698c96 elm win + ecore evas - fix csd stuff like base size and min sizing
this fixes a lot that was broken with csd... but not everything.

@fix
2020-01-18 00:14:58 +00:00
Christopher Michael dedeb77b02 ecore-evas-wayland: Minor formatting fixes
NB: No functional changes
2019-10-22 10:59:29 -04:00
Christopher Michael 68b107ff59 ecore_evas_wayland: Fix array step size
Fix bug where eina_array step size was being increased by 10 everytime
a handler was pushed to the array. There is no need to increase array
size by 10 each time we add 1 pointer to handler.

@fix
2019-10-22 10:12:51 -04:00
Christopher Michael f7fdb9c7f6 ecore-evas-wayland: Add handler to array
Small patch to fix bug where last event handler was not being added to
the event_hdls array

@fix
2019-10-22 10:11:24 -04:00
Christopher Michael 520b844f4a ecore-evas-wayland: Minor formatting fix
NB: No functional changes
2019-10-22 10:06:23 -04:00
Christopher Michael ea2b24b182 ecore-evas-wayland: Minor formatting fix
NB: No functional changes
2019-10-22 10:04:01 -04:00
Mike Blumenkrantz 7a122db342 efl/engines: fix null derefs
Summary: CIDs 1402640, 1402709

Reviewers: cedric

Reviewed By: cedric

Subscribers: #reviewers, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D10448
2019-10-18 13:29:44 -04:00
Carsten Haitzler ca32732373 ecore_evas/wl2 0 fux xdg close cb for window when it's closed remotely
this should fix this:

https://matrix.org/_matrix/media/r0/download/matrix.org/lhFneENlWAjuXDaJfSYuJjjJ

unfortunately this means adding an api and then using it in ecore_evas.

@fix
2019-10-14 22:58:27 +01: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
Carsten Haitzler a4bcd15498 ecore_evas wl - make ERR's into WRNS as they really are just that 2019-06-04 15:23:55 +01:00
Hermet Park 1c974289e4 ecore_evas wayland: fix a build break.
Summary: missed changing here.

Subscribers: cedric, #reviewers, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D8712
2019-04-25 18:56:39 +09:00
Hermet Park 53599a8d39 ecore wayland: expand internal interface to pass engine option list.
This is a prepartion patch to support msaa in wayland.
ui window needs to deliver engine options (stencil, depth, msaa bits)
to evas engine side, ecore_evas_wayland_egl should have the argument to pass.
2019-04-25 16:56:40 +09:00
Derek Foreman 12af5537c5 ee_wayland: Use object geometry instead of window geometry
wayland window geometry isn't currently being handled properly, but the
ecore_evas geometry should be correct and coherent.

Signed-off-by: Derek Foreman <derek.foreman.samsung@gmail.com>
Reviewed-by: Chris Michael <cp.michael@samsung.com>
Differential Revision: https://phab.enlightenment.org/D7435
2018-12-14 10:29:58 -06:00
Derek Foreman 56f7097e17 ee_wayland: Replace set_config.geometry direct use 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/D7432
2018-12-14 10:29:54 -06:00
Derek Foreman 1f709470c5 ee_wayland: Set opaque region for alphaless surfaces
Theoretically this shouldn't be necessary, but it may be possible for
a backend to give us a visual with translucency even if we didn't ask
for one.

also better comments.

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

Signed-off-by: Derek Foreman <derek.foreman.samsung@gmail.com>
2018-11-19 10:11:29 -06: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
Hermet Park 6010d3e8c5 ecore wayland: fix a regression bug of wayland_transparent_get().
Summary:
wayland transparent func was replaced with alpha's.

By this, transparent common attribute is no more valid,
ecore_evas_transparent_get() doesn't work.

This is a regression bug by 5af84afced

Reviewers: ManMower, devilhorns

Reviewed By: ManMower, devilhorns

Subscribers: cedric, #reviewers, #committers, zmike

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D6856
2018-08-17 11:30:20 -04:00
Derek Foreman 4e07f505c3 ee_wayland: Remove spurious manual_render
Summary:
The line prior to this damages the canvas and should result in a render
anyway.

Forcing a manual render here (without regard to the manual_render_set
state) will cause a post render callback to fire for clients that
think they've disabled automatic rendering.

fix T7275

Reviewers: devilhorns

Reviewed By: devilhorns

Subscribers: devilhorns, cedric, #reviewers, #committers, zmike

Tags: #efl

Maniphest Tasks: T7275

Differential Revision: https://phab.enlightenment.org/D6809
2018-08-10 11:38:25 -04:00
Derek Foreman 7bb0c661bd ee_wayland: Update configured state on short-circuit ack-configure
Summary:
When we BAIL from the configure callback with an immediate ack we don't
properly update state, commit the ack, or allow ecore_wl2 to process
a deferred ack_configure that happened during async rendering.

Using a commit here instead should update internal state properly.

ref T7243
Depends on D6783

Reviewers: zmike

Reviewed By: zmike

Subscribers: cedric, #reviewers, #committers, zmike

Tags: #efl

Maniphest Tasks: T7243

Differential Revision: https://phab.enlightenment.org/D6784
2018-08-08 14:58:47 -04:00
Derek Foreman c45348770c Revert "ee_wayland: Remove pointless ack_configure"
Summary:
This reverts commit a61f254f19.
and a follow up commit that removed some warnings

Apparently this is instrumental in enlightenment's window maximize
animation processing.

The removed bits would force an ack configure when an inbound
configure didn't result in a change that would cause a re-render.
Since this calculation needs knowledge of state ecore_wl2 doesn't
track, it does need to happen here.

ref T7243

Reviewers: zmike

Reviewed By: zmike

Subscribers: cedric, #reviewers, #committers, zmike

Tags: #efl

Maniphest Tasks: T7243

Differential Revision: https://phab.enlightenment.org/D6783
2018-08-08 14:58:44 -04:00
Derek Foreman e382bac1a0 wayland: Fix elementary setting window parents at creation time
Summary:
We need to pass the entire pointer, not just 32-bits of it.

Fixes a crash with enlightenment sandbox gadgets where
ecore_wl2_window_alpha_get() is called with an invalid pointer while
trying to display a pop-up.

Reviewers: zmike, devilhorns

Reviewed By: zmike, devilhorns

Subscribers: devilhorns, cedric, #reviewers, #committers, zmike

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D6775
2018-08-08 09:37:30 -04:00
Mike Blumenkrantz c54b7a4ab3 ecore-evas/wayland: fix parent setting on canvas creation
Summary:
use the correct pointer when applying the passed parent object in order to
successfully set the parent

ref 78f27a3eff

Reviewers: devilhorns

Reviewed By: devilhorns

Subscribers: cedric, #committers

Tags: #efl_display_system

Differential Revision: https://phab.enlightenment.org/D6757
2018-08-06 15:18:14 -04:00
Derek Foreman 24e5aa668a ee_wayland: Update maximize and fullscreen state after configure
Summary:
If the compositor drops fullscreen or maximize for us the CSD to change
that state would become broken, as ecore_wl2 thought the window state
was whatever we last set it to from the client side.

Update that state on configure event.

fix T7211

Reviewers: devilhorns, zmike, eagleeye

Reviewed By: devilhorns, zmike

Subscribers: cedric, #committers, zmike

Tags: #efl

Maniphest Tasks: T7211

Differential Revision: https://phab.enlightenment.org/D6684
2018-07-25 15:53:39 -05:00
Umesh Tanwar 67684dec73 ecore_evas: when window resized in ecore_evas, check evas rotate state.
Summary:
when ecore_evas is resized, get evas' size,
but angle not checked, so put a check.

@fix

Signed-off-by: Umesh Tanwar <umesh.tanwar@samsung.com>

Reviewers: Hermet, devilhorns

Reviewed By: devilhorns

Subscribers: cedric, #committers, zmike

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D6627
2018-07-18 08:10:22 -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 acb125419f ee_wayland: Remove extraneous unregister
Summary:
ecore_event_window_unregister(ee->prop.window) is actually *exactly*
the same as ecore_evas_input_event_unregister(ee)

So this sequence just uselessly tries to remove something from an empty
hash table.

Reviewers: devilhorns

Reviewed By: devilhorns

Subscribers: cedric, #committers, zmike

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D6521
2018-07-06 10:15:40 -04:00
Derek Foreman dc75d6b5d3 ee_wayland: Don't offer a raise callback
Summary: This isn't possible under wayland.

Reviewers: devilhorns, zmike

Reviewed By: zmike

Subscribers: cedric, #committers, zmike

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D6276
2018-06-15 13:17:39 -05:00
YeongJong Lee 420128903a ee_wayland: remove needless variable
Reviewers: ManMower, zmike

Reviewed By: ManMower

Subscribers: cedric, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D6239
2018-06-01 09:13:14 -05:00
Derek Foreman 27316746f5 ee_wayland: Fix device leak on disconnect
Summary:
A reference was taken on these when they were added, so by passing NULL
here we're not allowing that reference to be dropped.  This results in
not only leaking the device forever, but also potentially leaving it as
a default device after it's removed so that no new attach will replace it.

Under weston all devices are removed on a VT switch, and when you switch
back the default device is wrong, which leads to problems with events
like "mouse in" which, for legacy reasons, don't take a seat, but
instead look up the default seat.

This allows the delete callback to be fired for the first time ever,
and while I've tried to fix some bugs this has revealed, I'm not
actually sure I've caught them all.
Depends on D6182

Reviewers: zmike

Reviewed By: zmike

Subscribers: cedric, zmike

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D6183
2018-05-18 13:46:47 -04:00
Derek Foreman 1e2626a70c ee_wayland: retain seat names when creating a new canvas
Summary:
We were creating seats with silly arbitray names like seat-11 when
creating a new canvas.
Depends on D6130

Reviewers: zmike, cedric

Reviewed By: zmike

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D6131
2018-05-08 13:26:57 -05:00
Derek Foreman abe295735a ee_wayland: clean up warnings
Summary:
Pretty sure these are my fault.
Depends on D6122

Reviewers: zmike, cedric

Reviewed By: zmike

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D6123
2018-05-08 13:26:25 -05:00