Re: [E-devel] [EGIT] [core/efl] master 01/01: ecore_wl2: Fix keyboard repeat handling

2016-06-09 Thread Christopher Michael
On 06/09/2016 04:06 PM, Cedric BAIL wrote:
> On Thu, Jun 9, 2016 at 11:58 AM, Christopher Michael
>  wrote:
>> On 06/09/2016 02:52 PM, Cedric BAIL wrote:
>>> On Thu, Jun 9, 2016 at 10:50 AM, Derek Foreman  
>>> wrote:
 derekf pushed a commit to branch master.

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

 commit a4f64d6fcb3de6ff650e9a09b09c69edbb862146
 Author: Derek Foreman 
 Date:   Thu Jun 9 12:43:50 2016 -0500

 ecore_wl2: Fix keyboard repeat handling

 Recent timer changes broke keyboard repeat under wayland - while that
 will probably be fixed shortly, this should be more robust and
 more accurate anyway.
>>>
>>> After investigating this, we discovered that ecore_wl2 was setting a
>>> timer with a repeat of 0s and delay it by 0s. I have no idea of what
>>> was the previous behavior of such request, but now it does exactly
>>> what you expect... Trigger timer callback as soon and as fast as it
>>> can. Enjoy !
>>>
>>
>> Hmmm, that should not be possible really. When _ecore_wl2_input_add gets
>> called, the repeat.rate and repeat.delay are set to some initial values.
>>
>> What values were getting passed in to the _keyboard_cb_repeat_setup
>> function ?? Perhaps some client app is passing us 0 there and we are not
>> trapping for that ??
>
> Float divided by int give an int, not a float. Result was below 0, so
> turned 0 in int.
>

Sure. I was just asking if we are indeed getting the proper values sent 
to _keyboard_cb_repeat_setup. I checked with Derek and it would seem 
that the values we are getting are ok. I just wanted to be sure that 
there was not a larger issue here.

Cheers,
dh



--
What NetFlow Analyzer can do for you? Monitors network bandwidth and traffic
patterns at an interface-level. Reveals which users, apps, and protocols are 
consuming the most bandwidth. Provides multi-vendor support for NetFlow, 
J-Flow, sFlow and other flows. Make informed decisions using capacity 
planning reports. https://ad.doubleclick.net/ddm/clk/305295220;132659582;e
___
enlightenment-devel mailing list
enlightenment-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/enlightenment-devel


Re: [E-devel] [EGIT] [core/efl] master 01/01: ecore_wl2: Fix keyboard repeat handling

2016-06-09 Thread Cedric BAIL
On Thu, Jun 9, 2016 at 11:58 AM, Christopher Michael
 wrote:
> On 06/09/2016 02:52 PM, Cedric BAIL wrote:
>> On Thu, Jun 9, 2016 at 10:50 AM, Derek Foreman  
>> wrote:
>>> derekf pushed a commit to branch master.
>>>
>>> http://git.enlightenment.org/core/efl.git/commit/?id=a4f64d6fcb3de6ff650e9a09b09c69edbb862146
>>>
>>> commit a4f64d6fcb3de6ff650e9a09b09c69edbb862146
>>> Author: Derek Foreman 
>>> Date:   Thu Jun 9 12:43:50 2016 -0500
>>>
>>> ecore_wl2: Fix keyboard repeat handling
>>>
>>> Recent timer changes broke keyboard repeat under wayland - while that
>>> will probably be fixed shortly, this should be more robust and
>>> more accurate anyway.
>>
>> After investigating this, we discovered that ecore_wl2 was setting a
>> timer with a repeat of 0s and delay it by 0s. I have no idea of what
>> was the previous behavior of such request, but now it does exactly
>> what you expect... Trigger timer callback as soon and as fast as it
>> can. Enjoy !
>>
>
> Hmmm, that should not be possible really. When _ecore_wl2_input_add gets
> called, the repeat.rate and repeat.delay are set to some initial values.
>
> What values were getting passed in to the _keyboard_cb_repeat_setup
> function ?? Perhaps some client app is passing us 0 there and we are not
> trapping for that ??

Float divided by int give an int, not a float. Result was below 0, so
turned 0 in int.
-- 
Cedric BAIL

--
What NetFlow Analyzer can do for you? Monitors network bandwidth and traffic
patterns at an interface-level. Reveals which users, apps, and protocols are 
consuming the most bandwidth. Provides multi-vendor support for NetFlow, 
J-Flow, sFlow and other flows. Make informed decisions using capacity 
planning reports. https://ad.doubleclick.net/ddm/clk/305295220;132659582;e
___
enlightenment-devel mailing list
enlightenment-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/enlightenment-devel


Re: [E-devel] [EGIT] [core/efl] master 01/01: ecore_wl2: Fix keyboard repeat handling

2016-06-09 Thread Christopher Michael
On 06/09/2016 02:52 PM, Cedric BAIL wrote:
> On Thu, Jun 9, 2016 at 10:50 AM, Derek Foreman  wrote:
>> derekf pushed a commit to branch master.
>>
>> http://git.enlightenment.org/core/efl.git/commit/?id=a4f64d6fcb3de6ff650e9a09b09c69edbb862146
>>
>> commit a4f64d6fcb3de6ff650e9a09b09c69edbb862146
>> Author: Derek Foreman 
>> Date:   Thu Jun 9 12:43:50 2016 -0500
>>
>> ecore_wl2: Fix keyboard repeat handling
>>
>> Recent timer changes broke keyboard repeat under wayland - while that
>> will probably be fixed shortly, this should be more robust and
>> more accurate anyway.
>
> After investigating this, we discovered that ecore_wl2 was setting a
> timer with a repeat of 0s and delay it by 0s. I have no idea of what
> was the previous behavior of such request, but now it does exactly
> what you expect... Trigger timer callback as soon and as fast as it
> can. Enjoy !
>

Hmmm, that should not be possible really. When _ecore_wl2_input_add gets 
called, the repeat.rate and repeat.delay are set to some initial values.

What values were getting passed in to the _keyboard_cb_repeat_setup 
function ?? Perhaps some client app is passing us 0 there and we are not 
trapping for that ??

Cheers,
dh



--
What NetFlow Analyzer can do for you? Monitors network bandwidth and traffic
patterns at an interface-level. Reveals which users, apps, and protocols are 
consuming the most bandwidth. Provides multi-vendor support for NetFlow, 
J-Flow, sFlow and other flows. Make informed decisions using capacity 
planning reports. https://ad.doubleclick.net/ddm/clk/305295220;132659582;e
___
enlightenment-devel mailing list
enlightenment-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/enlightenment-devel


Re: [E-devel] [EGIT] [core/efl] master 01/01: ecore_wl2: Fix keyboard repeat handling

2016-06-09 Thread Cedric BAIL
On Thu, Jun 9, 2016 at 10:50 AM, Derek Foreman  wrote:
> derekf pushed a commit to branch master.
>
> http://git.enlightenment.org/core/efl.git/commit/?id=a4f64d6fcb3de6ff650e9a09b09c69edbb862146
>
> commit a4f64d6fcb3de6ff650e9a09b09c69edbb862146
> Author: Derek Foreman 
> Date:   Thu Jun 9 12:43:50 2016 -0500
>
> ecore_wl2: Fix keyboard repeat handling
>
> Recent timer changes broke keyboard repeat under wayland - while that
> will probably be fixed shortly, this should be more robust and
> more accurate anyway.

After investigating this, we discovered that ecore_wl2 was setting a
timer with a repeat of 0s and delay it by 0s. I have no idea of what
was the previous behavior of such request, but now it does exactly
what you expect... Trigger timer callback as soon and as fast as it
can. Enjoy !
-- 
Cedric BAIL

--
What NetFlow Analyzer can do for you? Monitors network bandwidth and traffic
patterns at an interface-level. Reveals which users, apps, and protocols are 
consuming the most bandwidth. Provides multi-vendor support for NetFlow, 
J-Flow, sFlow and other flows. Make informed decisions using capacity 
planning reports. https://ad.doubleclick.net/ddm/clk/305295220;132659582;e
___
enlightenment-devel mailing list
enlightenment-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/enlightenment-devel


[EGIT] [core/efl] master 01/01: ecore_wl2: Fix keyboard repeat handling

2016-06-09 Thread Derek Foreman
derekf pushed a commit to branch master.

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

commit a4f64d6fcb3de6ff650e9a09b09c69edbb862146
Author: Derek Foreman 
Date:   Thu Jun 9 12:43:50 2016 -0500

ecore_wl2: Fix keyboard repeat handling

Recent timer changes broke keyboard repeat under wayland - while that
will probably be fixed shortly, this should be more robust and
more accurate anyway.
---
 src/lib/ecore_wl2/ecore_wl2_input.c   | 13 +
 src/lib/ecore_wl2/ecore_wl2_private.h |  1 +
 2 files changed, 10 insertions(+), 4 deletions(-)

diff --git a/src/lib/ecore_wl2/ecore_wl2_input.c 
b/src/lib/ecore_wl2/ecore_wl2_input.c
index 2b4a804..4761672 100644
--- a/src/lib/ecore_wl2/ecore_wl2_input.c
+++ b/src/lib/ecore_wl2/ecore_wl2_input.c
@@ -780,6 +780,11 @@ _keyboard_cb_repeat(void *data)
 
_ecore_wl2_input_key_send(input, input->focus.keyboard, input->repeat.sym, 
input->repeat.key + 8, WL_KEYBOARD_KEY_STATE_PRESSED,  input->repeat.time);
 
+   if (!input->repeat.repeating)
+ {
+ecore_timer_interval_set(input->repeat.timer, input->repeat.rate);
+input->repeat.repeating = EINA_TRUE;
+ }
return ECORE_CALLBACK_RENEW;
 
 out:
@@ -841,9 +846,9 @@ _keyboard_cb_key(void *data, struct wl_keyboard *keyboard 
EINA_UNUSED, unsigned
 
 if (!input->repeat.timer)
   {
+ input->repeat.repeating = EINA_FALSE;
  input->repeat.timer =
-   ecore_timer_add(input->repeat.rate, _keyboard_cb_repeat, input);
- ecore_timer_delay(input->repeat.timer, input->repeat.delay);
+   ecore_timer_add(input->repeat.delay, _keyboard_cb_repeat, 
input);
   }
  }
 }
@@ -903,8 +908,8 @@ _keyboard_cb_repeat_setup(void *data, struct wl_keyboard 
*keyboard EINA_UNUSED,
  }
 
input->repeat.enabled = EINA_TRUE;
-   input->repeat.rate = (rate / 1);
-   input->repeat.delay = (delay / 1000);
+   input->repeat.rate = (1.0 / rate);
+   input->repeat.delay = (delay / 1000.0);
 }
 
 static const struct wl_keyboard_listener _keyboard_listener =
diff --git a/src/lib/ecore_wl2/ecore_wl2_private.h 
b/src/lib/ecore_wl2/ecore_wl2_private.h
index 680214a..fce1245 100644
--- a/src/lib/ecore_wl2/ecore_wl2_private.h
+++ b/src/lib/ecore_wl2/ecore_wl2_private.h
@@ -404,6 +404,7 @@ struct _Ecore_Wl2_Input
 unsigned int sym, key, time;
 double rate, delay;
 Eina_Bool enabled : 1;
+Eina_Bool repeating : 1;
  } repeat;
 
struct

--