Re: [E-devel] Express UI Ideas

2017-05-12 Thread Simon Lees


On 05/12/2017 02:56 PM, Simon Lees wrote:
> 
> 
> On 05/12/2017 02:38 AM, Christopher Michael wrote:
>>
>> Hello All,
>>
>> As some of you may know, I have been refactoring the backend of the 
>> Express IRC client. Well, the backend has reached a good stable point 
>> with most IRC commands/responses being handled now (CTCP/DCC still need 
>> implementing).
>>
>> I'd like to move on in refactoring the UIso I am writting this email 
>> in order to solicit ideas from the community with regard to what users 
>> would like to see in an IRC front-end.
>>
>> I would like to stay away from something as boring as an X-Chat 
>> interface...preferring to come up with a unique interface that showcases 
>> EFL abilities.
>>
> As someone who uses Hexchat / xchat daily I like the way it functionally
> presents its interface so maybe something starting with that and
> "blinging" it up alot / maybe merging ideas from other apps like rage or
> maybe terminology.
> 
> I think it would be cool to have something like rages interface where
> you just have full screen with no controls until you mouse over (with
> the option to disable it for people who find it annoying, but with a
> hexchat like layout, channels on the left, users on the right and topic
> at the top.
> 
> Gah now i'm off to have a play with gimp, you have succesfully just
> postponed a enlightenment release by a hour or 3 :-P
> 

And a picture speaks 1000 words so here's a mock (note the color scheme
is simply what I use in my client), I also left off the timestamp as i'm
lazy and I think it would be cool if we used a text filter of some sort
on everything thats not the main body text but I don't have the skills
time or effort to include that here.

http://paste.opensuse.org/42480997

-- 

Simon Lees (Simotek)http://simotek.net

Emergency Update Team   keybase.io/simotek
SUSE Linux   Adelaide Australia, UTC+10:30
GPG Fingerprint: 5B87 DB9D 88DC F606 E489 CEC5 0922 C246 02F0 014B



signature.asc
Description: OpenPGP digital signature
--
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot___
enlightenment-devel mailing list
enlightenment-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/enlightenment-devel


[EGIT] [core/efl] master 02/03: elm_entry: Cursor disappears on calling select function in an empty entry.

2017-05-12 Thread Shilpa Singh
jpeg pushed a commit to branch master.

http://git.enlightenment.org/core/efl.git/commit/?id=442ab2bc67411ab98ddc83c2261c72a6bccf940b

commit 442ab2bc67411ab98ddc83c2261c72a6bccf940b
Author: Shilpa Singh 
Date:   Fri May 12 15:10:37 2017 +0900

elm_entry: Cursor disappears on calling select function in an empty entry.

Summary:
Issue: Selection cannot happen on an empty entry, if selection functions
are called on empty entry, cursor is hidden, even if entry is focused.
Soln: Check for whether entry is empty or not before proceeding with 
selection.

Test Plan:
1. Call select_all, select_region_set on a focused entry
2. You can observe cursor cannot be seen.

Reviewers: jpeg

Reviewed By: jpeg

Subscribers: cedric, jpeg

Differential Revision: https://phab.enlightenment.org/D4862
---
 src/lib/elementary/elm_entry.c | 6 --
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/src/lib/elementary/elm_entry.c b/src/lib/elementary/elm_entry.c
index 46fd873..dba796a 100644
--- a/src/lib/elementary/elm_entry.c
+++ b/src/lib/elementary/elm_entry.c
@@ -4286,8 +4286,9 @@ _elm_entry_select_none(Eo *obj EINA_UNUSED, 
Elm_Entry_Data *sd)
 }
 
 EOLIAN static void
-_elm_entry_select_all(Eo *obj EINA_UNUSED, Elm_Entry_Data *sd)
+_elm_entry_select_all(Eo *obj, Elm_Entry_Data *sd)
 {
+   if (elm_entry_is_empty(obj)) return;
if ((sd->password)) return;
if (sd->sel_mode)
  {
@@ -4301,8 +4302,9 @@ _elm_entry_select_all(Eo *obj EINA_UNUSED, Elm_Entry_Data 
*sd)
 }
 
 EOLIAN static void
-_elm_entry_select_region_set(Eo *obj EINA_UNUSED, Elm_Entry_Data *sd, int 
start, int end)
+_elm_entry_select_region_set(Eo *obj, Elm_Entry_Data *sd, int start, int end)
 {
+   if (elm_entry_is_empty(obj)) return;
if ((sd->password)) return;
if (sd->sel_mode)
  {

-- 




[EGIT] [core/efl] master 01/03: popup: move "visible_set(FALSE)" before calling dismissed callback

2017-05-12 Thread JinYong Park
jpeg pushed a commit to branch master.

http://git.enlightenment.org/core/efl.git/commit/?id=ef2f37cad13114d765b8a041e2aea222cdf08c30

commit ef2f37cad13114d765b8a041e2aea222cdf08c30
Author: JinYong Park 
Date:   Fri May 12 14:59:32 2017 +0900

popup: move "visible_set(FALSE)" before calling dismissed callback

Summary:
 After hiding animation is finished, "dismissed" callback will be called.
 It means popup's visible state is FALSE.
 But if evas_object_show(popup) is called in it's custom dimssed callback 
function,
 popup's visible state is TRUE, so evas_object_show is canceled.
 So visible_set(FALSE) is must done before call dimissed callback.

@fix

Reviewers: Hermet, herb, jpeg, cedric, singh.amitesh, raster

Reviewed By: jpeg

Subscribers: woohyun

Differential Revision: https://phab.enlightenment.org/D4869
---
 src/lib/elementary/elc_popup.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/lib/elementary/elc_popup.c b/src/lib/elementary/elc_popup.c
index a24c1c0..dcb78a3 100644
--- a/src/lib/elementary/elc_popup.c
+++ b/src/lib/elementary/elc_popup.c
@@ -118,8 +118,8 @@ _timeout_cb(void *data, const Efl_Event *event EINA_UNUSED)
 static void
 _hide_effect_finished_cb(void *data, const Efl_Event *event EINA_UNUSED)
 {
-   efl_event_callback_legacy_call(data, ELM_POPUP_EVENT_DISMISSED, NULL);
efl_gfx_visible_set(data, EINA_FALSE);
+   efl_event_callback_legacy_call(data, ELM_POPUP_EVENT_DISMISSED, NULL);
 }
 
 

-- 




[EGIT] [core/efl] master 03/03: evas gl: Fix typo and revert hack (GLES 3.1)

2017-05-12 Thread Jean-Philippe ANDRÉ
jpeg pushed a commit to branch master.

http://git.enlightenment.org/core/efl.git/commit/?id=7e2e6e8aa4a8eda5aab2e55b4ae20906faf3039c

commit 7e2e6e8aa4a8eda5aab2e55b4ae20906faf3039c
Author: Jean-Philippe Andre 
Date:   Fri May 12 16:28:56 2017 +0900

evas gl: Fix typo and revert hack (GLES 3.1)

Omg... Thanks Daekwang Ryu for pointing me to my error. I remember
struggling a lot with this OpenGL API and libGLdispatch (glvnd) when
in fact this was all just a typo in the code.

GLES 3.1 and the upcoming 3.2 support need a proper test case...

See c68a40987404375b36460b6a7f5ccceb45444b57

@fix
---
 src/modules/evas/engines/gl_common/evas_gl_api.c | 49 ++--
 1 file changed, 4 insertions(+), 45 deletions(-)

diff --git a/src/modules/evas/engines/gl_common/evas_gl_api.c 
b/src/modules/evas/engines/gl_common/evas_gl_api.c
index 1222559..25d5d6a 100644
--- a/src/modules/evas/engines/gl_common/evas_gl_api.c
+++ b/src/modules/evas/engines/gl_common/evas_gl_api.c
@@ -25,9 +25,6 @@
   }
 
 static void *_gles3_handle = NULL;
-#ifdef GL_GLES
-static void *_gles3_handle_fallback = NULL;
-#endif
 static Evas_GL_API _gles3_api;
 //---//
 // API Debug Error Checking Code
@@ -3252,7 +3249,8 @@ _evgl_load_gles3_apis(void *dl_handle, Evas_GL_API 
*funcs, int minor_version,
 
 #define ORD(name) do { \
funcs->name = dlsym(dl_handle, #name); \
-   if (!funcs->name && get_proc_address) get_proc_address(#name); \
+   if (!funcs->name && get_proc_address) \
+ funcs->name = get_proc_address(#name); \
if (!funcs->name) { \
 WRN("%s symbol not found", #name); \
 return ret_value; \
@@ -3369,49 +3367,10 @@ _evgl_load_gles3_apis(void *dl_handle, Evas_GL_API 
*funcs, int minor_version,
 
if (minor_version > 0)
  {
-// OpenGL ES 3.1
+// OpenGL ES 3.0 is supported, return true even if 3.1 isn't there
 ret_value = EINA_TRUE;
 
-/* HACK for libglvnd (The GL Vendor-Neutral Dispatch library)
- *
- * For NVIDIA driver using libglvnd, GLES 3.0 symbols are exposed in
- * libGLESv2.so and properly forwarded to libGLESv2_nvidia.so.
- *
- * But for GLES 3.1+ the symbols are not present in libGLESv2.so so
- * the following dlsym() would invariably fail. eglGetProcAddress also
- * fails to find the symbols. I believe this is a bug in libglvnd's
- * libEGL.so, as it should be finding the symbol in nvidia's library.
- *
- * So we try here to link directly to the vendor library. This is ugly,
- * but this makes GLES 3.1 work.
- *
- * FIXME: This hack should be removed when libglvnd fixes support
- * for GLES 3.1+ properly.
- */
-
-funcs->glDispatchCompute = dlsym(dl_handle, "glDispatchCompute");
-if (!funcs->glDispatchCompute && get_proc_address)
-  get_proc_address("glDispatchCompute");
-#ifdef GL_GLES
-if (!funcs->glDispatchCompute)
-  {
- const char *vendor;
-
- vendor = (const char *) funcs->glGetString(GL_VENDOR);
- if (!vendor) return ret_value;
-
- // FIXME: Add other support for other vendors
- if (!strcmp(vendor, "NVIDIA Corporation"))
-   _gles3_handle_fallback = dlopen("libGLESv2_nvidia.so", 
RTLD_NOW);
-
- if (!_gles3_handle_fallback) return ret_value;
- dl_handle = _gles3_handle_fallback;
- get_proc_address = NULL;
-  }
-#else
-if (!funcs->glDispatchCompute) return ret_value;
-#endif
-
+// OpenGL ES 3.1
 ORD(glDispatchCompute);
 ORD(glDispatchComputeIndirect);
 ORD(glDrawArraysIndirect);

-- 




Re: [E-devel] Can I use enlightenment on the kernel 4.11?

2017-05-12 Thread PaulTT
obviously, i compile it ;)
packaged ones are full of crap, and even so, i need a couple of patches for
my setup
and then, i can also choose when upgrade or not...

my 3 ¢ ;P


On Thu, May 11, 2017 at 2:16 PM, Al Poole  wrote:

> Are you compiling your own kernels???
>
> If so, maybe you could talk to someone that packages up kernels for ideas?
>
> Personally, I wouldn't advise building any kernel from source unless you're
> testing new features or building one for an embedded system...two pence for
> you!
>
> On Thu, May 11, 2017 at 1:07 PM, Florian Schaefer 
> wrote:
>
> >
> > On 11.05.2017 12:33, Carsten Haitzler (The Rasterman) wrote:
> > > On Wed, 10 May 2017 09:48:19 +0200 PaulTT  said:
> > >
> > >> i just posted a message about this... (sorry, i've seen now this
> thread)
> > >>
> > >> as i said there, there's also a problem with unlocking (so, pam
> > related, i
> > >> assume ?)
> > >> via console su and sudo worked like a charm (i've got error messages
> > about
> > >> cpufreq and backlight too)
> > >
> > > pam would be executing a setuid root binary to do the password check...
> > so it's
> > > the same issue. something has decided that e and app processes below it
> > in the
> > > process tree "cant run setuid (root) binaries" and has disabled that
> > feature.
> > > that feature seems to only kick in with 4.11 kernel. it certainly is
> not
> > e
> > > doing this. it has relied on this working for many years. it's
> something
> > new
> > > security-wise that is being enabled by a new kernel.
> > >
> > > maybe some parent process is using setpriv? CAP_SETUID  disabled? man
> > > capabilities ... for info ... maybe run captest ?
> > >e
> > > 12:20PM ~ > captest
> > > User  credentials uid:1000 euid:1000 suid:1000
> > > Group credentials gid:1000 egid:1000 sgid:1000
> > > Current capabilities: none
> > > securebits flags: none
> > > Attempting direct access to shadow...FAILED (Permission denied)
> > > Attempting to access shadow by child process...FAILED
> > > Child User  credentials uid:1000 euid:1000 suid:1000
> > > Child Group credentials gid:1000 egid:1000 sgid:1000
> > > Child capabilities: none
> > > Child securebits flags: none
> > >
> > > is what i get. which is normal.
> >
> > I get the same as you on my system here:
> >
> > florian@washu:~ # uname -a
> > Linux washu 4.11.0 #2 SMP PREEMPT Tue May 2 12:12:51 JST 2017 i686
> > GNU/Linux
> > florian@washu:~ # captest
> > User  credentials uid:500 euid:500 suid:500
> > Group credentials gid:100 egid:100 sgid:100
> > Current capabilities: none
> > securebits flags: none
> > Attempting direct access to shadow...FAILED (Permission denied)
> > Attempting to access shadow by child process...FAILED
> > Child User  credentials uid:500 euid:500 suid:500
> > Child Group credentials gid:100 egid:100 sgid:100
> > Child capabilities: none
> > Child securebits flags: none
> >
> > Cheers,
> > Florian
> >
> > >> could the problem be related to some new sh**y systemd operation
> > >> i saw that also using wayland, i coulnd't access halt/reboot/suspend
> > menu
> > >> items too (this happens to me also with previous kernels)
> > >
> > > works for me with enlightenment + wl + arch (+systemd)... i can do all
> > the
> > > power off etc. stuff...
> > >
> > >> On Thu, May 4, 2017 at 6:19 AM, Carsten Haitzler <
> ras...@rasterman.com>
> > >> wrote:
> > >>
> > >>> On Thu, 04 May 2017 11:09:13 +0900  said:
> > >>>
> >  Hi,
> > 
> >  Carsten Haitzler (The Rasterman)  wrote:
> > 
> > > On Wed, 3 May 2017 12:09:21 +0900 Florian Schaefer <
> > list...@netego.de>
> > >>> said:
> > 
> > >> Hi!
> > >>
> > >> On 03.05.2017 10:04, Carsten Haitzler (The Rasterman) wrote:
> > >>> On Tue, 02 May 2017 21:16:40 +0900 fulwood...@gmail.com said:
> > >>>
> >  Hi,
> > 
> >  I got the source of kernel 4.11, then comipled, and check the
> >  behaviour of enlightenment (efl 1.18.1, enlightment 0.21.7).
> > 
> >  At the start up of enlightenment, I got an error message;
> > 
> >   There was an error trying to set the cpu power state setting
> via
> > >>> the
> >   module's setfreq utility.
> > 
> >  On the kernel 4.10.x, I never see such a message.
> > 
> >  And, I tried to use su and sudo command in the terminal, I got a
> >  strange message;
> > 
> >  fulwood@linux-uw5l:~> sudo
> >  sudo: effective uid is not 0, is sudo installed setuid root
> > 
> >  fulwood@linux-uw5l:~> su
> >  Password:
> >  su: incorrect password
> > 
> >  This means, there is a problem concerning uid treatment in the
> >  enlightenment, doesn't it.
> > 
> >  Moreover, VirtualBox indicate the problem of enlightenment
> > >>> directly;
> > 
> >  fulwood@linux-uw51:~> VirtualBox
> > 
> >  VirtualBox: Error -10 in SUPRHardenedMain!
> > 

[EGIT] [core/efl] master 01/01: efreet: Fix failure to save list data to output

2017-05-12 Thread Bryce Harrington
stefan pushed a commit to branch master.

http://git.enlightenment.org/core/efl.git/commit/?id=a7c1edc44f4f3b4d97590accd7f90c215d339602

commit a7c1edc44f4f3b4d97590accd7f90c215d339602
Author: Bryce Harrington 
Date:   Fri May 12 11:08:30 2017 +0200

efreet: Fix failure to save list data to output

Summary:
This fixes a typo in the fix 55676b33, which introduced an invalid early
return from the save_list function, preventing it from outputing the
list data to the file.

@fix CID1375005, CID1375004

Reviewers: jpeg

Reviewed By: jpeg

Subscribers: stefan_schmidt, cedric, jpeg

Differential Revision: https://phab.enlightenment.org/D4873
---
 src/bin/efreet/efreetd_cache.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/bin/efreet/efreetd_cache.c b/src/bin/efreet/efreetd_cache.c
index c347acc..410e333 100644
--- a/src/bin/efreet/efreetd_cache.c
+++ b/src/bin/efreet/efreetd_cache.c
@@ -770,7 +770,7 @@ save_list(const char *file, Eina_List *l)
 
eina_strbuf_append_printf(buf, "%s/efreet/%s", efreet_cache_home_get(), 
file);
f = fopen(eina_strbuf_string_get(buf), "wb");
-   if (!f) return;
+   if (!f)
  {
 eina_strbuf_free(buf);
 return;

-- 




Re: [E-devel] Can I use enlightenment on the kernel 4.11?

2017-05-12 Thread The Rasterman
On Fri, 12 May 2017 10:41:30 +0900 Florian Schaefer  said:

> On 11.05.2017 22:12, Carsten Haitzler (The Rasterman) wrote:
> > On Thu, 11 May 2017 21:07:20 +0900 Florian Schaefer 
> > said:
> > 
> >>
> >> On 11.05.2017 12:33, Carsten Haitzler (The Rasterman) wrote:
> >>> On Wed, 10 May 2017 09:48:19 +0200 PaulTT  said:
> >>>
>  i just posted a message about this... (sorry, i've seen now this thread)
> 
>  as i said there, there's also a problem with unlocking (so, pam related,
>  i assume ?)
>  via console su and sudo worked like a charm (i've got error messages
>  about cpufreq and backlight too)
> >>>
> >>> pam would be executing a setuid root binary to do the password check... so
> >>> it's the same issue. something has decided that e and app processes below
> >>> it in the process tree "cant run setuid (root) binaries" and has disabled
> >>> that feature. that feature seems to only kick in with 4.11 kernel. it
> >>> certainly is not e doing this. it has relied on this working for many
> >>> years. it's something new security-wise that is being enabled by a new
> >>> kernel.
> >>>
> >>> maybe some parent process is using setpriv? CAP_SETUID  disabled? man
> >>> capabilities ... for info ... maybe run captest ?
> >>> e
> >>> 12:20PM ~ > captest
> >>> User  credentials uid:1000 euid:1000 suid:1000
> >>> Group credentials gid:1000 egid:1000 sgid:1000
> >>> Current capabilities: none
> >>> securebits flags: none
> >>> Attempting direct access to shadow...FAILED (Permission denied)
> >>> Attempting to access shadow by child process...FAILED
> >>> Child User  credentials uid:1000 euid:1000 suid:1000
> >>> Child Group credentials gid:1000 egid:1000 sgid:1000
> >>> Child capabilities: none
> >>> Child securebits flags: none
> >>>
> >>> is what i get. which is normal.
> >>
> >> I get the same as you on my system here:
> >>
> >> florian@washu:~ # uname -a
> >> Linux washu 4.11.0 #2 SMP PREEMPT Tue May 2 12:12:51 JST 2017 i686
> >> GNU/Linux florian@washu:~ # captest
> >> User  credentials uid:500 euid:500 suid:500
> >> Group credentials gid:100 egid:100 sgid:100
> >> Current capabilities: none
> >> securebits flags: none
> >> Attempting direct access to shadow...FAILED (Permission denied)
> >> Attempting to access shadow by child process...FAILED
> >> Child User  credentials uid:500 euid:500 suid:500
> >> Child Group credentials gid:100 egid:100 sgid:100
> >> Child capabilities: none
> >> Child securebits flags: none
> > 
> > try capsh --print
> > ?
> > Current: =
> > Bounding set
> > =cap_chown,cap_dac_override,cap_dac_read_search,cap_fowner,cap_fsetid,cap_kill,cap_setgid,cap_setuid,cap_setpcap,cap_linux_immutable,cap_net_bind_service,cap_net_broadcast,cap_net_admin,cap_net_raw,cap_ipc_lock,cap_ipc_owner,cap_sys_module,cap_sys_rawio,cap_sys_chroot,cap_sys_ptrace,cap_sys_pacct,cap_sys_admin,cap_sys_boot,cap_sys_nice,cap_sys_resource,cap_sys_time,cap_sys_tty_config,cap_mknod,cap_lease,cap_audit_write,cap_audit_control,cap_setfcap,cap_mac_override,cap_mac_admin,cap_syslog,cap_wake_alarm,cap_block_suspend,cap_audit_read
> > Securebits: 00/0x0/1'b0 secure-noroot: no (unlocked)
> >  secure-no-suid-fixup: no (unlocked)
> >  secure-keep-caps: no (unlocked)
> > uid=1000(raster)
> > gid=1000(raster)
> > groups=5(tty),6(disk),7(lp),10(wheel),50(games),78(kvm),90(network),91
> > (video),92 (audio),93(optical),94(floppy),95(storage),96(scanner),98
> > (power),100(users),492 (oprofile),1000(raster)
> 
> Oh, that's a nice command. :-)
> 
> florian@washu:~ # /sbin/capsh --print
> Current: =
> Bounding set
> =cap_chown,cap_dac_override,cap_dac_read_search,cap_fowner,cap_fsetid,cap_kill,cap_setgid,cap_setuid,cap_setpcap,cap_linux_immutable,cap_net_bind_service,cap_net_broadcast,cap_net_admin,cap_net_raw,cap_ipc_lock,cap_ipc_owner,cap_sys_module,cap_sys_rawio,cap_sys_chroot,cap_sys_ptrace,cap_sys_pacct,cap_sys_admin,cap_sys_boot,cap_sys_nice,cap_sys_resource,cap_sys_time,cap_sys_tty_config,cap_mknod,cap_lease,cap_audit_write,cap_audit_control,cap_setfcap,cap_mac_override,cap_mac_admin,cap_syslog,cap_wake_alarm,cap_block_suspend,cap_audit_read
> Securebits: 00/0x0/1'b0
>  secure-noroot: no (unlocked)
>  secure-no-suid-fixup: no (unlocked)
>  secure-keep-caps: no (unlocked)
> uid=500(florian)
> gid=100(users)
> groups=20(dialout),24(cdrom),25(floppy),29(audio),30(dip),44(video),46
> (plugdev),100(users),106(camera),108(netdev),119(systemd-journal)
> 
> It seems that I have cap_setuid. That's good, right?

yes you do... then that's odd. capabilities at least SAY they are allowing
setuid... you are running this under e in some terminal... right?

-- 
- Codito, ergo sum - "I code, therefore I am" --
The Rasterman (Carsten Haitzler)ras...@rasterman.com


--
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot

Re: [E-devel] Can I use enlightenment on the kernel 4.11?

2017-05-12 Thread The Rasterman
On Fri, 12 May 2017 10:58:48 +0200 PaulTT  said:

> obviously, i compile it ;)
> packaged ones are full of crap, and even so, i need a couple of patches for
> my setup
> and then, i can also choose when upgrade or not...

oh interesting. we're 2 for 2 on "4.11 kernel + sudo doesnt work in e and
below" for people who hand compile their own kernels...

is there an option where the packaged kernels ensure things work? or a patch?
or...

at least so far in our massive sample size of 2... both compile their own
kernels... :)

> my 3 ¢ ;P
> 
> 
> On Thu, May 11, 2017 at 2:16 PM, Al Poole  wrote:
> 
> > Are you compiling your own kernels???
> >
> > If so, maybe you could talk to someone that packages up kernels for ideas?
> >
> > Personally, I wouldn't advise building any kernel from source unless you're
> > testing new features or building one for an embedded system...two pence for
> > you!
> >
> > On Thu, May 11, 2017 at 1:07 PM, Florian Schaefer 
> > wrote:
> >
> > >
> > > On 11.05.2017 12:33, Carsten Haitzler (The Rasterman) wrote:
> > > > On Wed, 10 May 2017 09:48:19 +0200 PaulTT  said:
> > > >
> > > >> i just posted a message about this... (sorry, i've seen now this
> > thread)
> > > >>
> > > >> as i said there, there's also a problem with unlocking (so, pam
> > > related, i
> > > >> assume ?)
> > > >> via console su and sudo worked like a charm (i've got error messages
> > > about
> > > >> cpufreq and backlight too)
> > > >
> > > > pam would be executing a setuid root binary to do the password check...
> > > so it's
> > > > the same issue. something has decided that e and app processes below it
> > > in the
> > > > process tree "cant run setuid (root) binaries" and has disabled that
> > > feature.
> > > > that feature seems to only kick in with 4.11 kernel. it certainly is
> > not
> > > e
> > > > doing this. it has relied on this working for many years. it's
> > something
> > > new
> > > > security-wise that is being enabled by a new kernel.
> > > >
> > > > maybe some parent process is using setpriv? CAP_SETUID  disabled? man
> > > > capabilities ... for info ... maybe run captest ?
> > > >e
> > > > 12:20PM ~ > captest
> > > > User  credentials uid:1000 euid:1000 suid:1000
> > > > Group credentials gid:1000 egid:1000 sgid:1000
> > > > Current capabilities: none
> > > > securebits flags: none
> > > > Attempting direct access to shadow...FAILED (Permission denied)
> > > > Attempting to access shadow by child process...FAILED
> > > > Child User  credentials uid:1000 euid:1000 suid:1000
> > > > Child Group credentials gid:1000 egid:1000 sgid:1000
> > > > Child capabilities: none
> > > > Child securebits flags: none
> > > >
> > > > is what i get. which is normal.
> > >
> > > I get the same as you on my system here:
> > >
> > > florian@washu:~ # uname -a
> > > Linux washu 4.11.0 #2 SMP PREEMPT Tue May 2 12:12:51 JST 2017 i686
> > > GNU/Linux
> > > florian@washu:~ # captest
> > > User  credentials uid:500 euid:500 suid:500
> > > Group credentials gid:100 egid:100 sgid:100
> > > Current capabilities: none
> > > securebits flags: none
> > > Attempting direct access to shadow...FAILED (Permission denied)
> > > Attempting to access shadow by child process...FAILED
> > > Child User  credentials uid:500 euid:500 suid:500
> > > Child Group credentials gid:100 egid:100 sgid:100
> > > Child capabilities: none
> > > Child securebits flags: none
> > >
> > > Cheers,
> > > Florian
> > >
> > > >> could the problem be related to some new sh**y systemd operation
> > > >> i saw that also using wayland, i coulnd't access halt/reboot/suspend
> > > menu
> > > >> items too (this happens to me also with previous kernels)
> > > >
> > > > works for me with enlightenment + wl + arch (+systemd)... i can do all
> > > the
> > > > power off etc. stuff...
> > > >
> > > >> On Thu, May 4, 2017 at 6:19 AM, Carsten Haitzler <
> > ras...@rasterman.com>
> > > >> wrote:
> > > >>
> > > >>> On Thu, 04 May 2017 11:09:13 +0900  said:
> > > >>>
> > >  Hi,
> > > 
> > >  Carsten Haitzler (The Rasterman)  wrote:
> > > 
> > > > On Wed, 3 May 2017 12:09:21 +0900 Florian Schaefer <
> > > list...@netego.de>
> > > >>> said:
> > > 
> > > >> Hi!
> > > >>
> > > >> On 03.05.2017 10:04, Carsten Haitzler (The Rasterman) wrote:
> > > >>> On Tue, 02 May 2017 21:16:40 +0900 fulwood...@gmail.com said:
> > > >>>
> > >  Hi,
> > > 
> > >  I got the source of kernel 4.11, then comipled, and check the
> > >  behaviour of enlightenment (efl 1.18.1, enlightment 0.21.7).
> > > 
> > >  At the start up of enlightenment, I got an error message;
> > > 
> > >   There was an error trying to set the cpu power state setting
> > via
> > > >>> the
> > >   module's setfreq utility.
> > > 
> > >  On the kernel 4.10.x, I never see such a message.
> > > 
> > >  And, I tried to use su and sudo command in the terminal, I got a
> > >  stra

Re: [E-devel] Can I use enlightenment on the kernel 4.11?

2017-05-12 Thread PaulTT
on one of failed logins, auth.log says this:

May  9 19:02:35 cadbane unix_chkpwd[3773]: check pass; user unknown
May  9 19:02:35 cadbane unix_chkpwd[3773]: password check failed for user
(ptt)
May  9 19:02:35 cadbane enlightenment: pam_unix(login:auth): authentication
failure; logname= uid=1000 euid=1000 tty= ruser= rhost=localhost  user=ptt

unfortunately i really can't reboot the machine now...

could it be something related to libinput versus evdev driver in X (or wl)?



On Fri, May 12, 2017 at 10:58 AM, PaulTT  wrote:

> obviously, i compile it ;)
> packaged ones are full of crap, and even so, i need a couple of patches
> for my setup
> and then, i can also choose when upgrade or not...
>
> my 3 ¢ ;P
>
>
> On Thu, May 11, 2017 at 2:16 PM, Al Poole  wrote:
>
>> Are you compiling your own kernels???
>>
>> If so, maybe you could talk to someone that packages up kernels for ideas?
>>
>> Personally, I wouldn't advise building any kernel from source unless
>> you're
>> testing new features or building one for an embedded system...two pence
>> for
>> you!
>>
>> On Thu, May 11, 2017 at 1:07 PM, Florian Schaefer 
>> wrote:
>>
>> >
>> > On 11.05.2017 12:33, Carsten Haitzler (The Rasterman) wrote:
>> > > On Wed, 10 May 2017 09:48:19 +0200 PaulTT  said:
>> > >
>> > >> i just posted a message about this... (sorry, i've seen now this
>> thread)
>> > >>
>> > >> as i said there, there's also a problem with unlocking (so, pam
>> > related, i
>> > >> assume ?)
>> > >> via console su and sudo worked like a charm (i've got error messages
>> > about
>> > >> cpufreq and backlight too)
>> > >
>> > > pam would be executing a setuid root binary to do the password
>> check...
>> > so it's
>> > > the same issue. something has decided that e and app processes below
>> it
>> > in the
>> > > process tree "cant run setuid (root) binaries" and has disabled that
>> > feature.
>> > > that feature seems to only kick in with 4.11 kernel. it certainly is
>> not
>> > e
>> > > doing this. it has relied on this working for many years. it's
>> something
>> > new
>> > > security-wise that is being enabled by a new kernel.
>> > >
>> > > maybe some parent process is using setpriv? CAP_SETUID  disabled? man
>> > > capabilities ... for info ... maybe run captest ?
>> > >e
>> > > 12:20PM ~ > captest
>> > > User  credentials uid:1000 euid:1000 suid:1000
>> > > Group credentials gid:1000 egid:1000 sgid:1000
>> > > Current capabilities: none
>> > > securebits flags: none
>> > > Attempting direct access to shadow...FAILED (Permission denied)
>> > > Attempting to access shadow by child process...FAILED
>> > > Child User  credentials uid:1000 euid:1000 suid:1000
>> > > Child Group credentials gid:1000 egid:1000 sgid:1000
>> > > Child capabilities: none
>> > > Child securebits flags: none
>> > >
>> > > is what i get. which is normal.
>> >
>> > I get the same as you on my system here:
>> >
>> > florian@washu:~ # uname -a
>> > Linux washu 4.11.0 #2 SMP PREEMPT Tue May 2 12:12:51 JST 2017 i686
>> > GNU/Linux
>> > florian@washu:~ # captest
>> > User  credentials uid:500 euid:500 suid:500
>> > Group credentials gid:100 egid:100 sgid:100
>> > Current capabilities: none
>> > securebits flags: none
>> > Attempting direct access to shadow...FAILED (Permission denied)
>> > Attempting to access shadow by child process...FAILED
>> > Child User  credentials uid:500 euid:500 suid:500
>> > Child Group credentials gid:100 egid:100 sgid:100
>> > Child capabilities: none
>> > Child securebits flags: none
>> >
>> > Cheers,
>> > Florian
>> >
>> > >> could the problem be related to some new sh**y systemd operation
>> > >> i saw that also using wayland, i coulnd't access halt/reboot/suspend
>> > menu
>> > >> items too (this happens to me also with previous kernels)
>> > >
>> > > works for me with enlightenment + wl + arch (+systemd)... i can do all
>> > the
>> > > power off etc. stuff...
>> > >
>> > >> On Thu, May 4, 2017 at 6:19 AM, Carsten Haitzler <
>> ras...@rasterman.com>
>> > >> wrote:
>> > >>
>> > >>> On Thu, 04 May 2017 11:09:13 +0900  said:
>> > >>>
>> >  Hi,
>> > 
>> >  Carsten Haitzler (The Rasterman)  wrote:
>> > 
>> > > On Wed, 3 May 2017 12:09:21 +0900 Florian Schaefer <
>> > list...@netego.de>
>> > >>> said:
>> > 
>> > >> Hi!
>> > >>
>> > >> On 03.05.2017 10:04, Carsten Haitzler (The Rasterman) wrote:
>> > >>> On Tue, 02 May 2017 21:16:40 +0900 fulwood...@gmail.com said:
>> > >>>
>> >  Hi,
>> > 
>> >  I got the source of kernel 4.11, then comipled, and check the
>> >  behaviour of enlightenment (efl 1.18.1, enlightment 0.21.7).
>> > 
>> >  At the start up of enlightenment, I got an error message;
>> > 
>> >   There was an error trying to set the cpu power state setting
>> via
>> > >>> the
>> >   module's setfreq utility.
>> > 
>> >  On the kernel 4.10.x, I never see such a message.
>> > 
>> >  And, I tried to u

[EGIT] [core/efl] master 01/01: efl ui win -> add test for centering + fix center of window before show

2017-05-12 Thread Carsten Haitzler
raster pushed a commit to branch master.

http://git.enlightenment.org/core/efl.git/commit/?id=3a602462971861d9b7a65aa4aa795f3ee182ab44

commit 3a602462971861d9b7a65aa4aa795f3ee182ab44
Author: Carsten Haitzler (Rasterman) 
Date:   Fri May 12 19:19:29 2017 +0900

efl ui win -> add test for centering + fix center of window before show

we haven't gotten replies yet on what our position or size should be,
so we should store them so centering works before show but after
resizing is evaluated (that also fixed by forcing an eval).

@fix
---
 src/bin/elementary/test_win_dialog.c | 36 +
 src/lib/elementary/efl_ui_win.c  | 51 +---
 2 files changed, 83 insertions(+), 4 deletions(-)

diff --git a/src/bin/elementary/test_win_dialog.c 
b/src/bin/elementary/test_win_dialog.c
index a7c3bf3..b90dfc6 100644
--- a/src/bin/elementary/test_win_dialog.c
+++ b/src/bin/elementary/test_win_dialog.c
@@ -99,6 +99,36 @@ _bt3_clicked_cb(void *data, Evas_Object *obj EINA_UNUSED, 
void *event_info EINA_
efl_gfx_visible_set(dia, EINA_TRUE);
 }
 
+static void
+_bt4_clicked_cb(void *data, Evas_Object *obj EINA_UNUSED, void *event_info 
EINA_UNUSED)
+{
+   Efl_Canvas_Object *dia, *lb, *parent = data;
+
+   dia = efl_add(EFL_UI_WIN_STANDARD_CLASS, NULL,
+ efl_ui_win_type_set(efl_added, EFL_UI_WIN_DIALOG_BASIC),
+ efl_ui_win_name_set(efl_added, "window-dia-4"),
+ efl_ui_win_autodel_set(efl_added, EINA_TRUE),
+ efl_text_set(efl_added, "Min/Max Size Dialog")
+);
+
+   //lb = efl_add(EFL_UI_TEXT_CLASS, dia);,
+   lb = elm_label_add(dia);
+   efl_event_callback_add(dia, EFL_GFX_EVENT_CHANGE_SIZE_HINTS, _size_update, 
lb);
+   efl_event_callback_add(dia, EFL_GFX_EVENT_RESIZE, _size_update, lb);
+   elm_object_text_set(lb, "This is a Centered Dialog Window");
+   efl_gfx_size_hint_weight_set(lb, 1.0, 1.0);
+
+   // Swallow in the label as the default content, this will make it visible.
+   efl_content_set(dia, lb);
+
+   // Set min & max size (app-side)
+   efl_gfx_size_hint_min_set(dia, ELM_SCALE_SIZE(0), ELM_SCALE_SIZE(100));
+   efl_gfx_size_hint_max_set(dia, ELM_SCALE_SIZE(800), ELM_SCALE_SIZE(600));
+
+   efl_ui_win_center(dia, EINA_TRUE, EINA_TRUE);
+   efl_gfx_visible_set(dia, EINA_TRUE);
+}
+
 void
 test_win_dialog(void *data EINA_UNUSED, Evas_Object *obj EINA_UNUSED, void 
*event_info EINA_UNUSED)
 {
@@ -130,6 +160,12 @@ test_win_dialog(void *data EINA_UNUSED, Evas_Object *obj 
EINA_UNUSED, void *even
elm_box_pack_end(box, bt);
evas_object_show(bt);
 
+   bt = elm_button_add(win);
+   elm_object_text_set(bt, "Create a new centered dialog");
+   evas_object_smart_callback_add(bt, "clicked", _bt4_clicked_cb, win);
+   elm_box_pack_end(box, bt);
+   evas_object_show(bt);
+
evas_object_resize(win, 400, 400);
evas_object_show(win);
 }
diff --git a/src/lib/elementary/efl_ui_win.c b/src/lib/elementary/efl_ui_win.c
index 0d9907e..0feb119 100644
--- a/src/lib/elementary/efl_ui_win.c
+++ b/src/lib/elementary/efl_ui_win.c
@@ -187,10 +187,13 @@ struct _Efl_Ui_Win_Data
int  aspect_w, aspect_h; /* used for the get API */
int  size_base_w, size_base_h;
int  size_step_w, size_step_h;
+   int  req_x, req_y, req_w, req_h;
int  max_w, max_h;
int  norender;
int  modal_count;
int  response;
+   Eina_Boolreq_wh : 1;
+   Eina_Boolreq_xy : 1;
 
struct {
   short pointer_move;
@@ -874,6 +877,7 @@ _elm_win_move(Ecore_Evas *ee)
efl_event_callback_legacy_call(sd->obj, EFL_GFX_EVENT_MOVE, NULL);
evas_nochange_push(evas_object_evas_get(sd->obj));
sd->response++;
+   sd->req_xy = EINA_FALSE;
evas_object_move(sd->obj, x, y);
sd->response--;
evas_nochange_pop(evas_object_evas_get(sd->obj));
@@ -915,6 +919,7 @@ _elm_win_resize_job(void *data)
  }
 
sd->response++;
+   sd->req_wh = EINA_FALSE;
evas_object_resize(sd->obj, w, h);
evas_object_resize(sd->legacy.edje, w, h);
sd->response--;
@@ -2899,7 +2904,13 @@ _efl_ui_win_efl_gfx_position_set(Eo *obj, 
Efl_Ui_Win_Data *sd, Evas_Coord x, Eva
  }
else
  {
-if (!sd->response) TRAP(sd, move, x, y);
+if (!sd->response)
+  {
+ sd->req_xy = EINA_TRUE;
+ sd->req_x = x;
+ sd->req_y = y;
+ TRAP(sd, move, x, y);
+  }
 if (!ecore_evas_override_get(sd->ee)) goto super_skip;
  }
 
@@ -2959,7 +2970,13 @@ _efl_ui_win_efl_gfx_size_set(Eo *obj, Efl_Ui_Win_Data 
*sd, Evas_Coord w, Evas_Co
  }
 
_elm_win_frame_geometry_adjust(sd);
-   if (!sd->response) TRAP(sd, resize, w, h);
+   if (!sd->response)
+ {
+sd->req_wh = EINA_TRUE;
+sd->req_w = w;
+sd->req_h = h;
+TRAP(sd, resize, w, h);
+ }
 
efl_gfx_size_set(efl_super(obj, MY_CLASS), w, h);
 }
@@ -3444,11 

[EGIT] [core/efl] master 01/01: tests: win_dialog: remove unused variable

2017-05-12 Thread Stefan Schmidt
stefan pushed a commit to branch master.

http://git.enlightenment.org/core/efl.git/commit/?id=a3bd46d99fd1469de6962a376ea19e62e74807fb

commit a3bd46d99fd1469de6962a376ea19e62e74807fb
Author: Stefan Schmidt 
Date:   Fri May 12 13:21:24 2017 +0200

tests: win_dialog: remove unused variable
---
 src/bin/elementary/test_win_dialog.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/bin/elementary/test_win_dialog.c 
b/src/bin/elementary/test_win_dialog.c
index b90dfc6..ba299b7 100644
--- a/src/bin/elementary/test_win_dialog.c
+++ b/src/bin/elementary/test_win_dialog.c
@@ -100,9 +100,9 @@ _bt3_clicked_cb(void *data, Evas_Object *obj EINA_UNUSED, 
void *event_info EINA_
 }
 
 static void
-_bt4_clicked_cb(void *data, Evas_Object *obj EINA_UNUSED, void *event_info 
EINA_UNUSED)
+_bt4_clicked_cb(void *data EINA_UNUSED, Evas_Object *obj EINA_UNUSED, void 
*event_info EINA_UNUSED)
 {
-   Efl_Canvas_Object *dia, *lb, *parent = data;
+   Efl_Canvas_Object *dia, *lb;
 
dia = efl_add(EFL_UI_WIN_STANDARD_CLASS, NULL,
  efl_ui_win_type_set(efl_added, EFL_UI_WIN_DIALOG_BASIC),

-- 




[E-devel] Upcoming efl 1.19.1 release

2017-05-12 Thread Stefan Schmidt
Hello.

Its a month 1.19 is out now and we have some patches already backported 
into the efl-1.19 branch. Time to make a first stable update release for 
this branch.

If you have anything else pending for a backport please do so until 
Wednesday evening in your timezone. I will prepare pre-release tarballs 
on Thursday and if nothing comes up do the final release on Friday.

regards
Stefan Schmidt

--
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
___
enlightenment-devel mailing list
enlightenment-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/enlightenment-devel


Re: [E-devel] Can I use enlightenment on the kernel 4.11?

2017-05-12 Thread The Rasterman
On Fri, 12 May 2017 11:45:01 +0200 PaulTT  said:

> on one of failed logins, auth.log says this:
> 
> May  9 19:02:35 cadbane unix_chkpwd[3773]: check pass; user unknown
> May  9 19:02:35 cadbane unix_chkpwd[3773]: password check failed for user
> (ptt)
> May  9 19:02:35 cadbane enlightenment: pam_unix(login:auth): authentication
> failure; logname= uid=1000 euid=1000 tty= ruser= rhost=localhost  user=ptt
> 
> unfortunately i really can't reboot the machine now...
> 
> could it be something related to libinput versus evdev driver in X (or wl)?

well as i said - if this is e's desklock -it'sd using pam to auth and pam will
exec a setuid root util as one of its modules to do the shadow passwd auth...
if setuid doesn't work then obviously pam will fail here.

> On Fri, May 12, 2017 at 10:58 AM, PaulTT  wrote:
> 
> > obviously, i compile it ;)
> > packaged ones are full of crap, and even so, i need a couple of patches
> > for my setup
> > and then, i can also choose when upgrade or not...
> >
> > my 3 ¢ ;P
> >
> >
> > On Thu, May 11, 2017 at 2:16 PM, Al Poole  wrote:
> >
> >> Are you compiling your own kernels???
> >>
> >> If so, maybe you could talk to someone that packages up kernels for ideas?
> >>
> >> Personally, I wouldn't advise building any kernel from source unless
> >> you're
> >> testing new features or building one for an embedded system...two pence
> >> for
> >> you!
> >>
> >> On Thu, May 11, 2017 at 1:07 PM, Florian Schaefer 
> >> wrote:
> >>
> >> >
> >> > On 11.05.2017 12:33, Carsten Haitzler (The Rasterman) wrote:
> >> > > On Wed, 10 May 2017 09:48:19 +0200 PaulTT  said:
> >> > >
> >> > >> i just posted a message about this... (sorry, i've seen now this
> >> thread)
> >> > >>
> >> > >> as i said there, there's also a problem with unlocking (so, pam
> >> > related, i
> >> > >> assume ?)
> >> > >> via console su and sudo worked like a charm (i've got error messages
> >> > about
> >> > >> cpufreq and backlight too)
> >> > >
> >> > > pam would be executing a setuid root binary to do the password
> >> check...
> >> > so it's
> >> > > the same issue. something has decided that e and app processes below
> >> it
> >> > in the
> >> > > process tree "cant run setuid (root) binaries" and has disabled that
> >> > feature.
> >> > > that feature seems to only kick in with 4.11 kernel. it certainly is
> >> not
> >> > e
> >> > > doing this. it has relied on this working for many years. it's
> >> something
> >> > new
> >> > > security-wise that is being enabled by a new kernel.
> >> > >
> >> > > maybe some parent process is using setpriv? CAP_SETUID  disabled? man
> >> > > capabilities ... for info ... maybe run captest ?
> >> > >e
> >> > > 12:20PM ~ > captest
> >> > > User  credentials uid:1000 euid:1000 suid:1000
> >> > > Group credentials gid:1000 egid:1000 sgid:1000
> >> > > Current capabilities: none
> >> > > securebits flags: none
> >> > > Attempting direct access to shadow...FAILED (Permission denied)
> >> > > Attempting to access shadow by child process...FAILED
> >> > > Child User  credentials uid:1000 euid:1000 suid:1000
> >> > > Child Group credentials gid:1000 egid:1000 sgid:1000
> >> > > Child capabilities: none
> >> > > Child securebits flags: none
> >> > >
> >> > > is what i get. which is normal.
> >> >
> >> > I get the same as you on my system here:
> >> >
> >> > florian@washu:~ # uname -a
> >> > Linux washu 4.11.0 #2 SMP PREEMPT Tue May 2 12:12:51 JST 2017 i686
> >> > GNU/Linux
> >> > florian@washu:~ # captest
> >> > User  credentials uid:500 euid:500 suid:500
> >> > Group credentials gid:100 egid:100 sgid:100
> >> > Current capabilities: none
> >> > securebits flags: none
> >> > Attempting direct access to shadow...FAILED (Permission denied)
> >> > Attempting to access shadow by child process...FAILED
> >> > Child User  credentials uid:500 euid:500 suid:500
> >> > Child Group credentials gid:100 egid:100 sgid:100
> >> > Child capabilities: none
> >> > Child securebits flags: none
> >> >
> >> > Cheers,
> >> > Florian
> >> >
> >> > >> could the problem be related to some new sh**y systemd operation
> >> > >> i saw that also using wayland, i coulnd't access halt/reboot/suspend
> >> > menu
> >> > >> items too (this happens to me also with previous kernels)
> >> > >
> >> > > works for me with enlightenment + wl + arch (+systemd)... i can do all
> >> > the
> >> > > power off etc. stuff...
> >> > >
> >> > >> On Thu, May 4, 2017 at 6:19 AM, Carsten Haitzler <
> >> ras...@rasterman.com>
> >> > >> wrote:
> >> > >>
> >> > >>> On Thu, 04 May 2017 11:09:13 +0900  said:
> >> > >>>
> >> >  Hi,
> >> > 
> >> >  Carsten Haitzler (The Rasterman)  wrote:
> >> > 
> >> > > On Wed, 3 May 2017 12:09:21 +0900 Florian Schaefer <
> >> > list...@netego.de>
> >> > >>> said:
> >> > 
> >> > >> Hi!
> >> > >>
> >> > >> On 03.05.2017 10:04, Carsten Haitzler (The Rasterman) wrote:
> >> > >>> On Tue, 02 May 2017 21:16:40 +0900 fulwood...@gmail.com said:
> >> > >>>
> >> >  H

Re: [E-devel] Can I use enlightenment on the kernel 4.11?

2017-05-12 Thread Florian Schaefer
On 12.05.2017 18:28, Carsten Haitzler (The Rasterman) wrote:
> On Fri, 12 May 2017 10:41:30 +0900 Florian Schaefer  said:
> 
>> On 11.05.2017 22:12, Carsten Haitzler (The Rasterman) wrote:
>>> On Thu, 11 May 2017 21:07:20 +0900 Florian Schaefer 
>>> said:
>>>

 On 11.05.2017 12:33, Carsten Haitzler (The Rasterman) wrote:
> On Wed, 10 May 2017 09:48:19 +0200 PaulTT  said:
>
>> i just posted a message about this... (sorry, i've seen now this thread)
>>
>> as i said there, there's also a problem with unlocking (so, pam related,
>> i assume ?)
>> via console su and sudo worked like a charm (i've got error messages
>> about cpufreq and backlight too)
>
> pam would be executing a setuid root binary to do the password check... so
> it's the same issue. something has decided that e and app processes below
> it in the process tree "cant run setuid (root) binaries" and has disabled
> that feature. that feature seems to only kick in with 4.11 kernel. it
> certainly is not e doing this. it has relied on this working for many
> years. it's something new security-wise that is being enabled by a new
> kernel.
>
> maybe some parent process is using setpriv? CAP_SETUID  disabled? man
> capabilities ... for info ... maybe run captest ?
> e
> 12:20PM ~ > captest
> User  credentials uid:1000 euid:1000 suid:1000
> Group credentials gid:1000 egid:1000 sgid:1000
> Current capabilities: none
> securebits flags: none
> Attempting direct access to shadow...FAILED (Permission denied)
> Attempting to access shadow by child process...FAILED
> Child User  credentials uid:1000 euid:1000 suid:1000
> Child Group credentials gid:1000 egid:1000 sgid:1000
> Child capabilities: none
> Child securebits flags: none
>
> is what i get. which is normal.

 I get the same as you on my system here:

 florian@washu:~ # uname -a
 Linux washu 4.11.0 #2 SMP PREEMPT Tue May 2 12:12:51 JST 2017 i686
 GNU/Linux florian@washu:~ # captest
 User  credentials uid:500 euid:500 suid:500
 Group credentials gid:100 egid:100 sgid:100
 Current capabilities: none
 securebits flags: none
 Attempting direct access to shadow...FAILED (Permission denied)
 Attempting to access shadow by child process...FAILED
 Child User  credentials uid:500 euid:500 suid:500
 Child Group credentials gid:100 egid:100 sgid:100
 Child capabilities: none
 Child securebits flags: none
>>>
>>> try capsh --print
>>> ?
>>> Current: =
>>> Bounding set
>>> =cap_chown,cap_dac_override,cap_dac_read_search,cap_fowner,cap_fsetid,cap_kill,cap_setgid,cap_setuid,cap_setpcap,cap_linux_immutable,cap_net_bind_service,cap_net_broadcast,cap_net_admin,cap_net_raw,cap_ipc_lock,cap_ipc_owner,cap_sys_module,cap_sys_rawio,cap_sys_chroot,cap_sys_ptrace,cap_sys_pacct,cap_sys_admin,cap_sys_boot,cap_sys_nice,cap_sys_resource,cap_sys_time,cap_sys_tty_config,cap_mknod,cap_lease,cap_audit_write,cap_audit_control,cap_setfcap,cap_mac_override,cap_mac_admin,cap_syslog,cap_wake_alarm,cap_block_suspend,cap_audit_read
>>> Securebits: 00/0x0/1'b0 secure-noroot: no (unlocked)
>>>  secure-no-suid-fixup: no (unlocked)
>>>  secure-keep-caps: no (unlocked)
>>> uid=1000(raster)
>>> gid=1000(raster)
>>> groups=5(tty),6(disk),7(lp),10(wheel),50(games),78(kvm),90(network),91
>>> (video),92 (audio),93(optical),94(floppy),95(storage),96(scanner),98
>>> (power),100(users),492 (oprofile),1000(raster)
>>
>> Oh, that's a nice command. :-)
>>
>> florian@washu:~ # /sbin/capsh --print
>> Current: =
>> Bounding set
>> =cap_chown,cap_dac_override,cap_dac_read_search,cap_fowner,cap_fsetid,cap_kill,cap_setgid,cap_setuid,cap_setpcap,cap_linux_immutable,cap_net_bind_service,cap_net_broadcast,cap_net_admin,cap_net_raw,cap_ipc_lock,cap_ipc_owner,cap_sys_module,cap_sys_rawio,cap_sys_chroot,cap_sys_ptrace,cap_sys_pacct,cap_sys_admin,cap_sys_boot,cap_sys_nice,cap_sys_resource,cap_sys_time,cap_sys_tty_config,cap_mknod,cap_lease,cap_audit_write,cap_audit_control,cap_setfcap,cap_mac_override,cap_mac_admin,cap_syslog,cap_wake_alarm,cap_block_suspend,cap_audit_read
>> Securebits: 00/0x0/1'b0
>>  secure-noroot: no (unlocked)
>>  secure-no-suid-fixup: no (unlocked)
>>  secure-keep-caps: no (unlocked)
>> uid=500(florian)
>> gid=100(users)
>> groups=20(dialout),24(cdrom),25(floppy),29(audio),30(dip),44(video),46
>> (plugdev),100(users),106(camera),108(netdev),119(systemd-journal)
>>
>> It seems that I have cap_setuid. That's good, right?
> 
> yes you do... then that's odd. capabilities at least SAY they are allowing
> setuid... you are running this under e in some terminal... right?

Yes. This is the output captured from terminology. The same terminology
that later won't be able to exec setuid stuff...

Cheers,
Florian

--
Check out the vibrant tech community on one of the world's most
engag

Re: [E-devel] Can I use enlightenment on the kernel 4.11?

2017-05-12 Thread Florian Schaefer
On 12.05.2017 18:26, Carsten Haitzler (The Rasterman) wrote:
> On Fri, 12 May 2017 10:58:48 +0200 PaulTT  said:
> 
>> obviously, i compile it ;)
>> packaged ones are full of crap, and even so, i need a couple of patches for
>> my setup
>> and then, i can also choose when upgrade or not...
> 
> oh interesting. we're 2 for 2 on "4.11 kernel + sudo doesnt work in e and
> below" for people who hand compile their own kernels...
> 
> is there an option where the packaged kernels ensure things work? or a patch?
> or...
> 
> at least so far in our massive sample size of 2... both compile their own
> kernels... :)

That is very interesting indeed. Therefore I asked for people to raise
hands that are using (packaged) 4.11 kernels without trouble. Till now I
have not yet actually seen this confirmation here.

Cheers,
Florian

>> my 3 ¢ ;P
>>
>>
>> On Thu, May 11, 2017 at 2:16 PM, Al Poole  wrote:
>>
>>> Are you compiling your own kernels???
>>>
>>> If so, maybe you could talk to someone that packages up kernels for ideas?
>>>
>>> Personally, I wouldn't advise building any kernel from source unless you're
>>> testing new features or building one for an embedded system...two pence for
>>> you!
>>>
>>> On Thu, May 11, 2017 at 1:07 PM, Florian Schaefer 
>>> wrote:
>>>

 On 11.05.2017 12:33, Carsten Haitzler (The Rasterman) wrote:
> On Wed, 10 May 2017 09:48:19 +0200 PaulTT  said:
>
>> i just posted a message about this... (sorry, i've seen now this
>>> thread)
>>
>> as i said there, there's also a problem with unlocking (so, pam
 related, i
>> assume ?)
>> via console su and sudo worked like a charm (i've got error messages
 about
>> cpufreq and backlight too)
>
> pam would be executing a setuid root binary to do the password check...
 so it's
> the same issue. something has decided that e and app processes below it
 in the
> process tree "cant run setuid (root) binaries" and has disabled that
 feature.
> that feature seems to only kick in with 4.11 kernel. it certainly is
>>> not
 e
> doing this. it has relied on this working for many years. it's
>>> something
 new
> security-wise that is being enabled by a new kernel.
>
> maybe some parent process is using setpriv? CAP_SETUID  disabled? man
> capabilities ... for info ... maybe run captest ?
> e
> 12:20PM ~ > captest
> User  credentials uid:1000 euid:1000 suid:1000
> Group credentials gid:1000 egid:1000 sgid:1000
> Current capabilities: none
> securebits flags: none
> Attempting direct access to shadow...FAILED (Permission denied)
> Attempting to access shadow by child process...FAILED
> Child User  credentials uid:1000 euid:1000 suid:1000
> Child Group credentials gid:1000 egid:1000 sgid:1000
> Child capabilities: none
> Child securebits flags: none
>
> is what i get. which is normal.

 I get the same as you on my system here:

 florian@washu:~ # uname -a
 Linux washu 4.11.0 #2 SMP PREEMPT Tue May 2 12:12:51 JST 2017 i686
 GNU/Linux
 florian@washu:~ # captest
 User  credentials uid:500 euid:500 suid:500
 Group credentials gid:100 egid:100 sgid:100
 Current capabilities: none
 securebits flags: none
 Attempting direct access to shadow...FAILED (Permission denied)
 Attempting to access shadow by child process...FAILED
 Child User  credentials uid:500 euid:500 suid:500
 Child Group credentials gid:100 egid:100 sgid:100
 Child capabilities: none
 Child securebits flags: none

 Cheers,
 Florian

>> could the problem be related to some new sh**y systemd operation
>> i saw that also using wayland, i coulnd't access halt/reboot/suspend
 menu
>> items too (this happens to me also with previous kernels)
>
> works for me with enlightenment + wl + arch (+systemd)... i can do all
 the
> power off etc. stuff...
>
>> On Thu, May 4, 2017 at 6:19 AM, Carsten Haitzler <
>>> ras...@rasterman.com>
>> wrote:
>>
>>> On Thu, 04 May 2017 11:09:13 +0900  said:
>>>
 Hi,

 Carsten Haitzler (The Rasterman)  wrote:

> On Wed, 3 May 2017 12:09:21 +0900 Florian Schaefer <
 list...@netego.de>
>>> said:

>> Hi!
>>
>> On 03.05.2017 10:04, Carsten Haitzler (The Rasterman) wrote:
>>> On Tue, 02 May 2017 21:16:40 +0900 fulwood...@gmail.com said:
>>>
 Hi,

 I got the source of kernel 4.11, then comipled, and check the
 behaviour of enlightenment (efl 1.18.1, enlightment 0.21.7).

 At the start up of enlightenment, I got an error message;

  There was an error trying to set the cpu power state setting
>>> via
>>> the
  module's setfreq utility.

 On the kernel 4.10.x, I never 

[EGIT] [core/enlightenment] master 01/01: Backlight Gadget: Properly set on hold events.

2017-05-12 Thread Stephen 'Okra' Houston
okra pushed a commit to branch master.

http://git.enlightenment.org/core/enlightenment.git/commit/?id=ac2c9a220fd45ba2dac1efa2e3b58190b57200e2

commit ac2c9a220fd45ba2dac1efa2e3b58190b57200e2
Author: Stephen 'Okra' Houston 
Date:   Fri May 12 09:57:48 2017 -0500

Backlight Gadget: Properly set on hold events.
---
 src/modules/backlight/gadget/backlight.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/src/modules/backlight/gadget/backlight.c 
b/src/modules/backlight/gadget/backlight.c
index 3f49fd7..1756a70 100644
--- a/src/modules/backlight/gadget/backlight.c
+++ b/src/modules/backlight/gadget/backlight.c
@@ -129,6 +129,8 @@ _backlight_cb_mouse_down(void *data, Evas *evas 
EINA_UNUSED, Evas_Object *obj EI
Instance *inst = data;
Evas_Event_Mouse_Down *ev = event;
 
+   if (ev->event_flags & EVAS_EVENT_FLAG_ON_HOLD) return;
+
if (ev->button == 1)
  {
 if (inst->popup) elm_ctxpopup_dismiss(inst->popup);
@@ -136,6 +138,7 @@ _backlight_cb_mouse_down(void *data, Evas *evas 
EINA_UNUSED, Evas_Object *obj EI
  }
else if (ev->button == 3)
  {
+ev->event_flags |= EVAS_EVENT_FLAG_ON_HOLD;
 e_gadget_configure(inst->o_main);
  }
 }

-- 




[EGIT] [tools/eflete] master 03/03: theme: remove unused data item

2017-05-12 Thread Tetiana Naumenko
rimmed pushed a commit to branch master.

http://git.enlightenment.org/tools/eflete.git/commit/?id=2b24f20ba66b494852482dc269c398bd457e3c72

commit 2b24f20ba66b494852482dc269c398bd457e3c72
Author: Tetiana Naumenko 
Date:   Fri May 12 12:23:37 2017 +0300

theme: remove unused data item

Fileselector uses this data from fileselector style, not from entry
style.

Change-Id: If118fbd567db9421e2bf066428d4b40a8fc9e104
---
 data/themes/default/widgets/entry.edc | 1 -
 1 file changed, 1 deletion(-)

diff --git a/data/themes/default/widgets/entry.edc 
b/data/themes/default/widgets/entry.edc
index d428319..e78f10e 100644
--- a/data/themes/default/widgets/entry.edc
+++ b/data/themes/default/widgets/entry.edc
@@ -1332,7 +1332,6 @@ group { name: "elm/entry/path/separator/default";
 group { name: "elm/entry/base-single/fileselector/default";
inherit: "elm/entry/base-single/default";
alias: "elm/entry/base-single/fileselector/extended";
-   data.item: "path_separator" "";
parts {
   part { name: "elm.text";
  description { state: "default" 0.0;

-- 




[EGIT] [tools/eflete] master 02/03: theme: made file path in fileselector scalable

2017-05-12 Thread Tetiana Naumenko
rimmed pushed a commit to branch master.

http://git.enlightenment.org/tools/eflete.git/commit/?id=a78eb262bce4ad14aaaeb785f2e43efd2f96a178

commit a78eb262bce4ad14aaaeb785f2e43efd2f96a178
Author: Tetiana Naumenko 
Date:   Fri May 12 12:06:10 2017 +0300

theme: made file path in fileselector scalable

Change-Id: I1aa059d65b69de34f346d5093b5a05e105baf5fb
---
 data/themes/default/widgets/entry.edc| 49 ++--
 data/themes/default/widgets/fileselector.edc |  2 +-
 2 files changed, 47 insertions(+), 4 deletions(-)

diff --git a/data/themes/default/widgets/entry.edc 
b/data/themes/default/widgets/entry.edc
index 80d3e36..d428319 100644
--- a/data/themes/default/widgets/entry.edc
+++ b/data/themes/default/widgets/entry.edc
@@ -1303,12 +1303,28 @@ group { name: "elm/entry/path/separator/default";
images.image: "entry-fileselector-separator.png" COMP;
parts {
   image { "icon"; nomouse;
+ scale: 1;
  desc { "default";
 image.normal: "entry-fileselector-separator.png";
+fill.smooth: 0;
+align: 1.0 0.5;
 min: 3 17;
 max: 3 17;
 fixed: 1 1;
-rel1.offset: 3 0;
+rel2 {
+   relative: 0.0 1.0;
+   to_x: "path_space";
+}
+ }
+  }
+  part { name: "path_space";
+ type: SPACER;
+ scale: 1;
+ description { state: "default" 0.0;
+align: 1.0 0.5;
+fixed: 1 1;
+min: 5 17;
+max: 5 17;
  }
   }
}
@@ -1362,17 +1378,44 @@ group { name: "elm/entry/anchor/default";
   image: "entry-fileselector-href.png" COMP;
}
parts {
+  part { name: "left_space";
+ type: SPACER;
+ scale: 1;
+ description { state: "default" 0.0;
+fixed: 1 1;
+min: 5 17;
+max: 5 17;
+align: 1.0 0.5;
+rel1.relative: -1.0 0.0;
+rel2.relative: 0.0 1.0;
+ }
+  }
+  part { name: "right_space";
+ type: SPACER;
+ scale: 1;
+ description { state: "default" 0.0;
+fixed: 1 1;
+min: 12 17;
+max: 12 17;
+align: 0.0 0.5;
+rel1.relative: 1.0 0.0;
+rel2.relative: 2.0 1.0;
+ }
+  }
   part { name: "bg";
  type: IMAGE;
+ scale: 1;
  mouse_events: 0;
  description { state: "default" 0.0;
 image.normal: "entry-fileselector-href.png";
 image.border: 0 4 0 0;
+image.border_scale: 1;
+fill.smooth: 0;
 min: 4 17;
 max: -1 17;
 fixed: 0 1;
-rel1.offset: -6 0;
-rel2.offset: 10 -1;
+rel1.to: "left_space";
+rel2.to: "right_space";
  }
   }
}
diff --git a/data/themes/default/widgets/fileselector.edc 
b/data/themes/default/widgets/fileselector.edc
index 6e50f15..614972f 100644
--- a/data/themes/default/widgets/fileselector.edc
+++ b/data/themes/default/widgets/fileselector.edc
@@ -221,7 +221,7 @@ group { name: "elm/fileselector/base/default";
 
 group { name: "elm/fileselector/base/extended";
data {
-  item: "path_separator" "";
+  item: "path_separator" "";
}
parts {
   part { name: "elm.swallow.up";

-- 




[EGIT] [tools/eflete] master 01/03: theme: made fileselector scalable

2017-05-12 Thread Tetiana Naumenko
rimmed pushed a commit to branch master.

http://git.enlightenment.org/tools/eflete.git/commit/?id=350dd8b9bfea63f6f3795b9626c0767022282147

commit 350dd8b9bfea63f6f3795b9626c0767022282147
Author: Tetiana Naumenko 
Date:   Wed May 10 16:53:53 2017 +0300

theme: made fileselector scalable

Change-Id: I158e2a992fc4130ffbde9a06108d4e1c7774a642
---
 data/themes/default/widgets/fileselector.edc | 26 ++
 1 file changed, 26 insertions(+)

diff --git a/data/themes/default/widgets/fileselector.edc 
b/data/themes/default/widgets/fileselector.edc
index a9b4447..6e50f15 100644
--- a/data/themes/default/widgets/fileselector.edc
+++ b/data/themes/default/widgets/fileselector.edc
@@ -5,6 +5,7 @@ group { name: "elm/fileselector/base/default";
parts {
   part { name: "elm.swallow.up";
  type: SWALLOW;
+ scale: 1;
  description { state: "default" 0.0;
 align: 0.0 0.0;
 fixed: 1 1;
@@ -16,6 +17,7 @@ group { name: "elm/fileselector/base/default";
   }
   part { name: "elm.swallow.home";
  type: SWALLOW;
+ scale: 1;
  description { state: "default" 0.0;
 align: 0.0 0.0;
 fixed: 1 1;
@@ -33,6 +35,7 @@ group { name: "elm/fileselector/base/default";
   }
   part { name: "elm.swallow.search";
  type: SWALLOW;
+ scale: 1;
  description { state: "default" 0.0;
 align: 0.0 0.5;
 fixed: 1 1;
@@ -49,6 +52,7 @@ group { name: "elm/fileselector/base/default";
   }
   part { name: "elm.spinner.clip";
  type: RECT;
+ scale: 1;
  description { state: "default" 0.0;
 color: 255 255 255 0;
 rel1 {
@@ -69,6 +73,7 @@ group { name: "elm/fileselector/base/default";
   }
   part { name: "elm.swallow.files";
  type: SWALLOW;
+ scale: 1;
  description { state: "default" 0.0;
 align: 1.0 0.0;
 min: 10 10;
@@ -86,6 +91,7 @@ group { name: "elm/fileselector/base/default";
   }
   part { name: "elm.swallow.path";
  type: SWALLOW;
+ scale: 1;
  description { state: "default" 0.0;
 align: 0.5 1.0;
 fixed: 1 1;
@@ -102,6 +108,7 @@ group { name: "elm/fileselector/base/default";
   }
   part { name: "elm.swallow.filename";
  type: SWALLOW;
+ scale: 1;
  description { state: "default" 0.0;
 align: 0.5 1.0;
 fixed: 1 1;
@@ -118,6 +125,7 @@ group { name: "elm/fileselector/base/default";
   }
   part { name: "separator";
  type: IMAGE;
+ scale: 1;
  description { state: "default" 0.0;
 align: 0.5 1.0;
 min: 0 2;
@@ -135,6 +143,7 @@ group { name: "elm/fileselector/base/default";
   }
   part { name: "elm.swallow.filters";
  type: SWALLOW;
+ scale: 1;
  description { state: "default" 0.0;
 min: 74 0;
 align: 1.0 1.0;
@@ -151,6 +160,7 @@ group { name: "elm/fileselector/base/default";
   }
   part { name: "elm.swallow.cancel";
  type: SWALLOW;
+ scale: 1;
  description { state: "default" 0.0;
 min: 63 0;
 align: 1.0 1.0;
@@ -167,6 +177,7 @@ group { name: "elm/fileselector/base/default";
   }
   part { name: "elm.swallow.ok";
  type: SWALLOW;
+ scale: 1;
  description { state: "default" 0.0;
 min: 42 0;
 align: 1.0 1.0;
@@ -178,6 +189,7 @@ group { name: "elm/fileselector/base/default";
   }
   part { name: "elm.swallow.spinner";
  type: SWALLOW;
+ scale: 1;
  clip_to: "elm.spinner.clip";
  description { state: "default" 0.0;
 rel1 {
@@ -214,6 +226,7 @@ group { name: "elm/fileselector/base/extended";
parts {
   part { name: "elm.swallow.up";
  type: SWALLOW;
+ scale: 1;
  description { state: "default" 0.00;
 align: 0.00 0.00;
 fixed: 1 1;
@@ -223,6 +236,7 @@ group { name: "elm/fileselector/base/extended";
   }
   part { name: "elm.swallow.home";
  type: SWALLOW;
+ scale: 1;
  description { state: "default" 0.00;
 align: 0.00 0.00;
 fixed: 1 1;
@@ -240,6 +254,7 @@ group { name: "elm/fileselector/base/extended";
   }
   part { name: "elm.swallow.search";
  type: SWALLOW;
+ scale: 1;
  description { state: "default" 0.00;
 align: 0.00 0.50;
 fixed: 1 1;
@@ -259,6 +274,7 @@ group { name: "elm/fileselector/base/extended";
   }
   part { name: "elm.spinner.clip";
  type: RECT;
+ scale: 1;
  description { state: "default" 0.00;
 color: 255 255 255 0;
 rel1.to: "elm.swallow.spinner";
@@ -271,6 +287,7 @@ group { name: "elm/fileselector/base/extended";
   }
   

Re: [E-devel] Taking over as maintainer of ecrire

2017-05-12 Thread William L. Thomson Jr.
On Wed, 10 May 2017 15:37:57 -0400
"William L. Thomson Jr."  wrote:

> That is what I am used to from when I was a Gentoo developer years
> ago. Once you get commit access, it is unrestricted. It is expected
> to be respectful. If you touch another's stuff get permission etc.

Kind of funny to mention this and the timing. This is just an example it
is minor. But does give me a bit of concern about working in shared
repositories without checking with each other.

A user reported a known issue with ecrire under Wayland on IRC. I have
it on the Readme[1], and its an open issue[2]. Which I would think
anyone running into such, or looking to address would take the time to
look for such. Rather than any of that, sadly Raster went and commented
out the code. In the inactive repo.
https://git.enlightenment.org/apps/ecrire.git/commit/?id=20983dc2a2c737620c7aaf8f45d47d5e84e71334

I had just last night merged my branch into master on my Github
mirror/clone to prepare to sync the Englightenment ecrire git repo with
my Github one. This commit will cause issues for that merge. It can be
reverted/fixed. Without such merging my changes will be difficult as
that effects the very base. All my work was based off the commit before
the one raster just did. That commit will effect my changes to that
file and make merging difficult. Really best for no commits to be made
till my work was merged back in.

This is not really a quick fix and I have been spending time on the
matter. There is an open task which is related[3]. That one references
an older for the exact same code and purposes opened by Tom.

I had already coded a more proper fix that has the same effect of
commenting out the code by not enabling a IF DEFINE condition.

cmake -Dwayland=true .

At least that does not remove the function from ecore x and wayland.
Commenting out code removes from both. If my solution was not good,
commenting out the code is worse.

Anyway it is minor. This is intended to be a community project. With
others collaborating, etc. Though still has to be some coordination or
checking with each other before proceeding with commits that may cause
issues, additional time, work, etc for another.

1. https://github.com/Obsidian-StudiosInc/ecrire
2. https://github.com/Obsidian-StudiosInc/ecrire/issues/2
3. https://phab.enlightenment.org/T5476

-- 
William L. Thomson Jr.


pgp2WHJPVhz3q.pgp
Description: OpenPGP digital signature
--
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot___
enlightenment-devel mailing list
enlightenment-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/enlightenment-devel


[EGIT] [core/enlightenment] master 02/06: remove check for desklock in comp object autoclose handler

2017-05-12 Thread Mike Blumenkrantz
discomfitor pushed a commit to branch master.

http://git.enlightenment.org/core/enlightenment.git/commit/?id=effbb8172247a873aa3c99ff8c1b5a5f1a3d9619

commit effbb8172247a873aa3c99ff8c1b5a5f1a3d9619
Author: Mike Blumenkrantz 
Date:   Fri May 12 12:09:18 2017 -0400

remove check for desklock in comp object autoclose handler
---
 src/bin/e_comp_object.c | 1 -
 1 file changed, 1 deletion(-)

diff --git a/src/bin/e_comp_object.c b/src/bin/e_comp_object.c
index 10d82e0..ff64040 100644
--- a/src/bin/e_comp_object.c
+++ b/src/bin/e_comp_object.c
@@ -4410,7 +4410,6 @@ _e_comp_object_autoclose_key_down_cb(void *data 
EINA_UNUSED, int type EINA_UNUSE
Ecore_Event_Key *ev = event;
Eina_Bool del = EINA_TRUE;
 
-   if (e_desklock_state_get()) return ECORE_CALLBACK_RENEW;
/* returning false in key_cb means delete the object */
if (e_comp->autoclose.key_cb)
  del = !e_comp->autoclose.key_cb(e_comp->autoclose.data, ev);

-- 




[EGIT] [core/enlightenment] master 06/06: don't dup fds during xwl bridged selection transfer, this happens in libwayland

2017-05-12 Thread Mike Blumenkrantz
discomfitor pushed a commit to branch master.

http://git.enlightenment.org/core/enlightenment.git/commit/?id=e110f912e213f12c73bee0fa31b018b48586e862

commit e110f912e213f12c73bee0fa31b018b48586e862
Author: Mike Blumenkrantz 
Date:   Fri May 12 12:09:18 2017 -0400

don't dup fds during xwl bridged selection transfer, this happens in 
libwayland
---
 src/modules/xwayland/dnd.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/modules/xwayland/dnd.c b/src/modules/xwayland/dnd.c
index 47c5d95..5054403 100644
--- a/src/modules/xwayland/dnd.c
+++ b/src/modules/xwayland/dnd.c
@@ -399,7 +399,7 @@ _xwl_selection_request(void *d EINA_UNUSED, int t 
EINA_UNUSED, Ecore_X_Event_Sel
p->fdh = ecore_main_fd_handler_add(fds[0], ECORE_FD_READ, 
_xwl_pipe_read, p, NULL, NULL);
p->win = ev->requestor;
p->source = source;
-   wl_data_source_send_send(source->resource, type, dup(fds[1]));
+   wl_data_source_send_send(source->resource, type, fds[1]);
close(fds[1]);
p->atom = ev->target;
p->selection = ev->selection;

-- 




[EGIT] [core/enlightenment] master 04/06: unset wl button mask when beginning a move/resize operation

2017-05-12 Thread Mike Blumenkrantz
discomfitor pushed a commit to branch master.

http://git.enlightenment.org/core/enlightenment.git/commit/?id=b75f0d2be2c535dae299cb9adb2c685a823d9153

commit b75f0d2be2c535dae299cb9adb2c685a823d9153
Author: Mike Blumenkrantz 
Date:   Fri May 12 12:09:18 2017 -0400

unset wl button mask when beginning a move/resize operation

ensure that clients do not receive a release event for any pressed
buttons
---
 src/bin/e_comp_wl.c | 10 +-
 1 file changed, 9 insertions(+), 1 deletion(-)

diff --git a/src/bin/e_comp_wl.c b/src/bin/e_comp_wl.c
index c8dc63b..b5cd203 100644
--- a/src/bin/e_comp_wl.c
+++ b/src/bin/e_comp_wl.c
@@ -2577,10 +2577,16 @@ _e_comp_wl_client_cb_focus_unset(void *data 
EINA_UNUSED, E_Client *ec)
 }
 
 static void
+_e_comp_wl_client_cb_move_begin(void *data EINA_UNUSED, E_Client *ec 
EINA_UNUSED)
+{
+   e_comp_wl->ptr.button_mask = 0;
+}
+
+static void
 _e_comp_wl_client_cb_resize_begin(void *data EINA_UNUSED, E_Client *ec)
 {
+   e_comp_wl->ptr.button_mask = 0;
if (e_client_has_xwindow(ec)) return;
-
e_comp_wl->resize.edges = 0;
if (ec->keyboard_resizing) return;
switch (ec->resize_mode)
@@ -2907,6 +2913,8 @@ e_comp_wl_init(void)
e_client_hook_add(E_CLIENT_HOOK_FOCUS_UNSET,
  _e_comp_wl_client_cb_focus_unset, NULL);
 
+   e_client_hook_add(E_CLIENT_HOOK_MOVE_BEGIN,
+ _e_comp_wl_client_cb_move_begin, NULL);
e_client_hook_add(E_CLIENT_HOOK_RESIZE_BEGIN,
  _e_comp_wl_client_cb_resize_begin, NULL);
e_client_hook_add(E_CLIENT_HOOK_RESIZE_END,

-- 




[EGIT] [core/efl] master 02/27: elm_cnp: don't explicitly set wl window type when starting drag

2017-05-12 Thread Mike Blumenkrantz
discomfitor pushed a commit to branch master.

http://git.enlightenment.org/core/efl.git/commit/?id=3b51b3047fa25651cb785d1cdec85cdc73c1a186

commit 3b51b3047fa25651cb785d1cdec85cdc73c1a186
Author: Mike Blumenkrantz 
Date:   Fri May 12 12:08:32 2017 -0400

elm_cnp: don't explicitly set wl window type when starting drag

this is no longer necessary
---
 src/lib/elementary/elm_cnp.c | 2 --
 1 file changed, 2 deletions(-)

diff --git a/src/lib/elementary/elm_cnp.c b/src/lib/elementary/elm_cnp.c
index d0e038b..8430108 100644
--- a/src/lib/elementary/elm_cnp.c
+++ b/src/lib/elementary/elm_cnp.c
@@ -3396,8 +3396,6 @@ _wl_elm_drag_start(Evas_Object *obj, Elm_Sel_Format 
format, const char *data,
 
win = elm_win_wl_window_get(dragwin);
 
-   ecore_wl2_window_type_set(win, ECORE_WL2_WINDOW_TYPE_DND);
-
if (createicon)
  {
 Evas_Coord xoff = 0, yoff = 0;

-- 




[EGIT] [core/efl] master 11/27: ecore-wl2: add function for checking if a client connection sync is done

2017-05-12 Thread Mike Blumenkrantz
discomfitor pushed a commit to branch master.

http://git.enlightenment.org/core/efl.git/commit/?id=f32cb9ea00fc8e075ad25097da9f809f347b0d4f

commit f32cb9ea00fc8e075ad25097da9f809f347b0d4f
Author: Mike Blumenkrantz 
Date:   Fri May 12 12:08:32 2017 -0400

ecore-wl2: add function for checking if a client connection sync is done

@feature
---
 src/lib/ecore_wl2/Ecore_Wl2.h | 13 +
 src/lib/ecore_wl2/ecore_wl2_display.c |  7 +++
 2 files changed, 20 insertions(+)

diff --git a/src/lib/ecore_wl2/Ecore_Wl2.h b/src/lib/ecore_wl2/Ecore_Wl2.h
index a395c1e..a1cde06 100644
--- a/src/lib/ecore_wl2/Ecore_Wl2.h
+++ b/src/lib/ecore_wl2/Ecore_Wl2.h
@@ -493,6 +493,19 @@ EAPI Ecore_Wl2_Window 
*ecore_wl2_display_window_find(Ecore_Wl2_Display *display,
 EAPI struct wl_registry *ecore_wl2_display_registry_get(Ecore_Wl2_Display 
*display);
 
 /**
+ * Check if the display has performed a sync
+ *
+ * @param display The display
+ *
+ * @return True if the display sync has occurred
+ * @see ECORE_WL2_EVENT_SYNC_DONE
+ *
+ * @ingroup Ecore_Wl2_Display_Group
+ * @since 1.20
+ */
+EAPI Eina_Bool ecore_wl2_display_sync_is_done(const Ecore_Wl2_Display 
*display);
+
+/**
  * @defgroup Ecore_Wl2_Window_Group Wayland Library Window Functions
  * @ingroup Ecore_Wl2_Group
  *
diff --git a/src/lib/ecore_wl2/ecore_wl2_display.c 
b/src/lib/ecore_wl2/ecore_wl2_display.c
index 53e236a..3a95bb5 100644
--- a/src/lib/ecore_wl2/ecore_wl2_display.c
+++ b/src/lib/ecore_wl2/ecore_wl2_display.c
@@ -945,3 +945,10 @@ ecore_wl2_display_inputs_get(Ecore_Wl2_Display *display)
EINA_SAFETY_ON_NULL_RETURN_VAL(display, NULL);
return eina_inlist_iterator_new(display->inputs);
 }
+
+EAPI Eina_Bool
+ecore_wl2_display_sync_is_done(const Ecore_Wl2_Display *display)
+{
+   EINA_SAFETY_ON_NULL_RETURN_VAL(display, EINA_FALSE);
+   return display->sync_done;
+}

-- 




[EGIT] [core/efl] master 14/27: ecore-wl2: correctly refcount display objects during events

2017-05-12 Thread Mike Blumenkrantz
discomfitor pushed a commit to branch master.

http://git.enlightenment.org/core/efl.git/commit/?id=00da1a771a33736c3443116c7183c4dd0e30fe41

commit 00da1a771a33736c3443116c7183c4dd0e30fe41
Author: Mike Blumenkrantz 
Date:   Fri May 12 12:08:32 2017 -0400

ecore-wl2: correctly refcount display objects during events

ensure lifetime of display object is longer than events in which
the object is passed

@fix
---
 src/lib/ecore_wl2/ecore_wl2_display.c | 15 +--
 src/lib/ecore_wl2/ecore_wl2_private.h |  1 +
 2 files changed, 14 insertions(+), 2 deletions(-)

diff --git a/src/lib/ecore_wl2/ecore_wl2_display.c 
b/src/lib/ecore_wl2/ecore_wl2_display.c
index dbcae6e..ff7506f 100644
--- a/src/lib/ecore_wl2/ecore_wl2_display.c
+++ b/src/lib/ecore_wl2/ecore_wl2_display.c
@@ -13,6 +13,12 @@ static Eina_Bool _cb_connect_idle(void *data);
 static Eina_Bool _cb_connect_data(void *data, Ecore_Fd_Handler *hdl);
 static Eina_Bool _ecore_wl2_display_connect(Ecore_Wl2_Display *ewd, Eina_Bool 
sync);
 
+void
+_display_event_free(void *d, void *event EINA_UNUSED)
+{
+   ecore_wl2_display_disconnect(d);
+}
+
 static void
 _ecore_wl2_display_event(Ecore_Wl2_Display *ewd, int event)
 {
@@ -21,7 +27,8 @@ _ecore_wl2_display_event(Ecore_Wl2_Display *ewd, int event)
ev = calloc(1, sizeof(Ecore_Wl2_Event_Connect));
EINA_SAFETY_ON_NULL_RETURN(ev);
ev->display = ewd;
-   ecore_event_add(event, ev, NULL, NULL);
+   ewd->refs++;
+   ecore_event_add(event, ev, _display_event_free, ewd);
 }
 
 static void
@@ -93,6 +100,7 @@ _cb_global_event_free(void *data EINA_UNUSED, void *event)
 
ev = event;
eina_stringshare_del(ev->interface);
+   ecore_wl2_display_disconnect(ev->display);
free(ev);
 }
 
@@ -192,6 +200,7 @@ event:
 
ev->id = id;
ev->display = ewd;
+   ewd->refs++;
ev->version = version;
ev->interface = eina_stringshare_add(interface);
 
@@ -219,6 +228,7 @@ _cb_global_remove(void *data, struct wl_registry *registry 
EINA_UNUSED, unsigned
 
ev->id = id;
ev->display = ewd;
+   ewd->refs++;
ev->version = global->version;
ev->interface = eina_stringshare_add(global->interface);
 
@@ -511,7 +521,8 @@ _cb_sync_done(void *data, struct wl_callback *cb, uint32_t 
serial EINA_UNUSED)
if (!ev) return;
 
ev->display = ewd;
-   ecore_event_add(ECORE_WL2_EVENT_SYNC_DONE, ev, NULL, NULL);
+   ewd->refs++;
+   ecore_event_add(ECORE_WL2_EVENT_SYNC_DONE, ev, _display_event_free, ewd);
 }
 
 static const struct wl_callback_listener _sync_listener =
diff --git a/src/lib/ecore_wl2/ecore_wl2_private.h 
b/src/lib/ecore_wl2/ecore_wl2_private.h
index 664a6cc..65972fc 100644
--- a/src/lib/ecore_wl2/ecore_wl2_private.h
+++ b/src/lib/ecore_wl2/ecore_wl2_private.h
@@ -451,6 +451,7 @@ typedef struct Ecore_Wl2_Event_Window_WWW_Drag
 } Ecore_Wl2_Event_Window_WWW_Drag;
 
 Ecore_Wl2_Window *_ecore_wl2_display_window_surface_find(Ecore_Wl2_Display 
*display, struct wl_surface *wl_surface);
+void _display_event_free(void *d, void *event EINA_UNUSED);
 
 void _ecore_wl2_output_add(Ecore_Wl2_Display *display, unsigned int id);
 void _ecore_wl2_output_del(Ecore_Wl2_Output *output);

-- 




[EGIT] [core/efl] master 01/27: evas: ensure even no-op renders emit RENDER_PRE

2017-05-12 Thread Mike Blumenkrantz
discomfitor pushed a commit to branch master.

http://git.enlightenment.org/core/efl.git/commit/?id=ef471e4ecae793d9ac55949f627c8e25634ee242

commit ef471e4ecae793d9ac55949f627c8e25634ee242
Author: Mike Blumenkrantz 
Date:   Fri May 12 12:08:32 2017 -0400

evas: ensure even no-op renders emit RENDER_PRE

ref 67fae7aa0fdc9d778e8db88fc49bc149576994d2
---
 src/lib/evas/canvas/evas_render.c | 6 +-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/src/lib/evas/canvas/evas_render.c 
b/src/lib/evas/canvas/evas_render.c
index 7d9a138d..aa99bfe 100644
--- a/src/lib/evas/canvas/evas_render.c
+++ b/src/lib/evas/canvas/evas_render.c
@@ -3079,7 +3079,11 @@ evas_render_updates_internal(Evas *eo_e,
 
e = evas = efl_data_scope_get(eo_e, EVAS_CANVAS_CLASS);
if (e->inside_post_render) return EINA_FALSE;
-   if (!e->changed) goto nothing2render;
+   if (!e->changed)
+ {
+_cb_always_call(eo_e, EVAS_CALLBACK_RENDER_PRE, NULL);
+goto nothing2render;
+ }
 
if (e->rendering)
  {

-- 




[EGIT] [core/efl] master 03/27: elm_entry: request both text and markup when pasting

2017-05-12 Thread Mike Blumenkrantz
discomfitor pushed a commit to branch master.

http://git.enlightenment.org/core/efl.git/commit/?id=0eaa1a3fc2a16584d78155be400c7524992f4fc4

commit 0eaa1a3fc2a16584d78155be400c7524992f4fc4
Author: Mike Blumenkrantz 
Date:   Fri May 12 12:08:32 2017 -0400

elm_entry: request both text and markup when pasting

setting this to only markup means that it's impossible to paste into
an elm_entry from a plaintext app under wayland

@fix
---
 src/lib/elementary/elm_entry.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/lib/elementary/elm_entry.c b/src/lib/elementary/elm_entry.c
index dba796a..8b89481 100644
--- a/src/lib/elementary/elm_entry.c
+++ b/src/lib/elementary/elm_entry.c
@@ -2349,7 +2349,7 @@ _entry_paste_request_signal_cb(void *data,
top = elm_widget_top_get(data);
if ((top) && (elm_win_window_id_get(top)))
  {
-Elm_Sel_Format formats = ELM_SEL_FORMAT_MARKUP;
+Elm_Sel_Format formats = ELM_SEL_FORMAT_MARKUP | ELM_SEL_FORMAT_TEXT;
 
 sd->selection_asked = EINA_TRUE;
 

-- 




[EGIT] [core/efl] master 17/27: ecore-wl2: emit serials in selection-related events

2017-05-12 Thread Mike Blumenkrantz
discomfitor pushed a commit to branch master.

http://git.enlightenment.org/core/efl.git/commit/?id=37ff7b43f11fcbc6859fe45584e34d72a13bef77

commit 37ff7b43f11fcbc6859fe45584e34d72a13bef77
Author: Mike Blumenkrantz 
Date:   Fri May 12 12:08:32 2017 -0400

ecore-wl2: emit serials in selection-related events

these allow apps to match the serial of their selection to the related
event in order to avoid mangling selections from other components
---
 src/lib/ecore_wl2/Ecore_Wl2.h | 2 ++
 src/lib/ecore_wl2/ecore_wl2_dnd.c | 7 ++-
 2 files changed, 8 insertions(+), 1 deletion(-)

diff --git a/src/lib/ecore_wl2/Ecore_Wl2.h b/src/lib/ecore_wl2/Ecore_Wl2.h
index e7e5913..3c8039b 100644
--- a/src/lib/ecore_wl2/Ecore_Wl2.h
+++ b/src/lib/ecore_wl2/Ecore_Wl2.h
@@ -134,6 +134,7 @@ struct _Ecore_Wl2_Event_Data_Source_Event
 {
unsigned int win, source;
Ecore_Wl2_Drag_Action action;
+   uint32_t serial;
 };
 
 typedef struct _Ecore_Wl2_Event_Data_Source_Event 
Ecore_Wl2_Event_Data_Source_End;
@@ -149,6 +150,7 @@ typedef struct _Ecore_Wl2_Event_Data_Source_Send
 {
char *type;
int fd;
+   uint32_t serial;
 } Ecore_Wl2_Event_Data_Source_Send;
 
 typedef struct _Ecore_Wl2_Event_Seat_Name
diff --git a/src/lib/ecore_wl2/ecore_wl2_dnd.c 
b/src/lib/ecore_wl2/ecore_wl2_dnd.c
index 8a4f5df..d86f482 100644
--- a/src/lib/ecore_wl2/ecore_wl2_dnd.c
+++ b/src/lib/ecore_wl2/ecore_wl2_dnd.c
@@ -110,11 +110,12 @@ data_source_send_free(void *data EINA_UNUSED, void *event)
if (!ev) return;
 
free(ev->type);
+   ecore_wl2_display_disconnect(ev->display);
free(ev);
 }
 
 static void
-data_source_send(void *data, struct wl_data_source *source EINA_UNUSED, const 
char *mime_type, int32_t fd)
+data_source_send(void *data, struct wl_data_source *source, const char 
*mime_type, int32_t fd)
 {
Ecore_Wl2_Input *input;
Ecore_Wl2_Event_Data_Source_Send *ev;
@@ -127,6 +128,10 @@ data_source_send(void *data, struct wl_data_source *source 
EINA_UNUSED, const ch
 
ev->fd = fd;
ev->type = strdup(mime_type);
+   if (source == input->data.selection.source)
+ ev->serial = input->data.selection.serial;
+   else
+ ev->serial = input->data.drag.serial;
 
ecore_event_add(ECORE_WL2_EVENT_DATA_SOURCE_SEND, ev,
data_source_send_free, NULL);

-- 




[EGIT] [core/efl] master 26/27: ecore-wl2: add function for setting a drag source's actions without a drag

2017-05-12 Thread Mike Blumenkrantz
discomfitor pushed a commit to branch master.

http://git.enlightenment.org/core/efl.git/commit/?id=8afdbaba48ceaf2605d9034ea732da918ac3d496

commit 8afdbaba48ceaf2605d9034ea732da918ac3d496
Author: Mike Blumenkrantz 
Date:   Fri May 12 12:08:32 2017 -0400

ecore-wl2: add function for setting a drag source's actions without a drag

in some cases it may be desired to have a drag data source without ever
initiating a drag, so ensure that it's possible to set the actions of the
source which will be passed for drag operations in this case

@feature
---
 src/lib/ecore_wl2/Ecore_Wl2.h | 10 ++
 src/lib/ecore_wl2/ecore_wl2_dnd.c | 11 +++
 2 files changed, 21 insertions(+)

diff --git a/src/lib/ecore_wl2/Ecore_Wl2.h b/src/lib/ecore_wl2/Ecore_Wl2.h
index 79cd8e5..e791ef8 100644
--- a/src/lib/ecore_wl2/Ecore_Wl2.h
+++ b/src/lib/ecore_wl2/Ecore_Wl2.h
@@ -1087,6 +1087,16 @@ EAPI void ecore_wl2_dnd_drag_types_set(Ecore_Wl2_Input 
*input, const char **type
 EAPI uint32_t ecore_wl2_dnd_drag_start(Ecore_Wl2_Input *input, 
Ecore_Wl2_Window *window, Ecore_Wl2_Window *drag_window);
 
 /**
+ * Call wl_data_source.set_actions on an existing source
+ *
+ * @param input the input to use
+ *
+ * @see ecore_wl2_dnd_drag_start for a more useful function.
+ *
+ * @since 1.20
+ */
+EAPI EAPI void ecore_wl2_dnd_set_actions(Ecore_Wl2_Input *input);
+/**
  * End a drag started by a call to ecore_wl2_dnd_drag_start
  *
  * @param input the input object on which the drag was started
diff --git a/src/lib/ecore_wl2/ecore_wl2_dnd.c 
b/src/lib/ecore_wl2/ecore_wl2_dnd.c
index e64fb21..e7c8da8 100644
--- a/src/lib/ecore_wl2/ecore_wl2_dnd.c
+++ b/src/lib/ecore_wl2/ecore_wl2_dnd.c
@@ -491,6 +491,17 @@ ecore_wl2_dnd_drag_start(Ecore_Wl2_Input *input, 
Ecore_Wl2_Window *window, Ecore
 }
 
 EAPI void
+ecore_wl2_dnd_set_actions(Ecore_Wl2_Input *input)
+{
+   EINA_SAFETY_ON_NULL_RETURN(input);
+   EINA_SAFETY_ON_NULL_RETURN(input->data.drag.source);
+   EINA_SAFETY_ON_NULL_RETURN(input->data.drag.types.data);
+   if (input->display->wl.data_device_manager_version >= 
WL_DATA_SOURCE_SET_ACTIONS_SINCE_VERSION)
+ wl_data_source_set_actions(input->data.drag.source,
+   WL_DATA_DEVICE_MANAGER_DND_ACTION_MOVE | 
WL_DATA_DEVICE_MANAGER_DND_ACTION_COPY);
+}
+
+EAPI void
 ecore_wl2_dnd_drag_end(Ecore_Wl2_Input *input)
 {
Ecore_Wl2_Event_Dnd_End *ev;

-- 




[EGIT] [core/enlightenment] master 05/06: unset wl selection target client if that client is deleted

2017-05-12 Thread Mike Blumenkrantz
discomfitor pushed a commit to branch master.

http://git.enlightenment.org/core/enlightenment.git/commit/?id=9df31011c8bed28f9b0dd0fe1b1ea16abe743b8e

commit 9df31011c8bed28f9b0dd0fe1b1ea16abe743b8e
Author: Mike Blumenkrantz 
Date:   Fri May 12 12:09:18 2017 -0400

unset wl selection target client if that client is deleted

the frame deletion callback would trigger far too late, allowing
crashes to occur if the selection target client exited between the
time of the drop event and the selection send event
---
 src/bin/e_comp_wl.c  |  1 +
 src/bin/e_comp_wl_data.c | 13 -
 2 files changed, 1 insertion(+), 13 deletions(-)

diff --git a/src/bin/e_comp_wl.c b/src/bin/e_comp_wl.c
index b5cd203..f3bd8e8 100644
--- a/src/bin/e_comp_wl.c
+++ b/src/bin/e_comp_wl.c
@@ -2493,6 +2493,7 @@ _e_comp_wl_client_cb_del(void *data EINA_UNUSED, E_Client 
*ec)
 ec->parent->lock_close = EINA_FALSE;
 ec->parent->modal = NULL;
  }
+   if (e_comp_wl->selection.target == ec) e_comp_wl->selection.target = NULL;
 
if ((ec == e_client_focused_get()) && ec->visible) 
_e_comp_wl_keyboard_leave(ec);
 
diff --git a/src/bin/e_comp_wl_data.c b/src/bin/e_comp_wl_data.c
index 53dc07b..6de53c7 100644
--- a/src/bin/e_comp_wl_data.c
+++ b/src/bin/e_comp_wl_data.c
@@ -938,15 +938,6 @@ _e_comp_wl_clipboard_create(void)
wl_signal_add(&e_comp_wl->selection.signal, &e_comp_wl->clipboard.listener);
 }
 
-static void
-_e_comp_wl_data_device_target_del(void *data, Evas *e EINA_UNUSED, Evas_Object 
*obj EINA_UNUSED, void *event_info EINA_UNUSED)
-{
-   E_Client *ec = data;
-
-   if (e_comp_wl->selection.target == ec)
- e_comp_wl->selection.target = NULL;
-}
-
 E_API void
 e_comp_wl_data_device_send_enter(E_Client *ec)
 {
@@ -974,8 +965,6 @@ e_comp_wl_data_device_send_enter(E_Client *ec)
   }
  }
e_comp_wl->selection.target = ec;
-   evas_object_event_callback_add(ec->frame, EVAS_CALLBACK_DEL,
-  _e_comp_wl_data_device_target_del, ec);
 
 #ifndef HAVE_WAYLAND_ONLY
if (e_client_has_xwindow(ec))
@@ -1034,8 +1023,6 @@ e_comp_wl_data_device_send_leave(E_Client *ec)
e_client_has_xwindow(e_comp_wl->drag_client))
  return;
if (e_comp_wl->drag && (e_comp_wl->drag->object == ec->frame)) return;
-   evas_object_event_callback_del_full(ec->frame, EVAS_CALLBACK_DEL,
-   _e_comp_wl_data_device_target_del, ec);
if (e_comp_wl->selection.target == ec)
  e_comp_wl->selection.target = NULL;
 #ifndef HAVE_WAYLAND_ONLY

-- 




[EGIT] [core/efl] master 09/27: ecore-wl2: split data offers into selection and drag

2017-05-12 Thread Mike Blumenkrantz
discomfitor pushed a commit to branch master.

http://git.enlightenment.org/core/efl.git/commit/?id=44f22a250e34a9d82758beeb642070cf089c09dd

commit 44f22a250e34a9d82758beeb642070cf089c09dd
Author: Mike Blumenkrantz 
Date:   Fri May 12 12:08:32 2017 -0400

ecore-wl2: split data offers into selection and drag

these are distinct objects and can coexist simultaneously; a drag
source should not overwrite an existing selection source

@fix
---
 src/lib/ecore_wl2/ecore_wl2_dnd.c | 69 ---
 src/lib/ecore_wl2/ecore_wl2_input.c   | 21 ---
 src/lib/ecore_wl2/ecore_wl2_private.h | 16 ++--
 3 files changed, 68 insertions(+), 38 deletions(-)

diff --git a/src/lib/ecore_wl2/ecore_wl2_dnd.c 
b/src/lib/ecore_wl2/ecore_wl2_dnd.c
index ab9533f..b7a18bb 100644
--- a/src/lib/ecore_wl2/ecore_wl2_dnd.c
+++ b/src/lib/ecore_wl2/ecore_wl2_dnd.c
@@ -136,18 +136,24 @@ data_source_send(void *data, struct wl_data_source 
*source EINA_UNUSED, const ch
 }
 
 static void
-data_source_event_emit(Ecore_Wl2_Input *input, int event)
+event_fill(struct _Ecore_Wl2_Event_Data_Source_Event *ev, Ecore_Wl2_Input 
*input)
 {
-   Ecore_Wl2_Event_Data_Source_End *ev;
-
-   ev = calloc(1, sizeof(Ecore_Wl2_Event_Data_Source_End));
-   if (!ev) return;
-
if (input->focus.keyboard)
  ev->source = input->focus.keyboard->id;
 
ev->win = _win_id_get(input);
-   ev->action = input->data.action;
+   ev->action = input->data.drag.action;
+}
+
+static void
+data_source_event_emit(Ecore_Wl2_Input *input, int event, Eina_Bool cancel)
+{
+   struct _Ecore_Wl2_Event_Data_Source_Event *ev;
+
+   ev = calloc(1, sizeof(struct _Ecore_Wl2_Event_Data_Source_Event));
+   EINA_SAFETY_ON_NULL_RETURN(ev);
+
+   event_fill((void*)ev, input);
 
ecore_event_add(event, ev, NULL, NULL);
 }
@@ -157,8 +163,8 @@ data_source_cancelled(void *data, struct wl_data_source 
*source)
 {
Ecore_Wl2_Input *input = data;
 
-   if (input->data.source == source) input->data.source = NULL;
-   input->data.action = WL_DATA_DEVICE_MANAGER_DND_ACTION_NONE;
+   if (input->data.drag.source == source) input->data.drag.source = NULL;
+   input->data.drag.action = WL_DATA_DEVICE_MANAGER_DND_ACTION_NONE;
wl_data_source_destroy(source);
data_source_event_emit(input, ECORE_WL2_EVENT_DATA_SOURCE_END);
 }
@@ -175,7 +181,7 @@ data_source_dnd_finished(void *data, struct wl_data_source 
*source)
 {
Ecore_Wl2_Input *input = data;
 
-   if (input->data.source == source) input->data.source = NULL;
+   if (input->data.drag.source == source) input->data.drag.source = NULL;
wl_data_source_destroy(source);
data_source_event_emit(input, ECORE_WL2_EVENT_DATA_SOURCE_END);
 }
@@ -185,7 +191,7 @@ data_source_action(void *data, struct wl_data_source 
*source EINA_UNUSED, uint32
 {
Ecore_Wl2_Input *input = data;
 
-   input->data.action = dnd_action;
+   input->data.drag.action = dnd_action;
data_source_event_emit(input, ECORE_WL2_EVENT_DATA_SOURCE_ACTION);
 }
 
@@ -379,19 +385,19 @@ ecore_wl2_dnd_drag_types_set(Ecore_Wl2_Input *input, 
const char **types)
manager = input->display->wl.data_device_manager;
if (!manager) return;
 
-   if (input->data.types.data)
+   if (input->data.drag.types.data)
  {
-wl_array_for_each(t, &input->data.types)
+wl_array_for_each(t, &input->data.drag.types)
   free(*t);
-wl_array_release(&input->data.types);
-wl_array_init(&input->data.types);
+wl_array_release(&input->data.drag.types);
+wl_array_init(&input->data.drag.types);
  }
 
-   if (input->data.source) wl_data_source_destroy(input->data.source);
-   input->data.source = NULL;
+   if (input->data.drag.source) 
wl_data_source_destroy(input->data.drag.source);
+   input->data.drag.source = NULL;
 
-   input->data.source = wl_data_device_manager_create_data_source(manager);
-   if (!input->data.source)
+   input->data.drag.source = 
wl_data_device_manager_create_data_source(manager);
+   if (!input->data.drag.source)
  {
 ERR("Could not create data source");
 return;
@@ -400,11 +406,11 @@ ecore_wl2_dnd_drag_types_set(Ecore_Wl2_Input *input, 
const char **types)
for (type = types; *type; type++)
  {
 if (!*type) continue;
-t = wl_array_add(&input->data.types, sizeof(*t));
+t = wl_array_add(&input->data.drag.types, sizeof(*t));
 if (t)
   {
  *t = strdup(*type);
- wl_data_source_offer(input->data.source, *t);
+ wl_data_source_offer(input->data.drag.source, *t);
   }
  }
 }
@@ -415,23 +421,23 @@ ecore_wl2_dnd_drag_start(Ecore_Wl2_Input *input, 
Ecore_Wl2_Window *window, Ecore
struct wl_surface *dsurface, *osurface;
 
EINA_SAFETY_ON_NULL_RETURN(input);
-   EINA_SAFETY_ON_NULL_RETURN(input->data.source);
+   EINA_SAFETY_ON_NULL_RETURN(input->data.drag.source);
EINA_SAFETY_ON_NULL_RETURN(drag_window);
 
dsurface = ecore_wl2_windo

[EGIT] [core/efl] master 08/27: ecore-wl2: store names for inputs and add api for retrieving name

2017-05-12 Thread Mike Blumenkrantz
discomfitor pushed a commit to branch master.

http://git.enlightenment.org/core/efl.git/commit/?id=8afe0a7a6ccee6352d6f67b89a616f189cb0284e

commit 8afe0a7a6ccee6352d6f67b89a616f189cb0284e
Author: Mike Blumenkrantz 
Date:   Fri May 12 12:08:32 2017 -0400

ecore-wl2: store names for inputs and add api for retrieving name

@feature
---
 src/lib/ecore_wl2/Ecore_Wl2.h | 8 
 src/lib/ecore_wl2/ecore_wl2_input.c   | 9 +
 src/lib/ecore_wl2/ecore_wl2_private.h | 1 +
 3 files changed, 18 insertions(+)

diff --git a/src/lib/ecore_wl2/Ecore_Wl2.h b/src/lib/ecore_wl2/Ecore_Wl2.h
index e51c7a2..e607f7f 100644
--- a/src/lib/ecore_wl2/Ecore_Wl2.h
+++ b/src/lib/ecore_wl2/Ecore_Wl2.h
@@ -944,6 +944,14 @@ EAPI Ecore_Wl2_Seat_Capabilities 
ecore_wl2_input_seat_capabilities_get(Ecore_Wl2
 EAPI unsigned int ecore_wl2_input_seat_id_get(Ecore_Wl2_Input *input);
 
 /**
+ * Get the name of an input
+ * @param input The input
+ * @return The name
+ * @since 1.20
+ */
+EAPI Eina_Stringshare *ecore_wl2_input_name_get(Ecore_Wl2_Input *input);
+
+/**
  * @defgroup Ecore_Wl2_Dnd_Group Wayland Library Drag-n-Drop Functions
  * @ingroup Ecore_Wl2_Group
  *
diff --git a/src/lib/ecore_wl2/ecore_wl2_input.c 
b/src/lib/ecore_wl2/ecore_wl2_input.c
index b95fbd6..29b53a9 100644
--- a/src/lib/ecore_wl2/ecore_wl2_input.c
+++ b/src/lib/ecore_wl2/ecore_wl2_input.c
@@ -1281,6 +1281,7 @@ _seat_cb_name(void *data, struct wl_seat *seat 
EINA_UNUSED, const char *name)
Ecore_Wl2_Input *input;
 
input = data;
+   eina_stringshare_replace(&input->name, name);
 
ev = calloc(1, sizeof(Ecore_Wl2_Event_Seat_Name));
EINA_SAFETY_ON_NULL_RETURN(ev);
@@ -1518,6 +1519,7 @@ _ecore_wl2_input_del(Ecore_Wl2_Input *input)
EINA_INLIST_FOREACH(display->windows, window)
  if (window->input == input) window->input = NULL;
 
+   eina_stringshare_replace(&input->name, NULL);
free(input);
 }
 
@@ -1593,6 +1595,13 @@ ecore_wl2_input_seat_capabilities_get(Ecore_Wl2_Input 
*input)
return cap;
 }
 
+EAPI Eina_Stringshare *
+ecore_wl2_input_name_get(Ecore_Wl2_Input *input)
+{
+   EINA_SAFETY_ON_NULL_RETURN_VAL(input, NULL);
+   return input->name;
+}
+
 EAPI unsigned int
 ecore_wl2_input_seat_id_get(Ecore_Wl2_Input *input)
 {
diff --git a/src/lib/ecore_wl2/ecore_wl2_private.h 
b/src/lib/ecore_wl2/ecore_wl2_private.h
index 90fa3a5..4e420b5 100644
--- a/src/lib/ecore_wl2/ecore_wl2_private.h
+++ b/src/lib/ecore_wl2/ecore_wl2_private.h
@@ -419,6 +419,7 @@ struct _Ecore_Wl2_Input
 
unsigned int seat_version;
unsigned int id;
+   Eina_Stringshare *name;
 
Ecore_Event_Handler *dev_add_handler;
Ecore_Event_Handler *dev_remove_handler;

-- 




[EGIT] [core/efl] master 24/27: ecore-wl2: do not offer a null mime first in ecore_wl2_offer_mimes_set()

2017-05-12 Thread Mike Blumenkrantz
discomfitor pushed a commit to branch master.

http://git.enlightenment.org/core/efl.git/commit/?id=9f698822118682aacf3a6a958b621f0ef9053967

commit 9f698822118682aacf3a6a958b621f0ef9053967
Author: Mike Blumenkrantz 
Date:   Fri May 12 12:08:32 2017 -0400

ecore-wl2: do not offer a null mime first in ecore_wl2_offer_mimes_set()

this seems to have been done to account for the case where no mimes were
passed, but sending null in this way is bad behavior for a client. the
spec indicates that null should be sent only when no mimes are accepted

@fix
---
 src/lib/ecore_wl2/ecore_wl2_dnd.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/src/lib/ecore_wl2/ecore_wl2_dnd.c 
b/src/lib/ecore_wl2/ecore_wl2_dnd.c
index 830ca4e..76e1459 100644
--- a/src/lib/ecore_wl2/ecore_wl2_dnd.c
+++ b/src/lib/ecore_wl2/ecore_wl2_dnd.c
@@ -738,9 +738,10 @@ ecore_wl2_offer_mimes_set(Ecore_Wl2_Offer *offer, 
Eina_Array *mimes)
 {
EINA_SAFETY_ON_NULL_RETURN(offer);
 
-   wl_data_offer_accept(offer->offer, offer->serial, NULL);
if (mimes)
  eina_array_foreach(mimes, _emit_mime, offer);
+   else
+ wl_data_offer_accept(offer->offer, offer->serial, NULL);
 }
 
 typedef struct {

-- 




[EGIT] [core/enlightenment] master 01/06: add desklock interface handler for key press

2017-05-12 Thread Mike Blumenkrantz
discomfitor pushed a commit to branch master.

http://git.enlightenment.org/core/enlightenment.git/commit/?id=203507fa226d03edf74270d7c551751b137cbcb7

commit 203507fa226d03edf74270d7c551751b137cbcb7
Author: Mike Blumenkrantz 
Date:   Fri May 12 12:09:18 2017 -0400

add desklock interface handler for key press

key presses during desklock should only be received by the lock 
implementation
and not by any other handler. this ensures that nothing unexpected can 
happen
with focus and simplifies overall key handling
---
 src/bin/e_comp_canvas.c | 6 ++
 src/bin/e_desklock.c| 6 ++
 src/bin/e_desklock.h| 4 
 src/modules/lokker/e_mod_main.c | 3 ++-
 src/modules/lokker/e_mod_main.h | 1 +
 src/modules/lokker/lokker.c | 7 ++-
 6 files changed, 21 insertions(+), 6 deletions(-)

diff --git a/src/bin/e_comp_canvas.c b/src/bin/e_comp_canvas.c
index 91aa21d..654aa98 100644
--- a/src/bin/e_comp_canvas.c
+++ b/src/bin/e_comp_canvas.c
@@ -106,6 +106,12 @@ static Eina_Bool
 _key_down(int ctx, Ecore_Event_Key *ev)
 {
e_screensaver_notidle();
+   if (e_desklock_state_get() && (ctx == E_BINDING_CONTEXT_MANAGER))
+ {
+E_Desklock_Interface *iface = e_desklock_interface_current_get();
+if (iface && iface->key_down)
+  return iface->key_down(ev);
+ }
if ((e_comp->comp_type == E_PIXMAP_TYPE_X) && (ev->event_window != 
e_comp->root))
  {
 E_Client *ec;
diff --git a/src/bin/e_desklock.c b/src/bin/e_desklock.c
index fc5a92a..07da1b6 100644
--- a/src/bin/e_desklock.c
+++ b/src/bin/e_desklock.c
@@ -147,6 +147,12 @@ e_desklock_interface_append(E_Desklock_Interface *iface)
  }
 }
 
+EINTERN E_Desklock_Interface *
+e_desklock_interface_current_get(void)
+{
+   return current_iface;
+}
+
 E_API void
 e_desklock_interface_remove(E_Desklock_Interface *iface)
 {
diff --git a/src/bin/e_desklock.h b/src/bin/e_desklock.h
index 6bc694e..a25f9a5 100644
--- a/src/bin/e_desklock.h
+++ b/src/bin/e_desklock.h
@@ -25,11 +25,14 @@ typedef struct E_Desklock_Interface E_Desklock_Interface;
 #ifndef E_DESKLOCK_H
 #define E_DESKLOCK_H
 
+typedef Eina_Bool (*E_Desklock_Key_Cb)(Ecore_Event_Key*);
+
 struct E_Desklock_Interface
 {
const char *name;
E_Desklock_Show_Cb show;
E_Desklock_Hide_Cb hide;
+   E_Desklock_Key_Cb key_down;
Eina_Bool active : 1; //interface is currently being used for locking
 };
 
@@ -50,6 +53,7 @@ E_API Eina_Bool e_desklock_state_get(void);
 
 E_API void e_desklock_interface_append(E_Desklock_Interface *iface);
 E_API void e_desklock_interface_remove(E_Desklock_Interface *iface);
+EINTERN E_Desklock_Interface *e_desklock_interface_current_get(void);
 E_API Eina_Stringshare *e_desklock_user_wallpaper_get(E_Zone *zone);
 E_API void e_desklock_show_hook_add(E_Desklock_Show_Cb cb);
 E_API void e_desklock_show_hook_del(E_Desklock_Show_Cb cb);
diff --git a/src/modules/lokker/e_mod_main.c b/src/modules/lokker/e_mod_main.c
index 25064d7..18fc250 100644
--- a/src/modules/lokker/e_mod_main.c
+++ b/src/modules/lokker/e_mod_main.c
@@ -7,7 +7,8 @@ static E_Desklock_Interface lokker_desklock_iface =
 {
.name = "lokker",
.show = lokker_lock,
-   .hide = lokker_unlock
+   .hide = lokker_unlock,
+   .key_down = lokker_key_down,
 };
 
 E_API void *
diff --git a/src/modules/lokker/e_mod_main.h b/src/modules/lokker/e_mod_main.h
index 09c8e2b..0ce0619 100644
--- a/src/modules/lokker/e_mod_main.h
+++ b/src/modules/lokker/e_mod_main.h
@@ -27,4 +27,5 @@ typedef enum
 EINTERN Eina_Bool lokker_lock(void);
 EINTERN void lokker_unlock(void);
 E_API E_Config_Dialog *e_int_config_lokker(Evas_Object *parent, const char 
*params EINA_UNUSED);
+EINTERN Eina_Bool lokker_key_down(Ecore_Event_Key*);
 #endif
diff --git a/src/modules/lokker/lokker.c b/src/modules/lokker/lokker.c
index e7e3433..b009093 100644
--- a/src/modules/lokker/lokker.c
+++ b/src/modules/lokker/lokker.c
@@ -722,11 +722,9 @@ _lokker_check_auth(void)
return 0;
 }
 
-static Eina_Bool
-_lokker_cb_key_down(void *data EINA_UNUSED, int type EINA_UNUSED, void *event)
+EINTERN Eina_Bool
+lokker_key_down(Ecore_Event_Key *ev)
 {
-   Ecore_Event_Key *ev = event;
-
if (!strcmp(ev->key, "Caps_Lock"))
  {
 if(ev->modifiers & ECORE_EVENT_LOCK_CAPS)
@@ -829,7 +827,6 @@ lokker_lock(void)
total_zone_num = eina_list_count(e_comp->zones);
 
/* handlers */
-   E_LIST_HANDLER_APPEND(edd->handlers, ECORE_EVENT_KEY_DOWN, 
_lokker_cb_key_down, NULL);
E_LIST_HANDLER_APPEND(edd->handlers, E_EVENT_ZONE_ADD, _lokker_cb_zone_add, 
NULL);
E_LIST_HANDLER_APPEND(edd->handlers, E_EVENT_ZONE_DEL, _lokker_cb_zone_del, 
NULL);
E_LIST_HANDLER_APPEND(edd->handlers, E_EVENT_ZONE_MOVE_RESIZE, 
_lokker_cb_zone_move_resize, NULL);

-- 




[EGIT] [core/efl] master 06/27: ecore-evas: account for framespace when processing mouse movement

2017-05-12 Thread Mike Blumenkrantz
discomfitor pushed a commit to branch master.

http://git.enlightenment.org/core/efl.git/commit/?id=0d9a7a6d987941c514c13524f881b7eeb31ff209

commit 0d9a7a6d987941c514c13524f881b7eeb31ff209
Author: Mike Blumenkrantz 
Date:   Fri May 12 12:08:32 2017 -0400

ecore-evas: account for framespace when processing mouse movement

in some cases (e.g., the mouse-out emission from the ee wl engine),
this was calculating wrong coordinates, which would lead to a broken
chain of events like:
  object mouse out -> object mouse in -> object mouse out
which would severely break some apps

@fix
---
 src/lib/ecore_evas/ecore_evas.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/lib/ecore_evas/ecore_evas.c b/src/lib/ecore_evas/ecore_evas.c
index 16a58c2..ce41475 100644
--- a/src/lib/ecore_evas/ecore_evas.c
+++ b/src/lib/ecore_evas/ecore_evas.c
@@ -3300,8 +3300,8 @@ _ecore_evas_mouse_move_process_internal(Ecore_Evas *ee,
if (!feed) return;
if (ee->rotation == 0)
  {
-evt_x = x;
-evt_y = y;
+evt_x = x - fx;
+evt_y = y - fy;
  }
else if (ee->rotation == 90)
  {

-- 




[EGIT] [core/enlightenment] master 03/06: check efm path existence before using it during dnd selections

2017-05-12 Thread Mike Blumenkrantz
discomfitor pushed a commit to branch master.

http://git.enlightenment.org/core/enlightenment.git/commit/?id=fbca4fa5e452a7b34c21e914c6d5f73fb46cd408

commit fbca4fa5e452a7b34c21e914c6d5f73fb46cd408
Author: Mike Blumenkrantz 
Date:   Fri May 12 12:09:18 2017 -0400

check efm path existence before using it during dnd selections

CID 1374484
---
 src/bin/e_fm.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/bin/e_fm.c b/src/bin/e_fm.c
index c61ec19..d4b74d3 100644
--- a/src/bin/e_fm.c
+++ b/src/bin/e_fm.c
@@ -7061,7 +7061,7 @@ _e_fm2_cb_dnd_selection_notify(void *data, const char 
*type, void *event)
 }
}
   }
-else
+else if (sd->realpath)
   {
  if (_e_fm2_view_mode_get(sd) == E_FM2_VIEW_MODE_LIST && 
sd->order_file) /* list */
{

-- 




[EGIT] [core/efl] master 18/27: elm_cnp: only attempt to manage wl selections which are created by elm_cnp

2017-05-12 Thread Mike Blumenkrantz
discomfitor pushed a commit to branch master.

http://git.enlightenment.org/core/efl.git/commit/?id=31f98a6d8117cabd9f2c582fdbc6ead370a5cbba

commit 31f98a6d8117cabd9f2c582fdbc6ead370a5cbba
Author: Mike Blumenkrantz 
Date:   Fri May 12 12:08:32 2017 -0400

elm_cnp: only attempt to manage wl selections which are created by elm_cnp

use serials of the selections and events to avoid mangling external 
selections
---
 src/lib/elementary/elm_cnp.c | 14 ++
 1 file changed, 10 insertions(+), 4 deletions(-)

diff --git a/src/lib/elementary/elm_cnp.c b/src/lib/elementary/elm_cnp.c
index 8430108..eff4c14 100644
--- a/src/lib/elementary/elm_cnp.c
+++ b/src/lib/elementary/elm_cnp.c
@@ -2389,6 +2389,8 @@ struct _Wl_Cnp_Selection
Elm_Sel_Format format;
Ecore_Wl2_Window *win;
Elm_Xdnd_Action action;
+   uint32_t selection_serial;
+   uint32_t drag_serial;
 
Eina_Bool active : 1;
 };
@@ -2942,7 +2944,7 @@ _wl_elm_cnp_selection_set(Evas_Object *obj, Elm_Sel_Type 
selection, Elm_Sel_Form
   }
 types[count - 1] = 0;
 
-ecore_wl2_dnd_selection_set(ecore_wl2_window_input_get(win), types);
+sel->selection_serial = 
ecore_wl2_dnd_selection_set(ecore_wl2_window_input_get(win), types);
 
 free(types);
 return EINA_TRUE;
@@ -3142,7 +3144,7 @@ _wl_elm_cnp_selection_clear(Evas_Object *obj, 
Elm_Sel_Type selection EINA_UNUSED
ELM_SAFE_FREE(sel->selbuf, free);
sel->buflen = 0;
/* sel->clear(); */
-   
ecore_wl2_dnd_selection_clear(ecore_wl2_window_input_get(_wl_elm_widget_window_get(obj)));
+   sel->selection_serial = 
ecore_wl2_dnd_selection_clear(ecore_wl2_window_input_get(_wl_elm_widget_window_get(obj)));
 
return EINA_TRUE;
 }
@@ -3163,6 +3165,9 @@ _wl_selection_send(void *data, int type EINA_UNUSED, void 
*event)
cnp_debug("In\n");
ev = event;
sel = data;
+   if ((ev->serial != sel->selection_serial) &&
+   (ev->serial != sel->drag_serial))
+return ECORE_CALLBACK_RENEW;
 
for (i = 0; i < CNP_N_ATOMS; i++)
  {
@@ -3455,7 +3460,7 @@ _wl_elm_drag_start(Evas_Object *obj, Elm_Sel_Format 
format, const char *data,
 parent = ecore_evas_wayland2_window_get(ee);
  }
 
-   ecore_wl2_dnd_drag_start(ecore_wl2_window_input_get(win), parent, win);
+   wl_cnp_selection.drag_serial = 
ecore_wl2_dnd_drag_start(ecore_wl2_window_input_get(win), parent, win);
 
return EINA_TRUE;
 }
@@ -3723,7 +3728,8 @@ _wl_dnd_end(void *data EINA_UNUSED, int type EINA_UNUSED, 
void *event)
cnp_debug("In\n");
 
ev = event;
-
+   if (ev->serial != wl_cnp_selection.drag_serial)
+return ECORE_CALLBACK_RENEW;
if (dragdonecb) dragdonecb(dragdonedata, dragwidget);
 
if (dragwin)

-- 




[EGIT] [core/efl] master 13/27: ecore-wl2: add safety check in ecore_wl2_display_inputs_get()

2017-05-12 Thread Mike Blumenkrantz
discomfitor pushed a commit to branch master.

http://git.enlightenment.org/core/efl.git/commit/?id=8b6526eb7ae0562dc3a2d5d1fd6d9d61a8759828

commit 8b6526eb7ae0562dc3a2d5d1fd6d9d61a8759828
Author: Mike Blumenkrantz 
Date:   Fri May 12 12:08:32 2017 -0400

ecore-wl2: add safety check in ecore_wl2_display_inputs_get()

ensure this is not called on server displays
---
 src/lib/ecore_wl2/ecore_wl2_display.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/src/lib/ecore_wl2/ecore_wl2_display.c 
b/src/lib/ecore_wl2/ecore_wl2_display.c
index 2cf0ae0..dbcae6e 100644
--- a/src/lib/ecore_wl2/ecore_wl2_display.c
+++ b/src/lib/ecore_wl2/ecore_wl2_display.c
@@ -947,6 +947,7 @@ EAPI Eina_Iterator *
 ecore_wl2_display_inputs_get(Ecore_Wl2_Display *display)
 {
EINA_SAFETY_ON_NULL_RETURN_VAL(display, NULL);
+   EINA_SAFETY_ON_TRUE_RETURN_VAL(display->pid, NULL);
return eina_inlist_iterator_new(display->inputs);
 }
 

-- 




[EGIT] [core/efl] master 12/27: ecore-wl2: handle case where session recovery listener triggers on dead surface

2017-05-12 Thread Mike Blumenkrantz
discomfitor pushed a commit to branch master.

http://git.enlightenment.org/core/efl.git/commit/?id=ba2a76d7ab2fb78c3aab6cb2c6c96f6964ac0b22

commit ba2a76d7ab2fb78c3aab6cb2c6c96f6964ac0b22
Author: Mike Blumenkrantz 
Date:   Fri May 12 12:08:32 2017 -0400

ecore-wl2: handle case where session recovery listener triggers on dead 
surface

@fix
---
 src/lib/ecore_wl2/ecore_wl2_display.c | 6 +-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/src/lib/ecore_wl2/ecore_wl2_display.c 
b/src/lib/ecore_wl2/ecore_wl2_display.c
index 3a95bb5..2cf0ae0 100644
--- a/src/lib/ecore_wl2/ecore_wl2_display.c
+++ b/src/lib/ecore_wl2/ecore_wl2_display.c
@@ -72,7 +72,11 @@ static const struct zxdg_shell_v6_listener 
_zxdg_shell_listener =
 static void
 _session_recovery_create_uuid(void *data EINA_UNUSED, struct 
zwp_e_session_recovery *session_recovery EINA_UNUSED, struct wl_surface 
*surface, const char *uuid)
 {
-   Ecore_Wl2_Window *win = wl_surface_get_user_data(surface);
+   Ecore_Wl2_Window *win;
+
+   /* surface may have been destroyed */
+   if (!surface) return;
+   win = wl_surface_get_user_data(surface);
 
eina_stringshare_replace(&win->uuid, uuid);
 }

-- 




[EGIT] [core/efl] master 07/27: ecore-wl2: add checks for a valid display object in ecore_wl2_input fns

2017-05-12 Thread Mike Blumenkrantz
discomfitor pushed a commit to branch master.

http://git.enlightenment.org/core/efl.git/commit/?id=6fc8ea3c4bfcc67faeb5f46a36bd85fdb8f5759c

commit 6fc8ea3c4bfcc67faeb5f46a36bd85fdb8f5759c
Author: Mike Blumenkrantz 
Date:   Fri May 12 12:08:32 2017 -0400

ecore-wl2: add checks for a valid display object in ecore_wl2_input fns

no display = invalid object, so this needs checking
---
 src/lib/ecore_wl2/ecore_wl2_input.c | 9 +
 1 file changed, 5 insertions(+), 4 deletions(-)

diff --git a/src/lib/ecore_wl2/ecore_wl2_input.c 
b/src/lib/ecore_wl2/ecore_wl2_input.c
index 636ddf9..b95fbd6 100644
--- a/src/lib/ecore_wl2/ecore_wl2_input.c
+++ b/src/lib/ecore_wl2/ecore_wl2_input.c
@@ -1557,7 +1557,7 @@ EAPI void
 ecore_wl2_input_grab(Ecore_Wl2_Input *input, Ecore_Wl2_Window *window, 
unsigned int button)
 {
EINA_SAFETY_ON_NULL_RETURN(input);
-
+   EINA_SAFETY_ON_NULL_RETURN(input->display);
_ecore_wl2_input_grab(input, window, button);
 }
 
@@ -1565,7 +1565,7 @@ EAPI void
 ecore_wl2_input_ungrab(Ecore_Wl2_Input *input)
 {
EINA_SAFETY_ON_NULL_RETURN(input);
-
+   EINA_SAFETY_ON_NULL_RETURN(input->display);
_ecore_wl2_input_ungrab(input);
 }
 
@@ -1573,7 +1573,7 @@ EAPI struct wl_seat *
 ecore_wl2_input_seat_get(Ecore_Wl2_Input *input)
 {
EINA_SAFETY_ON_NULL_RETURN_VAL(input, NULL);
-
+   EINA_SAFETY_ON_NULL_RETURN_VAL(input->display, NULL);
return input->wl.seat;
 }
 
@@ -1583,7 +1583,7 @@ ecore_wl2_input_seat_capabilities_get(Ecore_Wl2_Input 
*input)
Ecore_Wl2_Seat_Capabilities cap = ECORE_WL2_SEAT_CAPABILITIES_NONE;
 
EINA_SAFETY_ON_NULL_RETURN_VAL(input, cap);
-
+   EINA_SAFETY_ON_NULL_RETURN_VAL(input->display, 0);
if (input->wl.keyboard)
  cap |= ECORE_WL2_SEAT_CAPABILITIES_KEYBOARD;
if (input->wl.pointer)
@@ -1597,5 +1597,6 @@ EAPI unsigned int
 ecore_wl2_input_seat_id_get(Ecore_Wl2_Input *input)
 {
EINA_SAFETY_ON_NULL_RETURN_VAL(input, 0);
+   EINA_SAFETY_ON_NULL_RETURN_VAL(input->display, 0);
return input->id;
 }

-- 




[EGIT] [core/efl] master 22/27: ecore-wl2: add 'cancelled' to Ecore_Wl2_Event_Data_Source_End

2017-05-12 Thread Mike Blumenkrantz
discomfitor pushed a commit to branch master.

http://git.enlightenment.org/core/efl.git/commit/?id=d119fdded93feaf13d2c9ea6ca47b4d84b57bb08

commit d119fdded93feaf13d2c9ea6ca47b4d84b57bb08
Author: Mike Blumenkrantz 
Date:   Fri May 12 12:08:32 2017 -0400

ecore-wl2: add 'cancelled' to Ecore_Wl2_Event_Data_Source_End

it's impossible to know the result of a drag operation without this
member
---
 src/lib/ecore_wl2/Ecore_Wl2.h | 10 +-
 src/lib/ecore_wl2/ecore_wl2_dnd.c | 19 ++-
 2 files changed, 23 insertions(+), 6 deletions(-)

diff --git a/src/lib/ecore_wl2/Ecore_Wl2.h b/src/lib/ecore_wl2/Ecore_Wl2.h
index 1dbfbd4..9c3e959 100644
--- a/src/lib/ecore_wl2/Ecore_Wl2.h
+++ b/src/lib/ecore_wl2/Ecore_Wl2.h
@@ -152,7 +152,15 @@ struct _Ecore_Wl2_Event_Data_Source_Event
Ecore_Wl2_Display *display;
 };
 
-typedef struct _Ecore_Wl2_Event_Data_Source_Event 
Ecore_Wl2_Event_Data_Source_End;
+typedef struct Ecore_Wl2_Event_Data_Source_End
+{
+   unsigned int win, source;
+   Ecore_Wl2_Drag_Action action;
+   unsigned int seat;
+   uint32_t serial;
+   Ecore_Wl2_Display *display;
+   Eina_Bool cancelled;
+} Ecore_Wl2_Event_Data_Source_End;
 typedef struct _Ecore_Wl2_Event_Data_Source_Event 
Ecore_Wl2_Event_Data_Source_Drop;
 typedef struct _Ecore_Wl2_Event_Data_Source_Event 
Ecore_Wl2_Event_Data_Source_Action;
 
diff --git a/src/lib/ecore_wl2/ecore_wl2_dnd.c 
b/src/lib/ecore_wl2/ecore_wl2_dnd.c
index 3c52694..132eeb3 100644
--- a/src/lib/ecore_wl2/ecore_wl2_dnd.c
+++ b/src/lib/ecore_wl2/ecore_wl2_dnd.c
@@ -162,11 +162,20 @@ static void
 data_source_event_emit(Ecore_Wl2_Input *input, int event, Eina_Bool cancel)
 {
struct _Ecore_Wl2_Event_Data_Source_Event *ev;
+   Ecore_Wl2_Event_Data_Source_End *ev2;
 
-   ev = calloc(1, sizeof(struct _Ecore_Wl2_Event_Data_Source_Event));
+   if (event == ECORE_WL2_EVENT_DATA_SOURCE_END)
+ {
+ev2 = calloc(1, sizeof(Ecore_Wl2_Event_Data_Source_End));
+ev = (void*)ev2;
+ }
+   else
+ ev = calloc(1, sizeof(struct _Ecore_Wl2_Event_Data_Source_Event));
EINA_SAFETY_ON_NULL_RETURN(ev);
 
event_fill((void*)ev, input);
+   if (event == ECORE_WL2_EVENT_DATA_SOURCE_END)
+ ev2->cancelled = cancel;
 
ecore_event_add(event, ev, _display_event_free, ev->display);
 }
@@ -179,14 +188,14 @@ data_source_cancelled(void *data, struct wl_data_source 
*source)
if (input->data.drag.source == source) input->data.drag.source = NULL;
input->data.drag.action = WL_DATA_DEVICE_MANAGER_DND_ACTION_NONE;
wl_data_source_destroy(source);
-   data_source_event_emit(input, ECORE_WL2_EVENT_DATA_SOURCE_END);
+   data_source_event_emit(input, ECORE_WL2_EVENT_DATA_SOURCE_END, 1);
 }
 
 static void
 data_source_dnd_drop_performed(void *data, struct wl_data_source *source 
EINA_UNUSED)
 {
Ecore_Wl2_Input *input = data;
-   data_source_event_emit(input, ECORE_WL2_EVENT_DATA_SOURCE_DROP);
+   data_source_event_emit(input, ECORE_WL2_EVENT_DATA_SOURCE_DROP, 0);
 }
 
 static void
@@ -196,7 +205,7 @@ data_source_dnd_finished(void *data, struct wl_data_source 
*source)
 
if (input->data.drag.source == source) input->data.drag.source = NULL;
wl_data_source_destroy(source);
-   data_source_event_emit(input, ECORE_WL2_EVENT_DATA_SOURCE_END);
+   data_source_event_emit(input, ECORE_WL2_EVENT_DATA_SOURCE_END, 0);
 }
 
 static void
@@ -205,7 +214,7 @@ data_source_action(void *data, struct wl_data_source 
*source EINA_UNUSED, uint32
Ecore_Wl2_Input *input = data;
 
input->data.drag.action = dnd_action;
-   data_source_event_emit(input, ECORE_WL2_EVENT_DATA_SOURCE_ACTION);
+   data_source_event_emit(input, ECORE_WL2_EVENT_DATA_SOURCE_ACTION, 0);
 }
 
 static const struct wl_data_source_listener _source_listener =

-- 




[EGIT] [core/efl] master 23/27: ecore-wl2: add events for changes in keymap, selection, and kbd repeat rate

2017-05-12 Thread Mike Blumenkrantz
discomfitor pushed a commit to branch master.

http://git.enlightenment.org/core/efl.git/commit/?id=2e5251b36431e162fdb309c364661de2f80179b3

commit 2e5251b36431e162fdb309c364661de2f80179b3
Author: Mike Blumenkrantz 
Date:   Fri May 12 12:08:32 2017 -0400

ecore-wl2: add events for changes in keymap, selection, and kbd repeat rate

@feature
---
 src/lib/ecore_wl2/Ecore_Wl2.h   | 21 +
 src/lib/ecore_wl2/ecore_wl2.c   | 11 ++-
 src/lib/ecore_wl2/ecore_wl2_dnd.c   |  8 
 src/lib/ecore_wl2/ecore_wl2_input.c | 19 +++
 4 files changed, 58 insertions(+), 1 deletion(-)

diff --git a/src/lib/ecore_wl2/Ecore_Wl2.h b/src/lib/ecore_wl2/Ecore_Wl2.h
index 9c3e959..cd8146f 100644
--- a/src/lib/ecore_wl2/Ecore_Wl2.h
+++ b/src/lib/ecore_wl2/Ecore_Wl2.h
@@ -180,6 +180,12 @@ typedef struct _Ecore_Wl2_Event_Data_Source_Send
Ecore_Wl2_Display *display;
 } Ecore_Wl2_Event_Data_Source_Send;
 
+typedef struct Ecore_Wl2_Event_Seat_Selection
+{
+   unsigned int seat;
+   Ecore_Wl2_Display *display;
+} Ecore_Wl2_Event_Seat_Selection;
+
 typedef struct _Ecore_Wl2_Event_Seat_Name
 {
Eina_Stringshare *name;
@@ -237,6 +243,18 @@ typedef struct _Ecore_Wl2_Event_Window_Configure_Complete
unsigned int win;
 } Ecore_Wl2_Event_Window_Configure_Complete;
 
+typedef struct _Ecore_Wl2_Event_Input_Keymap_Changed
+{
+   unsigned int id;
+   Ecore_Wl2_Display *display;
+} Ecore_Wl2_Event_Seat_Keymap_Changed;
+
+typedef struct Ecore_Wl2_Event_Seat_Keyboard_Repeat_Changed
+{
+   unsigned int id;
+   Ecore_Wl2_Display *display;
+} Ecore_Wl2_Event_Seat_Keyboard_Repeat_Changed;
+
 typedef struct _Ecore_Wl2_Event_Sync_Done
 {
Ecore_Wl2_Display *display;
@@ -289,6 +307,9 @@ EAPI extern int ECORE_WL2_EVENT_SEAT_CAPABILITIES_CHANGED; 
/** @since 1.19 */
 EAPI extern int ECORE_WL2_EVENT_DEVICE_ADDED; /** @since 1.19 */
 EAPI extern int ECORE_WL2_EVENT_DEVICE_REMOVED; /** @since 1.19 */
 EAPI extern int ECORE_WL2_EVENT_WINDOW_CONFIGURE_COMPLETE; /** @since 1.19 */
+EAPI extern int ECORE_WL2_EVENT_SEAT_KEYMAP_CHANGED; /** @since 1.20 */
+EAPI extern int ECORE_WL2_EVENT_SEAT_KEYBOARD_REPEAT_CHANGED; /** @since 1.20 
*/
+EAPI extern int ECORE_WL2_EVENT_SEAT_SELECTION; /** @since 1.20 */
 
 /**
  * @file
diff --git a/src/lib/ecore_wl2/ecore_wl2.c b/src/lib/ecore_wl2/ecore_wl2.c
index 7c1b1f0..b9c9ec5 100644
--- a/src/lib/ecore_wl2/ecore_wl2.c
+++ b/src/lib/ecore_wl2/ecore_wl2.c
@@ -36,6 +36,9 @@ EAPI int ECORE_WL2_EVENT_SEAT_CAPABILITIES_CHANGED = 0;
 EAPI int ECORE_WL2_EVENT_DEVICE_ADDED = 0;
 EAPI int ECORE_WL2_EVENT_DEVICE_REMOVED = 0;
 EAPI int ECORE_WL2_EVENT_WINDOW_CONFIGURE_COMPLETE = 0;
+EAPI int ECORE_WL2_EVENT_SEAT_KEYMAP_CHANGED = 0;
+EAPI int ECORE_WL2_EVENT_SEAT_KEYBOARD_REPEAT_CHANGED = 0;
+EAPI int ECORE_WL2_EVENT_SEAT_SELECTION = 0;
 
 EAPI int _ecore_wl2_event_window_www = -1;
 EAPI int _ecore_wl2_event_window_www_drag = -1;
@@ -101,6 +104,9 @@ ecore_wl2_init(void)
 _ecore_wl2_event_window_www = ecore_event_type_new();
 _ecore_wl2_event_window_www_drag = ecore_event_type_new();
 ECORE_WL2_EVENT_WINDOW_CONFIGURE_COMPLETE = ecore_event_type_new();
+ECORE_WL2_EVENT_SEAT_KEYMAP_CHANGED = ecore_event_type_new();
+ECORE_WL2_EVENT_SEAT_KEYBOARD_REPEAT_CHANGED = ecore_event_type_new();
+ECORE_WL2_EVENT_SEAT_SELECTION = ecore_event_type_new();
  }
if (!no_session_recovery)
  no_session_recovery = !!getenv("EFL_NO_WAYLAND_SESSION_RECOVERY");
@@ -154,7 +160,10 @@ ecore_wl2_shutdown(void)
   ECORE_WL2_EVENT_SEAT_CAPABILITIES_CHANGED,
   ECORE_WL2_EVENT_DEVICE_ADDED,
   ECORE_WL2_EVENT_DEVICE_REMOVED,
-  ECORE_WL2_EVENT_WINDOW_CONFIGURE_COMPLETE);
+  ECORE_WL2_EVENT_WINDOW_CONFIGURE_COMPLETE,
+  ECORE_WL2_EVENT_SEAT_KEYMAP_CHANGED,
+  ECORE_WL2_EVENT_SEAT_KEYBOARD_REPEAT_CHANGED,
+  ECORE_WL2_EVENT_SEAT_SELECTION);
 
/* shutdown Ecore_Event */
ecore_event_shutdown();
diff --git a/src/lib/ecore_wl2/ecore_wl2_dnd.c 
b/src/lib/ecore_wl2/ecore_wl2_dnd.c
index 132eeb3..830ca4e 100644
--- a/src/lib/ecore_wl2/ecore_wl2_dnd.c
+++ b/src/lib/ecore_wl2/ecore_wl2_dnd.c
@@ -379,11 +379,19 @@ _ecore_wl2_dnd_drop(Ecore_Wl2_Input *input)
 void
 _ecore_wl2_dnd_selection(Ecore_Wl2_Input *input, struct wl_data_offer *offer)
 {
+   Ecore_Wl2_Event_Seat_Selection *ev;
+
if (input->selection) _ecore_wl2_offer_unref(input->selection);
input->selection = NULL;
 
if (offer)
  input->selection = wl_data_offer_get_user_data(offer);
+   ev = malloc(sizeof(Ecore_Wl2_Event_Seat_Selection));
+   EINA_SAFETY_ON_NULL_RETURN(ev);
+   ev->seat = input->id;
+   ev->display = input->display;
+   ev->display->refs++;
+   ecore_event_add(ECORE_WL2_EVENT_SEAT_SELECTION, ev, _display_event_free, 
ev->display);
 }
 
 void
diff --git a/src/lib

[EGIT] [core/efl] master 04/27: ecore: allow creation of fd handlers with no flags

2017-05-12 Thread Mike Blumenkrantz
discomfitor pushed a commit to branch master.

http://git.enlightenment.org/core/efl.git/commit/?id=34999448c21e660a09581bd8933e055a44fd3132

commit 34999448c21e660a09581bd8933e055a44fd3132
Author: Mike Blumenkrantz 
Date:   Fri May 12 12:08:32 2017 -0400

ecore: allow creation of fd handlers with no flags

it's possible to set flags to 0 with another function, so allowing
creation with 0 makes the api more consistent without breaking the
documented behavior
---
 src/lib/ecore/ecore_main.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/lib/ecore/ecore_main.c b/src/lib/ecore/ecore_main.c
index 22e2f45..2df39c3 100644
--- a/src/lib/ecore/ecore_main.c
+++ b/src/lib/ecore/ecore_main.c
@@ -1378,7 +1378,7 @@ _ecore_main_fd_handler_add(intfd,
DBG("_ecore_main_fd_handler_add");
Ecore_Fd_Handler *fdh = NULL;
 
-   if ((fd < 0) || (flags == 0) || (!func)) return NULL;
+   if ((fd < 0) || (flags < 0) || (!func)) return NULL;
 
fdh = ecore_fd_handler_calloc(1);
if (!fdh) return NULL;

-- 




[EGIT] [core/efl] master 05/27: ecore-evas: add function for unsetting a specific seat's cursor

2017-05-12 Thread Mike Blumenkrantz
discomfitor pushed a commit to branch master.

http://git.enlightenment.org/core/efl.git/commit/?id=2fabed32555d411b8c293556fb56abb90d4ae000

commit 2fabed32555d411b8c293556fb56abb90d4ae000
Author: Mike Blumenkrantz 
Date:   Fri May 12 12:08:32 2017 -0400

ecore-evas: add function for unsetting a specific seat's cursor

@feature
---
 src/lib/ecore_evas/Ecore_Evas.h | 17 +
 src/lib/ecore_evas/ecore_evas.c | 17 -
 2 files changed, 29 insertions(+), 5 deletions(-)

diff --git a/src/lib/ecore_evas/Ecore_Evas.h b/src/lib/ecore_evas/Ecore_Evas.h
index 9a2d8dd..c4f7b3e 100644
--- a/src/lib/ecore_evas/Ecore_Evas.h
+++ b/src/lib/ecore_evas/Ecore_Evas.h
@@ -2424,6 +2424,23 @@ EAPI voidecore_evas_object_cursor_set(Ecore_Evas 
*ee, Evas_Object *obj,
 EAPI Evas_Object*ecore_evas_cursor_unset(Ecore_Evas *ee);
 
 /**
+ * @brief Unsets the cursor of the specified pointer device.
+ *
+ * @param ee The Ecore_Evas to unset the cursor.
+ * @param pointer A pointer device to set the cursor. Use @c NULL for the 
default.
+ *
+ * This function unsets the cursor from the Ecore_Evas, and returns the cursor
+ * object. If the cursor was set from ecore_evas_cursor_set(), this function
+ * returns the image. In this case, the image should be deleted when it is
+ * no longer needed.
+ *
+ * @see ecore_evas_cursor_device_set()
+ * @see ecore_evas_object_cursor_device_set()
+ * @since 1.20
+ */
+EAPI Evas_Object *ecore_evas_cursor_device_unset(Ecore_Evas *ee, 
Efl_Input_Device *pointer);
+
+/**
  * @brief Sets the cursor of an Ecore_Evas specified pointer device.
  *
  * @param ee The Ecore_Evas
diff --git a/src/lib/ecore_evas/ecore_evas.c b/src/lib/ecore_evas/ecore_evas.c
index 7c68126..16a58c2 100644
--- a/src/lib/ecore_evas/ecore_evas.c
+++ b/src/lib/ecore_evas/ecore_evas.c
@@ -1858,16 +1858,17 @@ ecore_evas_cursor_get(const Ecore_Evas *ee, Evas_Object 
**obj, int *layer, int *
 }
 
 EAPI Evas_Object *
-ecore_evas_cursor_unset(Ecore_Evas *ee)
+ecore_evas_cursor_device_unset(Ecore_Evas *ee, Efl_Input_Device *pointer)
 {
-   Ecore_Evas_Cursor *cursor;
-   Efl_Input_Device *pointer;
+   Ecore_Evas_Cursor *cursor = NULL;
Evas_Object *obj;
 
ECORE_EVAS_CHECK(ee, NULL);
 
-   pointer = evas_default_device_get(ee->evas, EFL_INPUT_DEVICE_CLASS_MOUSE);
-   cursor = eina_hash_find(ee->prop.cursors, &pointer);
+   if (!pointer)
+ pointer = evas_default_device_get(ee->evas, EFL_INPUT_DEVICE_CLASS_MOUSE);
+   if (pointer)
+ cursor = eina_hash_find(ee->prop.cursors, &pointer);
EINA_SAFETY_ON_NULL_RETURN_VAL(cursor, NULL);
obj = cursor->object;
if (ee->engine.func->fn_object_cursor_unset)
@@ -1880,6 +1881,12 @@ ecore_evas_cursor_unset(Ecore_Evas *ee)
return obj;
 }
 
+EAPI Evas_Object *
+ecore_evas_cursor_unset(Ecore_Evas *ee)
+{
+   return ecore_evas_cursor_device_unset(ee, NULL);
+}
+
 EAPI void
 ecore_evas_layer_set(Ecore_Evas *ee, int layer)
 {

-- 




[EGIT] [core/efl] master 21/27: ecore-wl2: add display object to all events

2017-05-12 Thread Mike Blumenkrantz
discomfitor pushed a commit to branch master.

http://git.enlightenment.org/core/efl.git/commit/?id=05fd3771e7996acdf2a21c1f235ef7feecca0005

commit 05fd3771e7996acdf2a21c1f235ef7feecca0005
Author: Mike Blumenkrantz 
Date:   Fri May 12 12:08:32 2017 -0400

ecore-wl2: add display object to all events

this is required in order to determine which connection an event originated
from
---
 src/lib/ecore_wl2/Ecore_Wl2.h   | 14 ++
 src/lib/ecore_wl2/ecore_wl2_dnd.c   | 29 +
 src/lib/ecore_wl2/ecore_wl2_input.c | 25 ++---
 3 files changed, 61 insertions(+), 7 deletions(-)

diff --git a/src/lib/ecore_wl2/Ecore_Wl2.h b/src/lib/ecore_wl2/Ecore_Wl2.h
index 0203f04..1dbfbd4 100644
--- a/src/lib/ecore_wl2/Ecore_Wl2.h
+++ b/src/lib/ecore_wl2/Ecore_Wl2.h
@@ -75,6 +75,7 @@ typedef struct _Ecore_Wl2_Global
 {
Eina_Stringshare *interface;
unsigned int id, version;
+   Ecore_Wl2_Display *display;
 } Ecore_Wl2_Global;
 
 typedef struct _Ecore_Wl2_Event_Global
@@ -89,6 +90,7 @@ typedef struct _Ecore_Wl2_Event_Focus_In
unsigned int window;
unsigned int timestamp;
Eo *dev; //The seat device
+   Ecore_Wl2_Display *display;
 } Ecore_Wl2_Event_Focus_In;
 
 typedef struct _Ecore_Wl2_Event_Focus_Out
@@ -96,6 +98,7 @@ typedef struct _Ecore_Wl2_Event_Focus_Out
unsigned int window;
unsigned int timestamp;
Eo *dev; //The seat device
+   Ecore_Wl2_Display *display;
 } Ecore_Wl2_Event_Focus_Out;
 
 typedef struct _Ecore_Wl2_Event_Dnd_Enter
@@ -104,6 +107,7 @@ typedef struct _Ecore_Wl2_Event_Dnd_Enter
Ecore_Wl2_Offer *offer;
int x, y;
unsigned int seat;
+   Ecore_Wl2_Display *display;
 } Ecore_Wl2_Event_Dnd_Enter;
 
 typedef struct _Ecore_Wl2_Event_Dnd_Leave
@@ -111,6 +115,7 @@ typedef struct _Ecore_Wl2_Event_Dnd_Leave
unsigned int win, source;
Ecore_Wl2_Offer *offer;
unsigned int seat;
+   Ecore_Wl2_Display *display;
 } Ecore_Wl2_Event_Dnd_Leave;
 
 typedef struct _Ecore_Wl2_Event_Dnd_Motion
@@ -119,6 +124,7 @@ typedef struct _Ecore_Wl2_Event_Dnd_Motion
Ecore_Wl2_Offer *offer;
int x, y;
unsigned int seat;
+   Ecore_Wl2_Display *display;
 } Ecore_Wl2_Event_Dnd_Motion;
 
 typedef struct _Ecore_Wl2_Event_Dnd_Drop
@@ -127,12 +133,14 @@ typedef struct _Ecore_Wl2_Event_Dnd_Drop
int x, y;
Ecore_Wl2_Offer *offer;
unsigned int seat;
+   Ecore_Wl2_Display *display;
 } Ecore_Wl2_Event_Dnd_Drop;
 
 typedef struct _Ecore_Wl2_Event_Dnd_End
 {
unsigned int win, source;
unsigned int seat;
+   Ecore_Wl2_Display *display;
 } Ecore_Wl2_Event_Dnd_End;
 
 struct _Ecore_Wl2_Event_Data_Source_Event
@@ -141,6 +149,7 @@ struct _Ecore_Wl2_Event_Data_Source_Event
Ecore_Wl2_Drag_Action action;
unsigned int seat;
uint32_t serial;
+   Ecore_Wl2_Display *display;
 };
 
 typedef struct _Ecore_Wl2_Event_Data_Source_Event 
Ecore_Wl2_Event_Data_Source_End;
@@ -151,6 +160,7 @@ typedef struct _Ecore_Wl2_Event_Data_Source_Target
 {
char *type;
unsigned int seat;
+   Ecore_Wl2_Display *display;
 } Ecore_Wl2_Event_Data_Source_Target;
 
 typedef struct _Ecore_Wl2_Event_Data_Source_Send
@@ -159,12 +169,14 @@ typedef struct _Ecore_Wl2_Event_Data_Source_Send
int fd;
unsigned int seat;
uint32_t serial;
+   Ecore_Wl2_Display *display;
 } Ecore_Wl2_Event_Data_Source_Send;
 
 typedef struct _Ecore_Wl2_Event_Seat_Name
 {
Eina_Stringshare *name;
unsigned int id;
+   Ecore_Wl2_Display *display;
 } Ecore_Wl2_Event_Seat_Name;
 
 typedef struct _Ecore_Wl2_Event_Seat_Capabilities
@@ -173,6 +185,7 @@ typedef struct _Ecore_Wl2_Event_Seat_Capabilities
Eina_Bool pointer_enabled : 1;
Eina_Bool keyboard_enabled : 1;
Eina_Bool touch_enabled : 1;
+   Ecore_Wl2_Display *display;
 } Ecore_Wl2_Event_Seat_Capabilities;
 
 typedef enum
@@ -228,6 +241,7 @@ typedef struct _Ecore_Wl2_Event_Offer_Data_Ready
int len;
const char *mimetype;
unsigned int seat;
+   Ecore_Wl2_Display *display;
 } Ecore_Wl2_Event_Offer_Data_Ready;
 
 typedef enum _Ecore_Wl2_Window_Type
diff --git a/src/lib/ecore_wl2/ecore_wl2_dnd.c 
b/src/lib/ecore_wl2/ecore_wl2_dnd.c
index d00349e..3c52694 100644
--- a/src/lib/ecore_wl2/ecore_wl2_dnd.c
+++ b/src/lib/ecore_wl2/ecore_wl2_dnd.c
@@ -80,6 +80,7 @@ data_source_target_free(void *data EINA_UNUSED, void *event)
if (!ev) return;
 
free(ev->type);
+   ecore_wl2_display_disconnect(ev->display);
free(ev);
 }
 
@@ -95,6 +96,8 @@ data_source_target(void *data, struct wl_data_source *source 
EINA_UNUSED, const
ev = calloc(1, sizeof(Ecore_Wl2_Event_Data_Source_Target));
if (!ev) return;
ev->seat = input->id;
+   ev->display = input->display;
+   ev->display->refs++;
 
if (mime_type) ev->type = strdup(mime_type);
 
@@ -134,6 +137,8 @@ data_source_send(void *data, struct wl_data_source *source, 
const char *mime_typ
  ev->serial = input->data.selection.serial;
else
  ev->serial = input->data.drag.serial;
+   ev->display = input->displa

[EGIT] [core/efl] master 10/27: ecore-wl2: add some accessors for useful Ecore_Wl2_Input struct members

2017-05-12 Thread Mike Blumenkrantz
discomfitor pushed a commit to branch master.

http://git.enlightenment.org/core/efl.git/commit/?id=7c9e3d2dbd293837d84e15317c2c081f239b38a2

commit 7c9e3d2dbd293837d84e15317c2c081f239b38a2
Author: Mike Blumenkrantz 
Date:   Fri May 12 12:08:32 2017 -0400

ecore-wl2: add some accessors for useful Ecore_Wl2_Input struct members

@feature
---
 src/lib/ecore_wl2/Ecore_Wl2.h   | 34 
 src/lib/ecore_wl2/ecore_wl2_input.c | 39 +
 2 files changed, 73 insertions(+)

diff --git a/src/lib/ecore_wl2/Ecore_Wl2.h b/src/lib/ecore_wl2/Ecore_Wl2.h
index e607f7f..a395c1e 100644
--- a/src/lib/ecore_wl2/Ecore_Wl2.h
+++ b/src/lib/ecore_wl2/Ecore_Wl2.h
@@ -944,6 +944,22 @@ EAPI Ecore_Wl2_Seat_Capabilities 
ecore_wl2_input_seat_capabilities_get(Ecore_Wl2
 EAPI unsigned int ecore_wl2_input_seat_id_get(Ecore_Wl2_Input *input);
 
 /**
+ * Get the display object of an input
+ * @param input The input
+ * @return The display
+ * @since 1.20
+ */
+EAPI Ecore_Wl2_Display *ecore_wl2_input_display_get(const Ecore_Wl2_Input 
*input);
+
+/**
+ * Get the xkb_keymap object of an input
+ * @param input The input
+ * @return The xkb_keymap object
+ * @since 1.20
+ */
+EAPI struct xkb_keymap *ecore_wl2_input_keymap_get(const Ecore_Wl2_Input 
*input);
+
+/**
  * Get the name of an input
  * @param input The input
  * @return The name
@@ -952,6 +968,24 @@ EAPI unsigned int 
ecore_wl2_input_seat_id_get(Ecore_Wl2_Input *input);
 EAPI Eina_Stringshare *ecore_wl2_input_name_get(Ecore_Wl2_Input *input);
 
 /**
+ * Get the keyboard repeat rate and delay of an input
+ * @param input The input
+ * @param rate Pointer to store the repeat rate (in seconds)
+ * @param rate Pointer to store the repeat delay (in seconds)
+ * @return True if repeat is enabled
+ * @since 1.20
+ */
+EAPI Eina_Bool ecore_wl2_input_keyboard_repeat_get(const Ecore_Wl2_Input 
*input, double *rate, double *delay);
+
+/**
+ * Get the Evas_Device for the seat belonging to a window from an input
+ * @param input The input
+ * @param window The window
+ * @return The device object
+ * @since 1.20
+ */
+EAPI Eo *ecore_wl2_input_seat_device_get(const Ecore_Wl2_Input *input, const 
Ecore_Wl2_Window *window);
+/**
  * @defgroup Ecore_Wl2_Dnd_Group Wayland Library Drag-n-Drop Functions
  * @ingroup Ecore_Wl2_Group
  *
diff --git a/src/lib/ecore_wl2/ecore_wl2_input.c 
b/src/lib/ecore_wl2/ecore_wl2_input.c
index 56b2c9b..77f5c3d 100644
--- a/src/lib/ecore_wl2/ecore_wl2_input.c
+++ b/src/lib/ecore_wl2/ecore_wl2_input.c
@@ -1620,3 +1620,42 @@ ecore_wl2_input_seat_id_get(Ecore_Wl2_Input *input)
EINA_SAFETY_ON_NULL_RETURN_VAL(input->display, 0);
return input->id;
 }
+
+EAPI Ecore_Wl2_Display *
+ecore_wl2_input_display_get(const Ecore_Wl2_Input *input)
+{
+   EINA_SAFETY_ON_NULL_RETURN_VAL(input, NULL);
+   EINA_SAFETY_ON_NULL_RETURN_VAL(input->display, NULL);
+   return input->display;
+}
+
+EAPI struct xkb_keymap *
+ecore_wl2_input_keymap_get(const Ecore_Wl2_Input *input)
+{
+   EINA_SAFETY_ON_NULL_RETURN_VAL(input, NULL);
+   EINA_SAFETY_ON_NULL_RETURN_VAL(input->display, NULL);
+   EINA_SAFETY_ON_FALSE_RETURN_VAL(input->wl.keyboard, NULL);
+   return input->xkb.keymap;
+}
+
+EAPI Eina_Bool
+ecore_wl2_input_keyboard_repeat_get(const Ecore_Wl2_Input *input, double 
*rate, double *delay)
+{
+   EINA_SAFETY_ON_NULL_RETURN_VAL(input, EINA_FALSE);
+   EINA_SAFETY_ON_NULL_RETURN_VAL(input->display, EINA_FALSE);
+   EINA_SAFETY_ON_FALSE_RETURN_VAL(input->wl.keyboard, EINA_FALSE);
+   if (rate) *rate = input->repeat.rate;
+   if (delay) *delay = input->repeat.delay;
+   return input->repeat.enabled;
+}
+
+EAPI Eo *
+ecore_wl2_input_seat_device_get(const Ecore_Wl2_Input *input, const 
Ecore_Wl2_Window *window)
+{
+   Ecore_Wl2_Input_Devices *devices;
+   EINA_SAFETY_ON_NULL_RETURN_VAL(input, NULL);
+   EINA_SAFETY_ON_NULL_RETURN_VAL(window, NULL);
+
+   devices = _ecore_wl2_devices_get(input, window->id);
+   return devices ?  devices->seat_dev : NULL;
+}

-- 




[EGIT] [core/efl] master 19/27: ecore-wl2: add seat id to most events

2017-05-12 Thread Mike Blumenkrantz
discomfitor pushed a commit to branch master.

http://git.enlightenment.org/core/efl.git/commit/?id=4f2a8b8679ba630d9ced874352650d2f548f979f

commit 4f2a8b8679ba630d9ced874352650d2f548f979f
Author: Mike Blumenkrantz 
Date:   Fri May 12 12:08:32 2017 -0400

ecore-wl2: add seat id to most events

seat id is required in order to handle multiseat environments
---
 src/lib/ecore_wl2/Ecore_Wl2.h | 9 +
 src/lib/ecore_wl2/ecore_wl2_dnd.c | 9 +
 2 files changed, 18 insertions(+)

diff --git a/src/lib/ecore_wl2/Ecore_Wl2.h b/src/lib/ecore_wl2/Ecore_Wl2.h
index 3c8039b..0203f04 100644
--- a/src/lib/ecore_wl2/Ecore_Wl2.h
+++ b/src/lib/ecore_wl2/Ecore_Wl2.h
@@ -103,12 +103,14 @@ typedef struct _Ecore_Wl2_Event_Dnd_Enter
unsigned int win, source;
Ecore_Wl2_Offer *offer;
int x, y;
+   unsigned int seat;
 } Ecore_Wl2_Event_Dnd_Enter;
 
 typedef struct _Ecore_Wl2_Event_Dnd_Leave
 {
unsigned int win, source;
Ecore_Wl2_Offer *offer;
+   unsigned int seat;
 } Ecore_Wl2_Event_Dnd_Leave;
 
 typedef struct _Ecore_Wl2_Event_Dnd_Motion
@@ -116,6 +118,7 @@ typedef struct _Ecore_Wl2_Event_Dnd_Motion
unsigned int win, source;
Ecore_Wl2_Offer *offer;
int x, y;
+   unsigned int seat;
 } Ecore_Wl2_Event_Dnd_Motion;
 
 typedef struct _Ecore_Wl2_Event_Dnd_Drop
@@ -123,17 +126,20 @@ typedef struct _Ecore_Wl2_Event_Dnd_Drop
unsigned int win, source;
int x, y;
Ecore_Wl2_Offer *offer;
+   unsigned int seat;
 } Ecore_Wl2_Event_Dnd_Drop;
 
 typedef struct _Ecore_Wl2_Event_Dnd_End
 {
unsigned int win, source;
+   unsigned int seat;
 } Ecore_Wl2_Event_Dnd_End;
 
 struct _Ecore_Wl2_Event_Data_Source_Event
 {
unsigned int win, source;
Ecore_Wl2_Drag_Action action;
+   unsigned int seat;
uint32_t serial;
 };
 
@@ -144,12 +150,14 @@ typedef struct _Ecore_Wl2_Event_Data_Source_Event 
Ecore_Wl2_Event_Data_Source_Ac
 typedef struct _Ecore_Wl2_Event_Data_Source_Target
 {
char *type;
+   unsigned int seat;
 } Ecore_Wl2_Event_Data_Source_Target;
 
 typedef struct _Ecore_Wl2_Event_Data_Source_Send
 {
char *type;
int fd;
+   unsigned int seat;
uint32_t serial;
 } Ecore_Wl2_Event_Data_Source_Send;
 
@@ -219,6 +227,7 @@ typedef struct _Ecore_Wl2_Event_Offer_Data_Ready
char *data;
int len;
const char *mimetype;
+   unsigned int seat;
 } Ecore_Wl2_Event_Offer_Data_Ready;
 
 typedef enum _Ecore_Wl2_Window_Type
diff --git a/src/lib/ecore_wl2/ecore_wl2_dnd.c 
b/src/lib/ecore_wl2/ecore_wl2_dnd.c
index d86f482..d00349e 100644
--- a/src/lib/ecore_wl2/ecore_wl2_dnd.c
+++ b/src/lib/ecore_wl2/ecore_wl2_dnd.c
@@ -94,6 +94,7 @@ data_source_target(void *data, struct wl_data_source *source 
EINA_UNUSED, const
 
ev = calloc(1, sizeof(Ecore_Wl2_Event_Data_Source_Target));
if (!ev) return;
+   ev->seat = input->id;
 
if (mime_type) ev->type = strdup(mime_type);
 
@@ -128,6 +129,7 @@ data_source_send(void *data, struct wl_data_source *source, 
const char *mime_typ
 
ev->fd = fd;
ev->type = strdup(mime_type);
+   ev->seat = input->id;
if (source == input->data.selection.source)
  ev->serial = input->data.selection.serial;
else
@@ -145,6 +147,8 @@ event_fill(struct _Ecore_Wl2_Event_Data_Source_Event *ev, 
Ecore_Wl2_Input *input
 
ev->win = _win_id_get(input);
ev->action = input->data.drag.action;
+   ev->seat = input->id;
+   ev->serial = input->data.drag.serial;
 }
 
 static void
@@ -264,6 +268,7 @@ _ecore_wl2_dnd_enter(Ecore_Wl2_Input *input, struct 
wl_data_offer *offer, struct
ev->x = x;
ev->y = y;
ev->offer = input->drag;
+   ev->seat = input->id;
 
ecore_event_add(ECORE_WL2_EVENT_DND_ENTER, ev, _unset_serial, input->drag);
 }
@@ -293,6 +298,7 @@ _ecore_wl2_dnd_leave(Ecore_Wl2_Input *input)
ev->win = input->drag->window_id;
ev->offer = input->drag;
ev->offer->ref++;
+   ev->seat = input->id;
 
input->drag->window_id = 0;
ecore_event_add(ECORE_WL2_EVENT_DND_LEAVE, ev, _delay_offer_destroy, 
ev->offer);
@@ -319,6 +325,7 @@ _ecore_wl2_dnd_motion(Ecore_Wl2_Input *input, int x, int y, 
uint32_t serial)
ev->x = x;
ev->y = y;
ev->offer = input->drag;
+   ev->seat = input->id;
 
ecore_event_add(ECORE_WL2_EVENT_DND_MOTION, ev, _unset_serial, input->drag);
 }
@@ -338,6 +345,7 @@ _ecore_wl2_dnd_drop(Ecore_Wl2_Input *input)
ev->x = input->pointer.sx;
ev->y = input->pointer.sy;
ev->offer = input->drag;
+   ev->seat = input->id;
 
ecore_event_add(ECORE_WL2_EVENT_DND_DROP, ev, NULL, NULL);
 }
@@ -755,6 +763,7 @@ _offer_receive_fd_cb(void *data, Ecore_Fd_Handler *fdh)
 ev->data = buf->data;
 ev->len = buf->len;
 ev->mimetype = buf->mimetype;
+ev->seat = buf->offer->input->id;
 ecore_event_add(ECORE_WL2_EVENT_OFFER_DATA_READY, ev, _free_buf, buf);
 
 buf->offer->reads = eina_list_remove(buf->offer->reads, fdh);

-- 




[EGIT] [core/efl] master 16/27: ecore-wl2: change selection setting apis to return the serial of the request

2017-05-12 Thread Mike Blumenkrantz
discomfitor pushed a commit to branch master.

http://git.enlightenment.org/core/efl.git/commit/?id=d51252a69ecbca30cc4c80b1358b3227778e948d

commit d51252a69ecbca30cc4c80b1358b3227778e948d
Author: Mike Blumenkrantz 
Date:   Fri May 12 12:08:32 2017 -0400

ecore-wl2: change selection setting apis to return the serial of the request

in the case where multiple places in an app may be handling selections, this
is necessary in order to manage the selections accurately

@feature
---
 src/lib/ecore_wl2/Ecore_Wl2.h | 11 
 src/lib/ecore_wl2/ecore_wl2_dnd.c | 58 ---
 2 files changed, 36 insertions(+), 33 deletions(-)

diff --git a/src/lib/ecore_wl2/Ecore_Wl2.h b/src/lib/ecore_wl2/Ecore_Wl2.h
index a1cde06..e7e5913 100644
--- a/src/lib/ecore_wl2/Ecore_Wl2.h
+++ b/src/lib/ecore_wl2/Ecore_Wl2.h
@@ -1026,10 +1026,11 @@ EAPI void ecore_wl2_dnd_drag_types_set(Ecore_Wl2_Input 
*input, const char **type
  * @param window the window which is the origin of the drag operation
  *
  * @param drag_window the window which is used as window of the visible hint.
+ * @return The serial for the start_drag request
  *
  * @since 1.17
  */
-EAPI void ecore_wl2_dnd_drag_start(Ecore_Wl2_Input *input, Ecore_Wl2_Window 
*window, Ecore_Wl2_Window *drag_window);
+EAPI uint32_t ecore_wl2_dnd_drag_start(Ecore_Wl2_Input *input, 
Ecore_Wl2_Window *window, Ecore_Wl2_Window *drag_window);
 
 /**
  * End a drag started by a call to ecore_wl2_dnd_drag_start
@@ -1058,22 +1059,22 @@ EAPI Ecore_Wl2_Offer* 
ecore_wl2_dnd_selection_get(Ecore_Wl2_Input *input);
  *
  * @param types a null-terminated array of mimetypes supported by the client
  *
- * @return 1 on success 0 on failure
+ * @return serial of request on sucess, 0 on failure
  *
  * @since 1.17
  */
-EAPI Eina_Bool ecore_wl2_dnd_selection_set(Ecore_Wl2_Input *input, const char 
**types);
+EAPI uint32_t ecore_wl2_dnd_selection_set(Ecore_Wl2_Input *input, const char 
**types);
 
 /**
  * Clear the selection currently setted on this input.
  *
  * @param input the input to clear
  *
- * @return 1 on sucess 0 on failure
+ * @return serial of request on sucess, 0 on failure
  *
  * @since 1.17
  */
-EAPI Eina_Bool ecore_wl2_dnd_selection_clear(Ecore_Wl2_Input *input);
+EAPI uint32_t ecore_wl2_dnd_selection_clear(Ecore_Wl2_Input *input);
 
 /**
  * @defgroup Ecore_Wl2_Subsurface_Group Functions to manipulate subsurfaces.
diff --git a/src/lib/ecore_wl2/ecore_wl2_dnd.c 
b/src/lib/ecore_wl2/ecore_wl2_dnd.c
index 45e79d3..8a4f5df 100644
--- a/src/lib/ecore_wl2/ecore_wl2_dnd.c
+++ b/src/lib/ecore_wl2/ecore_wl2_dnd.c
@@ -412,14 +412,14 @@ ecore_wl2_dnd_drag_types_set(Ecore_Wl2_Input *input, 
const char **types)
  }
 }
 
-EAPI void
+EAPI uint32_t
 ecore_wl2_dnd_drag_start(Ecore_Wl2_Input *input, Ecore_Wl2_Window *window, 
Ecore_Wl2_Window *drag_window)
 {
struct wl_surface *dsurface, *osurface;
 
-   EINA_SAFETY_ON_NULL_RETURN(input);
-   EINA_SAFETY_ON_NULL_RETURN(input->data.drag.source);
-   EINA_SAFETY_ON_NULL_RETURN(drag_window);
+   EINA_SAFETY_ON_NULL_RETURN_VAL(input, 0);
+   EINA_SAFETY_ON_NULL_RETURN_VAL(input->data.drag.source, 0);
+   EINA_SAFETY_ON_NULL_RETURN_VAL(drag_window, 0);
 
dsurface = ecore_wl2_window_surface_get(drag_window);
 
@@ -436,9 +436,11 @@ ecore_wl2_dnd_drag_start(Ecore_Wl2_Input *input, 
Ecore_Wl2_Window *window, Ecore
 
 wl_data_device_start_drag(input->data.device, input->data.drag.source,
   osurface, dsurface, input->display->serial);
+input->data.drag.serial = input->display->serial;
 
 ecore_wl2_window_cursor_from_name_set(window, "move");
  }
+   return input->data.drag.serial;
 }
 
 EAPI void
@@ -481,67 +483,67 @@ ecore_wl2_dnd_selection_get(Ecore_Wl2_Input *input)
return input->selection;
 }
 
-EAPI Eina_Bool
+EAPI uint32_t
 ecore_wl2_dnd_selection_set(Ecore_Wl2_Input *input, const char **types)
 {
struct wl_data_device_manager *manager;
const char **type;
char **t;
 
-   EINA_SAFETY_ON_NULL_RETURN_VAL(input, EINA_FALSE);
-   EINA_SAFETY_ON_NULL_RETURN_VAL(input->display, EINA_FALSE);
+   EINA_SAFETY_ON_NULL_RETURN_VAL(input, 0);
+   EINA_SAFETY_ON_NULL_RETURN_VAL(input->display, 0);
 
manager = input->display->wl.data_device_manager;
-   if (!manager) return EINA_FALSE;
+   if (!manager) return 0;
 
-   if (input->data.types.data)
+   if (input->data.selection.types.data)
  {
-wl_array_for_each(t, &input->data.types)
+wl_array_for_each(t, &input->data.selection.types)
   free(*t);
-wl_array_release(&input->data.types);
-wl_array_init(&input->data.types);
+wl_array_release(&input->data.selection.types);
+wl_array_init(&input->data.selection.types);
  }
 
-   input->data.source = NULL;
+   input->data.selection.source = NULL;
 
-   if (!types[0]) return EINA_FALSE;
+   if (!types[0]) return 0;
 
-   input->data.source = wl_data_device_manage

[EGIT] [core/efl] master 20/27: ecore-wl2: add const to internal function param

2017-05-12 Thread Mike Blumenkrantz
discomfitor pushed a commit to branch master.

http://git.enlightenment.org/core/efl.git/commit/?id=1a7279f72eb0335c74d1fdeb62f67b88582d034c

commit 1a7279f72eb0335c74d1fdeb62f67b88582d034c
Author: Mike Blumenkrantz 
Date:   Fri May 12 12:08:32 2017 -0400

ecore-wl2: add const to internal function param
---
 src/lib/ecore_wl2/ecore_wl2_input.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/lib/ecore_wl2/ecore_wl2_input.c 
b/src/lib/ecore_wl2/ecore_wl2_input.c
index 77f5c3d..f7fea12 100644
--- a/src/lib/ecore_wl2/ecore_wl2_input.c
+++ b/src/lib/ecore_wl2/ecore_wl2_input.c
@@ -57,7 +57,7 @@ _ecore_wl2_input_mouse_down_info_get(int device)
 }
 
 static Ecore_Wl2_Input_Devices *
-_ecore_wl2_devices_get(Ecore_Wl2_Input *input, int window_id)
+_ecore_wl2_devices_get(const Ecore_Wl2_Input *input, int window_id)
 {
Ecore_Wl2_Input_Devices *devices;
Eina_List *l;

-- 




[EGIT] [core/efl] master 27/27: ecore-wl2: add functions for proxying a selection receive externally

2017-05-12 Thread Mike Blumenkrantz
discomfitor pushed a commit to branch master.

http://git.enlightenment.org/core/efl.git/commit/?id=68a3f43d1e508f4825ee0a9dad99d929d779ec1a

commit 68a3f43d1e508f4825ee0a9dad99d929d779ec1a
Author: Mike Blumenkrantz 
Date:   Fri May 12 12:08:32 2017 -0400

ecore-wl2: add functions for proxying a selection receive externally

in some cases (e.g,, x11 bridged selections) it is necessary to use
alternate means when transferring a selection, and so performing the
entire piped receive is not necessary. instead, extend the lifetime
of the data offer until the proxied receive has completed

@feature
---
 src/lib/ecore_wl2/Ecore_Wl2.h | 22 ++
 src/lib/ecore_wl2/ecore_wl2_dnd.c | 21 +
 2 files changed, 43 insertions(+)

diff --git a/src/lib/ecore_wl2/Ecore_Wl2.h b/src/lib/ecore_wl2/Ecore_Wl2.h
index e791ef8..dc5d12c 100644
--- a/src/lib/ecore_wl2/Ecore_Wl2.h
+++ b/src/lib/ecore_wl2/Ecore_Wl2.h
@@ -1412,6 +1412,28 @@ EAPI void ecore_wl2_offer_accept(Ecore_Wl2_Offer *offer, 
const char *mime_type);
 EAPI void ecore_wl2_offer_receive(Ecore_Wl2_Offer *offer, char *mime);
 
 /**
+ * Request the data from this offer on an externally managed fd.
+ * The event ECORE_WL2_EVENT_OFFER_DATA_READY is called when the data is 
available.
+ * There offer will be not destroyed as long as requested data is not emitted 
by the event.
+ *
+ * @param offer the offer to use
+ * @param mime the mimetype to receive
+ * @param fd the fd to pass for receiving
+ *
+ * @since 1.20
+ */
+EAPI void ecore_wl2_offer_proxy_receive(Ecore_Wl2_Offer *offer, const char 
*mime, int fd);
+
+/**
+ * End the use of a proxy received offer. This may invalidate the offer object
+ *
+ * @param offer the offer
+ *
+ * @since 1.20
+ */
+EAPI void ecore_wl2_offer_proxy_receive_end(Ecore_Wl2_Offer *offer);
+
+/**
  * Check if the given offer supports the given mimetype
  *
  * @param offer the offer to use
diff --git a/src/lib/ecore_wl2/ecore_wl2_dnd.c 
b/src/lib/ecore_wl2/ecore_wl2_dnd.c
index e7c8da8..fc0dfd2 100644
--- a/src/lib/ecore_wl2/ecore_wl2_dnd.c
+++ b/src/lib/ecore_wl2/ecore_wl2_dnd.c
@@ -54,6 +54,7 @@ struct _Ecore_Wl2_Offer
Eina_List *reads;
int ref;
unsigned int window_id;
+   Eina_Bool proxied : 1;
 };
 
 static int
@@ -862,6 +863,26 @@ ecore_wl2_offer_receive(Ecore_Wl2_Offer *offer, char *mime)
 }
 
 EAPI void
+ecore_wl2_offer_proxy_receive(Ecore_Wl2_Offer *offer, const char *mime, int fd)
+{
+   EINA_SAFETY_ON_NULL_RETURN(offer);
+
+   if (!offer->proxied) offer->ref++;
+   offer->proxied = 1;
+   wl_data_offer_receive(offer->offer, mime, fd);
+}
+
+EAPI void
+ecore_wl2_offer_proxy_receive_end(Ecore_Wl2_Offer *offer)
+{
+   EINA_SAFETY_ON_NULL_RETURN(offer);
+
+   if (!offer->proxied) return;
+   offer->proxied = 0;
+   _ecore_wl2_offer_unref(offer);
+}
+
+EAPI void
 ecore_wl2_offer_finish(Ecore_Wl2_Offer *offer)
 {
EINA_SAFETY_ON_NULL_RETURN(offer);

-- 




[EGIT] [core/efl] master 25/27: ecore-wl2: add function for accepting a single mime type

2017-05-12 Thread Mike Blumenkrantz
discomfitor pushed a commit to branch master.

http://git.enlightenment.org/core/efl.git/commit/?id=f6964f50e3ed0da6ee853a57ca7e82181021112b

commit f6964f50e3ed0da6ee853a57ca7e82181021112b
Author: Mike Blumenkrantz 
Date:   Fri May 12 12:08:32 2017 -0400

ecore-wl2: add function for accepting a single mime type

@feature
---
 src/lib/ecore_wl2/Ecore_Wl2.h | 10 ++
 src/lib/ecore_wl2/ecore_wl2_dnd.c |  8 
 2 files changed, 18 insertions(+)

diff --git a/src/lib/ecore_wl2/Ecore_Wl2.h b/src/lib/ecore_wl2/Ecore_Wl2.h
index cd8146f..79cd8e5 100644
--- a/src/lib/ecore_wl2/Ecore_Wl2.h
+++ b/src/lib/ecore_wl2/Ecore_Wl2.h
@@ -1380,6 +1380,16 @@ EAPI Eina_Array* 
ecore_wl2_offer_mimes_get(Ecore_Wl2_Offer *offer);
 EAPI void ecore_wl2_offer_mimes_set(Ecore_Wl2_Offer *offer, Eina_Array *mimes);
 
 /**
+ * Accept a single mime type for an offer
+ *
+ * @param offer the offer to use
+ * @param mime_type the mime type
+ *
+ * @since 1.20
+ */
+EAPI void ecore_wl2_offer_accept(Ecore_Wl2_Offer *offer, const char 
*mime_type);
+
+/**
  * Request the data from this offer.
  * The event ECORE_WL2_EVENT_OFFER_DATA_READY is called when the data is 
available.
  * There offer will be not destroyed as long as requested data is not emitted 
by the event.
diff --git a/src/lib/ecore_wl2/ecore_wl2_dnd.c 
b/src/lib/ecore_wl2/ecore_wl2_dnd.c
index 76e1459..e64fb21 100644
--- a/src/lib/ecore_wl2/ecore_wl2_dnd.c
+++ b/src/lib/ecore_wl2/ecore_wl2_dnd.c
@@ -744,6 +744,14 @@ ecore_wl2_offer_mimes_set(Ecore_Wl2_Offer *offer, 
Eina_Array *mimes)
  wl_data_offer_accept(offer->offer, offer->serial, NULL);
 }
 
+EAPI void
+ecore_wl2_offer_accept(Ecore_Wl2_Offer *offer, const char *mime_type)
+{
+   EINA_SAFETY_ON_NULL_RETURN(offer);
+
+   wl_data_offer_accept(offer->offer, offer->serial, mime_type);
+}
+
 typedef struct {
int len;
void *data;

-- 




[EGIT] [core/efl] master 15/27: ecore-wl2: remove ERR when trying to find the focused window id

2017-05-12 Thread Mike Blumenkrantz
discomfitor pushed a commit to branch master.

http://git.enlightenment.org/core/efl.git/commit/?id=5869767355b524f2d85942f246bdc296756302e7

commit 5869767355b524f2d85942f246bdc296756302e7
Author: Mike Blumenkrantz 
Date:   Fri May 12 12:08:32 2017 -0400

ecore-wl2: remove ERR when trying to find the focused window id

this can trigger in the case where a selection transfer occurs and
no input resource has received an enter (e.g., the window is not focused)

@fix
---
 src/lib/ecore_wl2/ecore_wl2_dnd.c | 3 ---
 1 file changed, 3 deletions(-)

diff --git a/src/lib/ecore_wl2/ecore_wl2_dnd.c 
b/src/lib/ecore_wl2/ecore_wl2_dnd.c
index b7a18bb..45e79d3 100644
--- a/src/lib/ecore_wl2/ecore_wl2_dnd.c
+++ b/src/lib/ecore_wl2/ecore_wl2_dnd.c
@@ -68,9 +68,6 @@ _win_id_get(Ecore_Wl2_Input *input)
else if (input->focus.keyboard)
  win = input->focus.keyboard->id;
 
-   if (win == 0)
- ERR("Failed to fetch window id");
-
return win;
 }
 

-- 




[EGIT] [core/efl] master 01/01: Shelf/Gadget themes... Update with proper horiz/vert theme strings for future theme developers.

2017-05-12 Thread Stephen 'Okra' Houston
okra pushed a commit to branch master.

http://git.enlightenment.org/core/efl.git/commit/?id=ad2ba804c69e38cc925e80ace843fe400e303319

commit ad2ba804c69e38cc925e80ace843fe400e303319
Author: Stephen 'Okra' Houston 
Date:   Fri May 12 15:35:46 2017 -0500

Shelf/Gadget themes... Update with proper horiz/vert theme strings for 
future theme developers.
---
 data/elementary/themes/edc/backlight.edc | 1 +
 data/elementary/themes/edc/mixer.edc | 1 +
 data/elementary/themes/edc/xkbswitch.edc | 2 ++
 3 files changed, 4 insertions(+)

diff --git a/data/elementary/themes/edc/backlight.edc 
b/data/elementary/themes/edc/backlight.edc
index 4387663..9313602 100644
--- a/data/elementary/themes/edc/backlight.edc
+++ b/data/elementary/themes/edc/backlight.edc
@@ -1,4 +1,5 @@
 group { name: "e/modules/backlight/main";
+   alias: "e/modules/backlight/main_vert";
images.image: "bulb_glow.png" COMP;
images.image: "bulb_off.png" COMP;
images.image: "bulb_on.png" COMP;
diff --git a/data/elementary/themes/edc/mixer.edc 
b/data/elementary/themes/edc/mixer.edc
index 149820b..802b1b8 100644
--- a/data/elementary/themes/edc/mixer.edc
+++ b/data/elementary/themes/edc/mixer.edc
@@ -1,4 +1,5 @@
 group { name: "e/modules/mixer/main";
+   alias: "e/modules/mixer/main_vert";
images.image: "speaker.png" COMP;
images.image: "inset_round_hilight.png" COMP;
images.image: "inset_round_shadow.png" COMP;
diff --git a/data/elementary/themes/edc/xkbswitch.edc 
b/data/elementary/themes/edc/xkbswitch.edc
index bd61ffc..b6a58b8 100644
--- a/data/elementary/themes/edc/xkbswitch.edc
+++ b/data/elementary/themes/edc/xkbswitch.edc
@@ -1,4 +1,5 @@
 group { name: "e/modules/xkbswitch/main";
+   alias: "e/modules/xkbswitch/main_vert";
images.image: "shadow_square_tiny.png" COMP;
images.image: "bevel_out.png" COMP;
images.image: "shine.png" COMP;
@@ -91,6 +92,7 @@ group { name: "e/modules/xkbswitch/main";
 }
 
 group { name: "e/modules/xkbswitch/noflag";
+   alias: "e/modules/xkbswitch/noflag_vert";
images.image: "shadow_square_tiny.png" COMP;
images.image: "bevel_out.png" COMP;
images.image: "shine.png" COMP;

-- 




[EGIT] [core/enlightenment] master 01/01: Gadgets: Send proper theme strings, and set aspect/size correctly.

2017-05-12 Thread Stephen 'Okra' Houston
okra pushed a commit to branch master.

http://git.enlightenment.org/core/enlightenment.git/commit/?id=9d0bcd9ce28d69c96aae8b01c93c8854aef2ae7d

commit 9d0bcd9ce28d69c96aae8b01c93c8854aef2ae7d
Author: Stephen 'Okra' Houston 
Date:   Fri May 12 15:37:59 2017 -0500

Gadgets: Send proper theme strings, and set aspect/size correctly.
---
 src/modules/backlight/gadget/backlight.c | 25 ++---
 src/modules/mixer/gadget/mixer.c | 26 --
 src/modules/xkbswitch/gadget/xkbswitch.c | 47 
 3 files changed, 80 insertions(+), 18 deletions(-)

diff --git a/src/modules/backlight/gadget/backlight.c 
b/src/modules/backlight/gadget/backlight.c
index 1756a70..9118d18 100644
--- a/src/modules/backlight/gadget/backlight.c
+++ b/src/modules/backlight/gadget/backlight.c
@@ -218,6 +218,16 @@ _backlight_gadget_configure(Evas_Object *g EINA_UNUSED)
 }
 
 static void
+_backlight_resize_cb(void *data, Evas *e EINA_UNUSED, Evas_Object *obj 
EINA_UNUSED, void *event_data EINA_UNUSED)
+{
+   Evas_Coord w, h;
+   Instance *inst = data;
+
+   edje_object_parts_extends_calc(elm_layout_edje_get(inst->o_backlight), 0, 
0, &w, &h);
+   evas_object_size_hint_aspect_set(inst->o_main, EVAS_ASPECT_CONTROL_BOTH, w, 
h);
+}
+
+static void
 _backlight_gadget_created_cb(void *data, Evas_Object *obj, void *event_info 
EINA_UNUSED)
 {
Instance *inst = data;
@@ -225,12 +235,16 @@ _backlight_gadget_created_cb(void *data, Evas_Object 
*obj, void *event_info EINA
if (inst->o_main)
  {
 e_gadget_configure_cb_set(inst->o_main, _backlight_gadget_configure);
-//_backlight_orient(inst, e_gadget_site_orient_get(obj));
-
+ 
 inst->o_backlight = elm_layout_add(inst->o_main);
 E_EXPAND(inst->o_backlight);
 E_FILL(inst->o_backlight);
-e_theme_edje_object_set(inst->o_backlight,
+if (inst->orient == E_GADGET_SITE_ORIENT_VERTICAL)
+  e_theme_edje_object_set(inst->o_backlight,
+ "base/theme/modules/backlight",
+ "e/modules/backlight/main_vert");
+else
+  e_theme_edje_object_set(inst->o_backlight,
  "base/theme/modules/backlight",
  "e/modules/backlight/main");
 evas_object_event_callback_add(inst->o_backlight,
@@ -241,6 +255,10 @@ _backlight_gadget_created_cb(void *data, Evas_Object *obj, 
void *event_info EINA
   EVAS_CALLBACK_MOUSE_WHEEL,
   _backlight_cb_mouse_wheel,
   inst);
+evas_object_event_callback_add(inst->o_backlight,
+  EVAS_CALLBACK_RESIZE,
+  _backlight_resize_cb,
+  inst);
 elm_box_pack_end(inst->o_main, inst->o_backlight);
 evas_object_show(inst->o_backlight);
  }
@@ -268,7 +286,6 @@ backlight_gadget_create(Evas_Object *parent, int *id 
EINA_UNUSED, E_Gadget_Site_
inst->orient = orient;
E_EXPAND(inst->o_main);
E_FILL(inst->o_main);
-   evas_object_size_hint_aspect_set(inst->o_main, EVAS_ASPECT_CONTROL_BOTH, 1, 
1);
evas_object_smart_callback_add(parent, "gadget_created", 
_backlight_gadget_created_cb, inst);
evas_object_event_callback_add(inst->o_main, EVAS_CALLBACK_DEL, 
backlight_del, inst);
 
diff --git a/src/modules/mixer/gadget/mixer.c b/src/modules/mixer/gadget/mixer.c
index 3f58259..66d5ad3 100644
--- a/src/modules/mixer/gadget/mixer.c
+++ b/src/modules/mixer/gadget/mixer.c
@@ -45,6 +45,7 @@ struct _Instance
Evas_Object *list;
Evas_Object *slider;
Evas_Object *check;
+   E_Gadget_Site_Orient orient;
Eina_Bool mute;
 };
 
@@ -586,6 +587,16 @@ _mixer_gadget_configure(Evas_Object *g EINA_UNUSED)
 }
 
 static void
+_mixer_resize_cb(void *data, Evas *e EINA_UNUSED, Evas_Object *obj 
EINA_UNUSED, void *event_data EINA_UNUSED)
+{
+   Evas_Coord w, h;
+   Instance *inst = data;
+
+   edje_object_parts_extends_calc(elm_layout_edje_get(inst->o_mixer), 0, 0, 
&w, &h);
+   evas_object_size_hint_aspect_set(inst->o_main, EVAS_ASPECT_CONTROL_BOTH, w, 
h);
+}
+
+static void
 _mixer_gadget_created_cb(void *data, Evas_Object *obj, void *event_info 
EINA_UNUSED)
 {
Instance *inst = data;
@@ -597,11 +608,20 @@ _mixer_gadget_created_cb(void *data, Evas_Object *obj, 
void *event_info EINA_UNU
 inst->o_mixer = elm_layout_add(inst->o_main);
 E_EXPAND(inst->o_mixer);
 E_FILL(inst->o_mixer);
-e_theme_edje_object_set(inst->o_mixer, "base/theme/modules/mixer", 
"e/modules/mixer/main");
+   if (inst->orient == E_GADGET_SITE_ORIENT_VERTICAL)
+  e_theme_edje_object_set(inst->o_mixer,
+ "base/theme/modules/mixer",
+ "e/modules/mixer/main_vert");
+else
+  e_theme_edje_object_set(inst->o_mixer,
+ "bas

[EGIT] [core/efl] master 03/03: evas: simplify fb engine.

2017-05-12 Thread Cedric BAIL
cedric pushed a commit to branch master.

http://git.enlightenment.org/core/efl.git/commit/?id=69b941f018a5e289f4eb34adcfdc774c0d9a2409

commit 69b941f018a5e289f4eb34adcfdc774c0d9a2409
Author: Cedric BAIL 
Date:   Fri May 12 15:24:25 2017 -0700

evas: simplify fb engine.
---
 src/modules/evas/engines/fb/evas_engine.c | 15 +--
 1 file changed, 5 insertions(+), 10 deletions(-)

diff --git a/src/modules/evas/engines/fb/evas_engine.c 
b/src/modules/evas/engines/fb/evas_engine.c
index 2f5897e..6fb6c94 100644
--- a/src/modules/evas/engines/fb/evas_engine.c
+++ b/src/modules/evas/engines/fb/evas_engine.c
@@ -14,12 +14,7 @@ static Eina_List *_outbufs = NULL;
 static Evas_Func func, pfunc;
 
 /* engine struct data */
-typedef struct _Render_Engine Render_Engine;
-
-struct _Render_Engine
-{
-   Render_Engine_Software_Generic generic;
-};
+typedef Render_Engine_Software_Generic Render_Engine;
 
 /* internal engine routines */
 static void *
@@ -38,7 +33,7 @@ _output_setup(int w, int h, int rot, int vt, int dev, int 
refresh)
ob = evas_fb_outbuf_fb_setup_fb(w, h, rot, OUTBUF_DEPTH_INHERIT, vt, dev, 
refresh);
if (!ob) goto on_error;
 
-   if (!evas_render_engine_software_generic_init(&re->generic, ob, NULL,
+   if (!evas_render_engine_software_generic_init(re, ob, NULL,
  evas_fb_outbuf_fb_get_rot,
  evas_fb_outbuf_fb_reconfigure,
  NULL,
@@ -106,8 +101,8 @@ eng_output_free(void *engine EINA_UNUSED, void *data)
re = (Render_Engine *)data;
if (re)
  {
-_outbufs = eina_list_remove(_outbufs, re->generic.ob);
-evas_render_engine_software_generic_clean(&re->generic);
+_outbufs = eina_list_remove(_outbufs, re->ob);
+evas_render_engine_software_generic_clean(re);
 free(re);
  }
 }
@@ -118,7 +113,7 @@ eng_canvas_alpha_get(void *data)
Render_Engine *re;
 
re = (Render_Engine *)data;
-   return (re->generic.ob->priv.fb.fb->fb_var.transp.length > 0);
+   return (re->ob->priv.fb.fb->fb_var.transp.length > 0);
 }
 
 /* module advertising code */

-- 




[EGIT] [core/efl] master 02/03: evas: simplify buffer engine.

2017-05-12 Thread Cedric BAIL
cedric pushed a commit to branch master.

http://git.enlightenment.org/core/efl.git/commit/?id=a660ee9e1928c89d6dd2035ad0481476b110e427

commit a660ee9e1928c89d6dd2035ad0481476b110e427
Author: Cedric BAIL 
Date:   Fri May 12 15:10:28 2017 -0700

evas: simplify buffer engine.
---
 src/modules/evas/engines/buffer/evas_engine.c | 15 +--
 1 file changed, 5 insertions(+), 10 deletions(-)

diff --git a/src/modules/evas/engines/buffer/evas_engine.c 
b/src/modules/evas/engines/buffer/evas_engine.c
index dc577e9..0ad83cf 100644
--- a/src/modules/evas/engines/buffer/evas_engine.c
+++ b/src/modules/evas/engines/buffer/evas_engine.c
@@ -17,12 +17,7 @@ static Evas_Func func, pfunc;
 
 
 /* engine struct data */
-typedef struct _Render_Engine Render_Engine;
-
-struct _Render_Engine
-{
-   Render_Engine_Software_Generic generic;
-};
+typedef Render_Engine_Software_Generic Render_Engine;
 
 /* prototypes we will use here */
 static void *_output_setup(int w, int h, void *dest_buffer, int 
dest_buffer_row_bytes, int depth_type, int use_color_key, int alpha_threshold, 
int color_key_r, int color_key_g, int color_key_b, void *(*new_update_region) 
(int x, int y, int w, int h, int *row_bytes), void (*free_update_region) (int 
x, int y, int w, int h, void *data), void *(*switch_buffer) (void *data, void 
*dest_buffer), void *switch_data);
@@ -88,7 +83,7 @@ _output_setup(int w,
 switch_data);
if (!ob) goto on_error;
 
-   if (!evas_render_engine_software_generic_init(&re->generic, ob,
+   if (!evas_render_engine_software_generic_init(re, ob,
  
evas_buffer_outbuf_buf_swap_mode_get,
  
evas_buffer_outbuf_buf_rot_get,
  
evas_buffer_outbuf_reconfigure,
@@ -159,7 +154,7 @@ eng_output_free(void *engine EINA_UNUSED, void *data)
 
if ((re = (Render_Engine *)data))
  {
-evas_render_engine_software_generic_clean(&re->generic);
+evas_render_engine_software_generic_clean(re);
 free(re);
  }
 }
@@ -170,8 +165,8 @@ eng_canvas_alpha_get(void *data)
Render_Engine *re;
 
if ((re = (Render_Engine *)data))
- if (re->generic.ob->priv.back_buf)
-   return re->generic.ob->priv.back_buf->cache_entry.flags.alpha;
+ if (re->ob->priv.back_buf)
+   return re->ob->priv.back_buf->cache_entry.flags.alpha;
return EINA_TRUE;
 }
 

-- 




[EGIT] [core/efl] master 02/03: ecore_drm2: Add some safety checks for accessing dead fbs

2017-05-12 Thread Derek Foreman
derekf pushed a commit to branch master.

http://git.enlightenment.org/core/efl.git/commit/?id=44b57b5dfac1a61dcbfe7192f62460ab2e9ef5ca

commit 44b57b5dfac1a61dcbfe7192f62460ab2e9ef5ca
Author: Derek Foreman 
Date:   Fri May 12 14:42:02 2017 -0500

ecore_drm2: Add some safety checks for accessing dead fbs

Accessing an fb after discarding it is bad karma, so we should log something
if it ever happens.
---
 src/lib/ecore_drm2/ecore_drm2_fb.c | 8 
 1 file changed, 8 insertions(+)

diff --git a/src/lib/ecore_drm2/ecore_drm2_fb.c 
b/src/lib/ecore_drm2/ecore_drm2_fb.c
index b5161c6..8ef2d82 100644
--- a/src/lib/ecore_drm2/ecore_drm2_fb.c
+++ b/src/lib/ecore_drm2/ecore_drm2_fb.c
@@ -195,6 +195,7 @@ EAPI void *
 ecore_drm2_fb_data_get(Ecore_Drm2_Fb *fb)
 {
EINA_SAFETY_ON_NULL_RETURN_VAL(fb, NULL);
+   EINA_SAFETY_ON_TRUE_RETURN_VAL(fb->dead, NULL);
return fb->mmap;
 }
 
@@ -202,6 +203,7 @@ EAPI unsigned int
 ecore_drm2_fb_size_get(Ecore_Drm2_Fb *fb)
 {
EINA_SAFETY_ON_NULL_RETURN_VAL(fb, 0);
+   EINA_SAFETY_ON_TRUE_RETURN_VAL(fb->dead, 0);
return fb->sizes[0];
 }
 
@@ -209,6 +211,8 @@ EAPI unsigned int
 ecore_drm2_fb_stride_get(Ecore_Drm2_Fb *fb)
 {
EINA_SAFETY_ON_NULL_RETURN_VAL(fb, 0);
+   EINA_SAFETY_ON_TRUE_RETURN_VAL(fb->dead, 0);
+
return fb->strides[0];
 }
 
@@ -217,6 +221,7 @@ ecore_drm2_fb_dirty(Ecore_Drm2_Fb *fb, Eina_Rectangle 
*rects, unsigned int count
 {
EINA_SAFETY_ON_NULL_RETURN(fb);
EINA_SAFETY_ON_NULL_RETURN(rects);
+   EINA_SAFETY_ON_TRUE_RETURN(fb->dead);
 
 #ifdef DRM_MODE_FEATURE_DIRTYFB
drmModeClip *clip;
@@ -573,6 +578,7 @@ EAPI Eina_Bool
 ecore_drm2_fb_busy_get(Ecore_Drm2_Fb *fb)
 {
EINA_SAFETY_ON_NULL_RETURN_VAL(fb, EINA_FALSE);
+   EINA_SAFETY_ON_TRUE_RETURN_VAL(fb->dead, EINA_FALSE);
 
return !!(fb->ref - 1);
 }
@@ -616,6 +622,8 @@ EAPI void *
 ecore_drm2_fb_bo_get(Ecore_Drm2_Fb *fb)
 {
EINA_SAFETY_ON_NULL_RETURN_VAL(fb, NULL);
+   EINA_SAFETY_ON_TRUE_RETURN_VAL(fb->dead, NULL);
+
return fb->gbm_bo;
 }
 

-- 




[EGIT] [core/efl] master 03/03: ee_drm: Remove some commented out code

2017-05-12 Thread Derek Foreman
derekf pushed a commit to branch master.

http://git.enlightenment.org/core/efl.git/commit/?id=1c60ac3bc9dfcfed58f15ac1c8c8f9564149b067

commit 1c60ac3bc9dfcfed58f15ac1c8c8f9564149b067
Author: Derek Foreman 
Date:   Fri May 12 14:51:39 2017 -0500

ee_drm: Remove some commented out code

I think this was intended as a reminder to do something that's already
been done.  Or something.
---
 src/modules/evas/engines/drm/evas_outbuf.c | 35 --
 1 file changed, 35 deletions(-)

diff --git a/src/modules/evas/engines/drm/evas_outbuf.c 
b/src/modules/evas/engines/drm/evas_outbuf.c
index f890854..99e8f42 100644
--- a/src/modules/evas/engines/drm/evas_outbuf.c
+++ b/src/modules/evas/engines/drm/evas_outbuf.c
@@ -26,41 +26,6 @@ _outbuf_buffer_swap(Outbuf *ob, Eina_Rectangle *rects, 
unsigned int count)
ecore_drm2_fb_flip(ofb->fb, ob->priv.output);
ofb->drawn = EINA_TRUE;
ofb->age = 0;
-
-   /* plane = ecore_drm2_plane_find(ob->priv.output, ofb->fb, ob->format); */
-   /* if (plane) */
-   /*   { */
-   /*  drmVBlank vbl = */
-   /*{ */
-   /*   .request.type = DRM_VBLANK_RELATIVE | DRM_VBLANK_EVENT, */
-   /*   .request.sequence = 1, */
-   /*}; */
-
-   /*  vbl.request.type |= ecore_drm2_output_vblank_get(ob->priv.output); 
*/
-   /*  vbl.request.signal = (unsigned long)ofb; */
-
-   /*  ecore_drm2_fb_dirty(ofb->fb, rects, count); */
-
-   /*  if (!ecore_drm2_plane_fb_set(plane, ofb->fb)) */
-   /*{ */
-   /*   ERR("Failed to set FB on Plane"); */
-   /*   return; */
-   /*} */
-
-   /*  if (drmWaitVBlank(ob->fd, &vbl) < 0) */
-   /*{ */
-   /*   _outbuf_tick_source_set(NULL); */
-   /*   return; */
-   /*} */
-
-   /*  ofb->busy = EINA_TRUE; */
-   /*  ofb->drawn = EINA_TRUE; */
-   /*  ofb->age = 0; */
-
-   /*  ob->priv.current = NULL; */
-   /*   } */
-   /* else */
-   /*   WRN("Could not find a plane for this framebuffer"); */
 }
 
 static Eina_Bool

-- 




[EGIT] [core/efl] master 01/03: ecore_drm2: refcount fbs

2017-05-12 Thread Derek Foreman
derekf pushed a commit to branch master.

http://git.enlightenment.org/core/efl.git/commit/?id=edcbff59b72ef8b26af99c1cb3c38f4ffb48282a

commit edcbff59b72ef8b26af99c1cb3c38f4ffb48282a
Author: Derek Foreman 
Date:   Fri May 12 14:41:03 2017 -0500

ecore_drm2: refcount fbs

Removes the previous "busy" flag, as now we might have an fb attached to
multiple outputs at once, and need to be careful to destroy them only
after they've been removed from all outputs.

Removed the old "busy_set" API which nothing used, and renames fb_destroy
to fb_discard to make it more clear that it's not immediately destroyed.

It's all beta api, so I can do this.
---
 src/lib/ecore_drm2/Ecore_Drm2.h   | 33 +-
 src/lib/ecore_drm2/ecore_drm2_fb.c| 65 ++-
 src/lib/ecore_drm2/ecore_drm2_plane.c | 17 +--
 src/lib/ecore_drm2/ecore_drm2_private.h   |  9 ++--
 src/modules/evas/engines/drm/evas_outbuf.c|  2 +-
 src/modules/evas/engines/gl_drm/evas_outbuf.c |  2 +-
 6 files changed, 76 insertions(+), 52 deletions(-)

diff --git a/src/lib/ecore_drm2/Ecore_Drm2.h b/src/lib/ecore_drm2/Ecore_Drm2.h
index af2f396..7d52d3a 100644
--- a/src/lib/ecore_drm2/Ecore_Drm2.h
+++ b/src/lib/ecore_drm2/Ecore_Drm2.h
@@ -803,16 +803,6 @@ EAPI Ecore_Drm2_Fb *ecore_drm2_fb_create(int fd, int 
width, int height, int dept
 EAPI Ecore_Drm2_Fb *ecore_drm2_fb_gbm_create(int fd, int width, int height, 
int depth, int bpp, unsigned int format, unsigned int handle, unsigned int 
stride, void *bo);
 
 /**
- * Destroy a framebuffer object
- *
- * @param fb
- *
- * @ingroup Ecore_Drm2_Fb_Group
- * @since 1.18
- */
-EAPI void ecore_drm2_fb_destroy(Ecore_Drm2_Fb *fb);
-
-/**
  * Get a framebuffer's mmap'd data
  *
  * @param fb
@@ -901,17 +891,6 @@ EAPI Eina_Bool 
ecore_drm2_fb_flip_complete(Ecore_Drm2_Output *output);
 EAPI Eina_Bool ecore_drm2_fb_busy_get(Ecore_Drm2_Fb *fb);
 
 /**
- * Change the Ecore_Drm2_Fb's busy status
- *
- * @param fb
- * @param busy The new busy status
- *
- * @ingroup Ecore_Drm2_Fb_Group
- * @since 1.19
- */
-EAPI void ecore_drm2_fb_busy_set(Ecore_Drm2_Fb *fb, Eina_Bool busy);
-
-/**
  * Try to force a framebuffer release for an output
  *
  * This tries to release the next or optionally pending, or current
@@ -1045,6 +1024,18 @@ EAPI void 
ecore_drm2_plane_destination_set(Ecore_Drm2_Plane *plane, int x, int y
  */
 EAPI Eina_Bool ecore_drm2_plane_fb_set(Ecore_Drm2_Plane *plane, Ecore_Drm2_Fb 
*fb);
 
+/**
+ * Discard a framebuffer object
+ *
+ * Decreases the refcount on a fb object.  It will be destroyed when it's
+ * no longer attached to scanout or otherwise in use.
+ *
+ * @param fb
+ *
+ * @ingroup Ecore_Drm2_Fb_Group
+ * @since 1.20
+ */
+EAPI void ecore_drm2_fb_discard(Ecore_Drm2_Fb *fb);
 
 # endif
 
diff --git a/src/lib/ecore_drm2/ecore_drm2_fb.c 
b/src/lib/ecore_drm2/ecore_drm2_fb.c
index 1570895..b5161c6 100644
--- a/src/lib/ecore_drm2/ecore_drm2_fb.c
+++ b/src/lib/ecore_drm2/ecore_drm2_fb.c
@@ -142,11 +142,13 @@ err:
return NULL;
 }
 
-EAPI void
-ecore_drm2_fb_destroy(Ecore_Drm2_Fb *fb)
+static void
+_ecore_drm2_fb_destroy(Ecore_Drm2_Fb *fb)
 {
EINA_SAFETY_ON_NULL_RETURN(fb);
 
+   if (!fb->dead) ERR("Destroying an fb that hasn't been discarded");
+
if (fb->mmap) munmap(fb->mmap, fb->sizes[0]);
 
if (fb->id) sym_drmModeRmFB(fb->fd, fb->id);
@@ -163,6 +165,32 @@ ecore_drm2_fb_destroy(Ecore_Drm2_Fb *fb)
free(fb);
 }
 
+void
+_ecore_drm2_fb_ref(Ecore_Drm2_Fb *fb)
+{
+   fb->ref++;
+}
+
+void
+_ecore_drm2_fb_deref(Ecore_Drm2_Fb *fb)
+{
+   fb->ref--;
+   if (fb->ref) return;
+
+   _ecore_drm2_fb_destroy(fb);
+}
+
+
+EAPI void
+ecore_drm2_fb_discard(Ecore_Drm2_Fb *fb)
+{
+   EINA_SAFETY_ON_NULL_RETURN(fb);
+   EINA_SAFETY_ON_TRUE_RETURN(fb->ref < 1);
+
+   fb->dead = EINA_TRUE;
+   _ecore_drm2_fb_deref(fb);
+}
+
 EAPI void *
 ecore_drm2_fb_data_get(Ecore_Drm2_Fb *fb)
 {
@@ -213,8 +241,8 @@ ecore_drm2_fb_dirty(Ecore_Drm2_Fb *fb, Eina_Rectangle 
*rects, unsigned int count
 static void
 _release_buffer(Ecore_Drm2_Output *output, Ecore_Drm2_Output_State *s)
 {
-   s->fb->busy = EINA_FALSE;
if (output->release_cb) output->release_cb(output->release_data, s->fb);
+   _ecore_drm2_fb_deref(s->fb);
s->fb = NULL;
 #ifdef HAVE_ATOMIC_DRM
if (s->atomic_req)
@@ -226,6 +254,8 @@ _release_buffer(Ecore_Drm2_Output *output, 
Ecore_Drm2_Output_State *s)
 EAPI Eina_Bool
 ecore_drm2_fb_flip_complete(Ecore_Drm2_Output *output)
 {
+   Ecore_Drm2_Fb *fb;
+
EINA_SAFETY_ON_NULL_RETURN_VAL(output, EINA_FALSE);
 
if (output->current.fb && (output->current.fb != output->pending.fb))
@@ -249,6 +279,10 @@ ecore_drm2_fb_flip_complete(Ecore_Drm2_Output *output)
  }
 
 #endif
+   EINA_LIST_FREE(output->fbs, fb)
+ _ecore_drm2_fb_deref(fb);
+   output->fbs = NULL;
+
return !!output->next.fb;
 }
 
@@ -427,7 +461,7 @@ _fb_flip(Ecore_Drm2_Output *output)
 
 if (output->current.fb) _release_buffer(o