Commit Graph

46 Commits

Author SHA1 Message Date
Daniel Hirt 3f8504c205 Efl selection: remove cancelled promises
This removes the promises in case multiple selection_set are used and
future_cancel were called.
2018-11-05 18:17:43 +02:00
Derek Foreman 899f208733 selection_manager: Convert to new animators
Summary:
Use more efficient animator mechanism.

Depends on D7041

Reviewers: devilhorns

Reviewed By: devilhorns

Subscribers: cedric, #reviewers, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D7042
2018-09-18 09:42:42 -05:00
Marcel Hollerbach 28423160d6 ecore_cocoa: move MARKUP outside of ecore_cocoa
the elementary MARKUP stuff requires ecore_cocoa to be linked to evas to
find the function. However, ecore_XXXXX things should stay unrelated to
evas in most cases. Thus this was not a good idea and created a circular
dependency, this is fixed now.

Differential Revision: https://phab.enlightenment.org/D6865
2018-08-22 20:39:35 +02:00
Carsten Haitzler e3b6f5a959 efl selection manager - avoid multiple selection get callbacks for req
do one request and get multiple returns if you have multiple windows.
this affected terminology in one proces, multiple windows the sel get
cb is called multiple times from one selection if you cnp between
windows a few times.

@fix
2018-08-22 10:10:42 +09:00
Alastair Poole 9342c1a3f4 efl_selection: reintroduce missing ELM_CNP_EVENT_SELECTION_CHANGED symbol.
Summary:
During the 1.21 development cycle the symbol ELM_CNP_EVENT_SELECTION_CHANGED was lost.

The commit which introduced this:  e88bbaa1e3

This patch re-introduced the symbol and expected behaviour.

Reviewers: #committers, zmike, bu5hm4n, herb

Reviewed By: #committers, zmike

Subscribers: herb, ManMower, segfaultxavi, stefan_schmidt, cedric, zmike

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D6689
2018-07-30 11:42:28 -04:00
Alastair Poole 4924fc73ee macos: allow text to be selected.
Summary: This gives us basic clipboard handling for MacOS after the refactor was done.

Test Plan:
Open an entry test. select text with mouse or keyboard.
Text can be cut. Text can be copied. Text can be pasted.

Reviewers: ajwillia.ms, zmike, jayji

Reviewed By: zmike

Subscribers: jayji, herdsman, cedric, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D6599
2018-07-23 15:48:29 -04:00
Carsten Haitzler 5e58e58d60 efl selection manager + elm dnd test fix with bad string handling
so there are 2 problems behind T7113. first is a problem in the efl
selection manager being "sloppy" with selection data. it's doing a
strlen on the data but it's not a normal c string. it's a blob of
binary data + length value. this fixes that "sloppiness" by using the
len field.

there is also another bug in the dnd test code that again has to do
with "sloppy" handling of data buffers and assuming nul byte
termination and not using the len field properly.

this fixes T7113.
2018-07-16 16:31:53 +09:00
Daniel Hirt e9925e609f Selection manager: properly clean in drop_target_del
Summary:
The last lines in _efl_selection_manager_drop_target_del were skipped
when `!pd->drop_list` was met. These lines clear the selection event
handlers. Thus, events kept firing and causing erratic behavior.

Fixes T7130

Subscribers: cedric, #committers, zmike

Tags: #efl

Maniphest Tasks: T7130

Differential Revision: https://phab.enlightenment.org/D6579
2018-07-13 09:24:00 +03:00
Derek Foreman 2452820e59 selection_manager: Silence silly ERR messages
Summary: These should be DBG, they're not errors.

Reviewers: devilhorns

Reviewed By: devilhorns

Subscribers: cedric, #committers, zmike

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D6526
2018-07-06 11:08:00 -04:00
Derek Foreman c529418580 selection_manager: Remove unused variable
Summary:
gcc somehow didn't notice this until an unrelated use of the variable
later was removed.  Now it's a warning.
Depends on D6523

Reviewers: devilhorns

Reviewed By: devilhorns

Subscribers: cedric, #committers, zmike

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D6524
2018-07-06 10:16:50 -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
Chris Michael ba1ab47294 elementary: Add missing EINA_UNUSED for unused function parameter 2018-07-04 16:51:21 -04:00
Mike Blumenkrantz 553fd7c163 efl/selection_manager: fix some invalid memory reads
Summary:
these selections are data with specified lengths, not strings
Depends on D6483

Reviewers: devilhorns, bu5hm4n

Subscribers: bu5hm4n, netstar, cedric, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D6484
2018-07-03 12:39:33 -04:00
Mike Blumenkrantz fff4d1ba97 efl/selection_manager: make selection manager a child of the app
Summary:
a selection manager is application-wide, not per-window. creating separate
managers for each window duplicates all callbacks for the window's display
server, guaranteeing broken behavior at any time when more than one window
exists

fix T6937

Reviewers: bu5hm4n, devilhorns

Subscribers: cedric, #committers

Tags: #efl

Maniphest Tasks: T6937

Differential Revision: https://phab.enlightenment.org/D6483
2018-07-03 12:39:26 -04:00
Derek Foreman 83f2f086a5 efl_selection_manager: Stop calling ecore_wl2_input_ungrab
Summary:
This "ungrab" thing appears to just send a mouse up event in some
situations.

This already happens at *start* of drag, so at best calling it again will
do nothing, and at worst it'll break input.
Depends on D6125

Reviewers: zmike, cedric

Reviewed By: zmike

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D6126
2018-05-08 13:26:39 -05:00
JongMin Lee 296d117f2a elm efl_selection_manager: resolve possible memory leak. 2018-04-27 14:04:02 +09:00
Carsten Haitzler 3e3462f0d3 elm - sel manager - build on windows AND x11 now 2018-04-24 13:45:45 +09:00
Alastair Poole bbd4247d6a elementary: fix build on X11.
@fix
2018-04-23 20:41:38 +01:00
Carsten Haitzler f805cc2be9 elm - sel manager - fix windows build with selection vars 2018-04-24 01:36:44 +09:00
JongMin Lee a42451d688 elm: resolve possible memory leak.
@fix
2018-04-20 15:36:32 +09:00
Carsten Haitzler 703277b242 efl selection manager - fix x11 cnp from entry to plain text conversion
use sel data not input data/size... copy & paste fix problem...
fixes 28d06f9a5f
@fix
2018-04-13 23:28:21 +09:00
Carsten Haitzler eab91edcb2 efl selection manager - fix dnd end handling to only handle on dnd
dnd end handling was being done even if no dnd started, like an
ungrab. this caused side effects like stoping selections in their
tracks.

@fix
2018-04-13 20:50:24 +09:00
Carsten Haitzler 28d06f9a5f efl selection - fix another binary buffer treates as string bug
as per subject.

@fix
2018-04-13 04:19:16 +09:00
Carsten Haitzler 13734e51c1 efl selection - fix entry <-> plain text compy and paste in wl
efl didnt convert markup to plain text when pasting markup -> text.
this fixes that and enables middle mouse paste etc. etc.

@fix
2018-04-13 04:19:16 +09:00
Carsten Haitzler 9d6ac24a9c efl selection manager - fix anoyther binary buffer treated as string bug
yet another "binary buffer" (pointer + size) streated as a string with
strdup + strlen which is oh so wrong. this fixes up some cnp in
wayland with garbage at the end of strings

@fix
2018-04-13 04:19:16 +09:00
Carsten Haitzler 59f3dbdd34 efl selection manager - fix crashes when doing selections on non-x11
elm was calling x calls when on wayland here... because it didnt check
the RUNTIME display system type for the window, relying on ifdefs
instead.

@fix
2018-04-13 04:19:16 +09:00
Alastair Poole 10fb87bbcd efl_selection_manager: fix build on MacOS and WL2. 2018-04-06 16:11:41 +01:00
Carsten Haitzler fcd7c3097c elm - selection manager - fix string buffer handling and format types
this has 2 bugs really. 1 - the format masks for plain text included
markup which ... is wrong - right? that should have a mime type of its
own... either way it leads to plain text pasts being handled wrong in
wayland... so this fixes that

also the string buffers in wayland just were nothandled right. buffers
were raw binary buffers plus size,not strings, but they were strdup'd
etc. assuming nul termination. oh so wrong to do that. this also fixes
that as i fpound it while fixing the above format bug.

this fixes T6284

@fix
2018-04-05 21:17:22 +09:00
Carsten Haitzler 2105bc4fb1 efl selection manager - build again if no wl or no x is enabled
so make check and my builds passed because i have wl and x enabled. if
one of these isnt then this build will fail. my fix fails. this fixes
that.
2018-04-05 19:16:16 +09:00
Carsten Haitzler d009a231e9 efl selection manager - handle multi window selections properly
tell other windows they lost their selections correctly if you have
multiple windows within the same process. this fixes multi-window mode
in terminology.

@fix
2018-04-05 18:52:57 +09:00
Carsten Haitzler 468d55e284 efl selection - fix paste with multiple windows and filter by window
so changes in elm cnp (efl selection) broke cnp with terminology
multi-window mode. this fixes it.

@fix
2018-04-05 18:52:57 +09:00
Mike Blumenkrantz 708c4ab576 efl_selection_manager: shut up shut up shut up ecore-x when running in wayland
fix T6643
2018-02-13 17:31:12 -05:00
Mike Blumenkrantz 9cf61c2f6d elm: move ecore-x and ecore-wl2 connection init to selection manager
this seems to be the only place where the related components are
explicitly used

neither of these components have fork-safe connections, so there is no
benefit to calling them during quicklaunch init
2018-02-07 12:12:22 -05:00
Stefan Schmidt 131ddded60 efl_selection_manager: fix compilation on osx after rename
In commit c91ae98fd3 data was renamed but
the ifdefed osx part forgotten to update.
2018-01-22 12:15:19 +01:00
Vincent Torri 0623618f73 elementary: fix compilation of efl_selection_manager on windows
Test Plan: compilation

Reviewers: cedric

Subscribers: jpeg

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

Signed-off-by: Cedric Bail <cedric@osg.samsung.com>
2018-01-19 13:36:13 -08:00
Jean-Philippe Andre c91ae98fd3 cnp: Rename selection data to content
This solves an issue with C# bindings where a field of a struct can not
have the same name as the struct itself. Go figure why.
2018-01-18 18:46:15 +09:00
Thiep Ha e625c9b830 selection: delete callbacks when the manager is deleted
If the selection manager is deleted before the drop objects
are deleted, we need to remove callbacks in its destructor.

Thank @herdsman for reporting this.
2018-01-17 09:25:57 +09:00
Jean-Philippe Andre 2686742587 selection: Fix two remaining warnings 2018-01-16 22:04:55 +09:00
Jean-Philippe Andre d133336399 selection: Disable debug logs
selection's namespacing still requires some love
2018-01-16 18:36:47 +09:00
Thiep Ha 07e7bbd4b5 selection_dnd: fix warnings in clang
Fix warnings about type convert and vars init in clang and remove comments.
2018-01-16 16:35:14 +09:00
Chris Michael 075b14d53f elementary: Remove use of implicit declaration
evas_canvas_default_device_get used here leads to an 'implicit
declaration of function warning'. Use evas_default_device_get instead
to remove warning.

@fix

Signed-off-by: Chris Michael <cp.michael@samsung.com>
2018-01-11 12:37:43 -05:00
Thiep Ha e88bbaa1e3 cnp_dnd: make legacy APIs use new interfaces
Legacy APIs can uses efl_selection, efl_ui_dnd, efl_ui_dnd_container interfaces
with helper functions.
2018-01-11 17:56:24 +09:00
Thiep Ha e6ab4b41ed dnd: add efl_ui_dnd
Efl_Ui_Dnd is the interface for drag and drop of elm_cnp.
2018-01-11 17:56:24 +09:00
Thiep Ha f191d6821f selection: add efl_selection interface
Efl_Selection is the object interface for selection api of elm_cnp.
It allows get, set, clear, check selection.
2018-01-11 17:56:24 +09:00
Thiep Ha 763daa870e cnp_dnd: add selection manager
Selection manager implements functions for selection (cnp)
and drag and drop.
All objects can uses it APIs. It also supports multi-seat.
2018-01-11 17:56:24 +09:00