Commit Graph

871 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
Stefan Schmidt 935c17c655 build: modules: harmonize use of package_c_args
Adding it to all missing places so we can control it from the central
meson.build file.

Reviewed-by: Marcel Hollerbach <mail@marcel-hollerbach.de>
Reviewed-by: João Paulo Taylor Ienczak Zanette <joao.tiz@expertisesolutions.com.br>
Differential Revision: https://phab.enlightenment.org/D11855
2020-05-26 10:15:24 +02: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 ef733d2035 ecore-evas-drm: Remove duplicate config set in meson.build file 2020-05-18 11:24:48 -04: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
Carsten Haitzler 63b5d81983 Revert "Fix EAPI definition by defining EFL_BUILD for each built DLL"
This reverts commit 3ade45cbc8.
2020-05-18 11:13:59 +01:00
Vincent Torri 3ade45cbc8 Fix EAPI definition by defining EFL_BUILD for each built DLL
Summary: EAPI must be defined to dllexport when building DLL, and to dllimport when using these DLL. To achieve this, define EFL_BUILD for each library and module, and set DLL_EXPORT unconditionally. Static library are and will be not supported

Test Plan: compilation

Reviewers: zmike, raster, jptiz

Subscribers: cedric, #reviewers, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D11834
2020-05-18 09:51:48 +01: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
Christopher Michael a70b811e8d ecore-evas-drm: Remove useless check for visibility
This is already checked above so having a second check here is just
silliness
2020-05-06 10:06:53 -04: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
Carsten Haitzler bf2538897b ecore_evas_x - fix maximize/unmaximize request corner case
state was not managed well.. this will fix that. also a test in
elementary for it to you can test it out.

@fix
2020-05-03 15:36:00 +01:00
Christopher Michael 410fb16d6c ecore-evas-drm: Fix broken init count
We should not assume that there is only ever 1 drm ecore_evas here so
we need to handle init count properly

@fix
2020-04-28 12:38:14 -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 bb2327017f ecore_evas_x: fix typo'ed function name
Reviewed-by: Xavi Artigas <xavierartigas@yahoo.es>
Reviewed-by: Christopher Michael <devilhorns@comcast.net>
Differential Revision: https://phab.enlightenment.org/D11705
2020-04-14 11:59:44 -04:00
Marcel Hollerbach 91fe39af90 ecore_evas_x: add safety check for data in converter
Summary:
since the existance of seleciton manager, the converter callbacks from
ecore_x are expecting custom struct pointers. However, enlightenment
never updated to use the elm dnd API for client side usages. Which
results in the fact that sometimes, when a client sents Notify, and
e_dnd is active, that this converter is executed with the wrong data.

With this commit the data passed in is ensured to have the correct magic
number. The proper solution for this would either be registering the
correct converters in enlightenment, or update to elm_drag. However,
since the continues cried river over the last 5 days has raised enough
hydro power to add these changes. This leaves us with just one question:
How was it possible to generate so many messages about a problem that
can be solved in a fraction of charaters that have been written?

fixes <a-issue-that-was-never-created>
Depends on D11700

Reviewers: zmike, stefan_schmidt, raster

Reviewed By: zmike

Subscribers: cedric, #reviewers, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D11701
2020-04-14 11:29:50 -04:00
Marcel Hollerbach bcc6c27d33 ecore_evas_x: reject the promise instead of return
Summary:
this is needed in order to tell the API user that this is not going to
be completed.
Depends on D11699

Reviewers: zmike, raster, stefan_schmidt

Reviewed By: zmike

Subscribers: cedric, #reviewers, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D11700
2020-04-14 11:29:46 -04:00
Marcel Hollerbach 0a2db329c8 ecore_evas: add API for finding out if event is used
Summary:
ecore_x_dnd_send_status can be used to indicate if a item can be dropped
on a client or not. However, we should only indicate that this can be
dropped, if there is a object we signaled that a drop is in.

Long story short: there is no assertion that after indicating that
things can be dropped, that a notify for the data is sent. A drag
implementation should always listen to a mouse up event, and abort the
drag if no further operations are sent.
Depends on D11698

Reviewers: zmike, stefan_schmidt, raster

Reviewed By: zmike

Subscribers: cedric, #reviewers, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D11699
2020-04-14 11:29:43 -04:00
Marcel Hollerbach 7288e98b9e ecore_evas_x: allow parsing of links form the link list
Summary:
this is needed in order to return the data the same way the legacy impl
did. This however has the annoying sideeffect that ecore_evas_x now
depends on efreet, and we had to change the build order.
Depends on D11696

Reviewers: zmike, stefan_schmidt, raster

Reviewed By: zmike

Subscribers: devilhorns, cedric, #reviewers, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D11697
2020-04-14 11:29:32 -04:00
Carsten Haitzler dcfb8bb580 ecore-evas - x dnd/cnp - handle null data content and not segv 2020-04-12 13:26:46 +01:00
Marcel Hollerbach a4ef152361 ecore_evas_cocoa: be aware of NULL data
this will now result in the promise beeing rejected.

Reviewed-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Differential Revision: https://phab.enlightenment.org/D11653
2020-04-07 10:58:27 +02:00
Marcel Hollerbach 13d52be7e6 ecore_evas: fix leaks in macos and win32
memory is duplicated in eina_content_new.

Reviewed-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Differential Revision: https://phab.enlightenment.org/D11641
2020-04-06 09:05:05 +02: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
Mike Blumenkrantz 00a93423a6 ecore-evas/cocoa: fix cnp leak
this pointer needs to be freed if it's being copied

Reviewed-by: Marcel Hollerbach <mail@marcel-hollerbach.de>
Differential Revision: https://phab.enlightenment.org/D11604
2020-04-03 14:39:57 +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
Vincent Torri e0f5e80f78 fix segfault when there is no text in clipboard
Test Plan: cnp a clipboard content without text

Reviewers: zmike

Reviewed By: zmike

Subscribers: cedric, #reviewers, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D11565
2020-03-26 10:47:34 -04:00
Carsten Haitzler e1e7272d89 ecore evas cnp x - fix nul byte extras when text pasting to other apps
i was seeing junk bytes in pastes to chromium... it was an extra nul
byte. this will special-case nuke that.
2020-03-22 18:39:54 +00:00
Carsten Haitzler 60f8495d80 ecore evas x - on argb dont create unused 1 bit pixmap masks
found out we had a wasted 1 bit pixmap mask for argb windows left over
from shaped window support... so don't create it. drop resources a bit.

@fix
2020-03-17 09:50:49 +00: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
Marcel Hollerbach b97c051e6f ecore_evas_x: fix memory leak when enter drag and drop, without a ee
this is something that can *never* happen otherwise we would have never
got this call. But lets make coverity happy.
2020-03-09 17:10:40 +01:00
Marcel Hollerbach 6524b0a155 ecore_evas_x: correctly handle images in X11
I thought that i explicitly tested this. However, it seems i was wrong,
this way now this is handled correctly, and the image is stored and
coverted to a path.

With this you can now copy images from chromium and firefox to elm apps.

The change in elm_entry reverts parts of the rewrite of the elm
handling, as initially every path came *without* "file://" in front, so
we have to maintain that.

fixes T8625
2020-03-09 17:10:39 +01:00
Marcel Hollerbach 0dcbc26a5a ecore_evas_x: honor forign dnd implementations
enlightenment does not use the elm dnd operation implementations.
Therefore we have to ensure that we only handle these operations here,
when ecore_evas dnd API is used.
2020-03-08 12:29:41 +01: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
Xavi Artigas 645c3d41eb docs: Strengthen docs for Copy&Paste and Drag&Drop
Including Eina.Content

And a typo/bugfix in ecore_evas_x.

Reviewed-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Differential Revision: https://phab.enlightenment.org/D11204
2020-03-08 11:01:18 +01:00
Marcel Hollerbach 7dd92a2d98 port cnp on Windows
Test Plan: Ctrl-c and Ctrl-Vworking

Reviewers: raster, zmike

Subscribers: cedric, #reviewers, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D11439
2020-03-08 11:01:15 +01:00
Marcel Hollerbach c731cf56d5 ecore_evas: Introduce cnp support for cocoa
with this commit you can do limited cnp for cocoa. You still cannot copy
and paste pictures or markup arround, only text is supported so far.
However, text on its own works quite stable and good.

Reviewed-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Differential Revision: https://phab.enlightenment.org/D11351
2020-03-08 10:59:46 +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 e0c40abb40 ecore_evas: introduce initial selection & dnd support for x.
Seats are not implemented, if there is a type mismatch promises are
going to be rejected. Most of this code is copied over from
selection_manager.

Reviewed-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Differential Revision: https://phab.enlightenment.org/D11195
2020-03-08 10:59:34 +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
Stefan Schmidt 0f52bbb00e ecore_evas: add double header include safety
Reported-By: https://lgtm.com/projects/g/Enlightenment/efl
Reviewed-by: Chris Michael <cp.michael@samsung.com>
Differential Revision: https://phab.enlightenment.org/D10887
2019-12-17 09:59:44 +01: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