Commit Graph

35 Commits

Author SHA1 Message Date
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