[weston] input: don't run the key bindings on focus in

Submitted by Giulio Camuffo on Nov. 20, 2014, 9:03 p.m.

Details

Message ID 1416517403-25454-1-git-send-email-giuliocamuffo@gmail.com
State Accepted
Commit fde9490d7ed604eb900b932ff846f394c2bde810
Headers show

Not browsing as part of any series.

Commit Message

Giulio Camuffo Nov. 20, 2014, 9:03 p.m.
When getting the focus we get the list of pressed keys, but we are
not supposed to run the key binding on them.
---
 src/input.c | 6 ------
 1 file changed, 6 deletions(-)

Patch hide | download patch | download mbox

diff --git a/src/input.c b/src/input.c
index 80aa34e..15ff6ed 100644
--- a/src/input.c
+++ b/src/input.c
@@ -1404,12 +1404,6 @@  notify_keyboard_focus_in(struct weston_seat *seat, struct wl_array *keys,
 					      WL_KEYBOARD_KEY_STATE_PRESSED);
 	}
 
-	/* Run key bindings after we've updated the state. */
-	wl_array_for_each(k, &keyboard->keys) {
-		weston_compositor_run_key_binding(compositor, seat, 0, *k,
-						  WL_KEYBOARD_KEY_STATE_PRESSED);
-	}
-
 	surface = seat->saved_kbd_focus;
 
 	if (surface) {

Comments

Yep, this is correct.

(I'll get back to the other thread shortly.)

-d

On Thursday, November 20, 2014, Giulio Camuffo <giuliocamuffo@gmail.com>
wrote:

> When getting the focus we get the list of pressed keys, but we are
> not supposed to run the key binding on them.
> ---
>  src/input.c | 6 ------
>  1 file changed, 6 deletions(-)
>
> diff --git a/src/input.c b/src/input.c
> index 80aa34e..15ff6ed 100644
> --- a/src/input.c
> +++ b/src/input.c
> @@ -1404,12 +1404,6 @@ notify_keyboard_focus_in(struct weston_seat *seat,
> struct wl_array *keys,
>
> WL_KEYBOARD_KEY_STATE_PRESSED);
>         }
>
> -       /* Run key bindings after we've updated the state. */
> -       wl_array_for_each(k, &keyboard->keys) {
> -               weston_compositor_run_key_binding(compositor, seat, 0, *k,
> -
>  WL_KEYBOARD_KEY_STATE_PRESSED);
> -       }
> -
>         surface = seat->saved_kbd_focus;
>
>         if (surface) {
> --
> 2.1.3
>
> _______________________________________________
> wayland-devel mailing list
> wayland-devel@lists.freedesktop.org <javascript:;>
> http://lists.freedesktop.org/mailman/listinfo/wayland-devel
>
On Fri, 21 Nov 2014 13:45:04 +0000
Daniel Stone <daniel@fooishbar.org> wrote:

> Yep, this is correct.
> 
> (I'll get back to the other thread shortly.)
> 
> -d
> 
> On Thursday, November 20, 2014, Giulio Camuffo <giuliocamuffo@gmail.com>
> wrote:
> 
> > When getting the focus we get the list of pressed keys, but we are
> > not supposed to run the key binding on them.
> > ---
> >  src/input.c | 6 ------
> >  1 file changed, 6 deletions(-)
> >
> > diff --git a/src/input.c b/src/input.c
> > index 80aa34e..15ff6ed 100644
> > --- a/src/input.c
> > +++ b/src/input.c
> > @@ -1404,12 +1404,6 @@ notify_keyboard_focus_in(struct weston_seat *seat,
> > struct wl_array *keys,
> >
> > WL_KEYBOARD_KEY_STATE_PRESSED);
> >         }
> >
> > -       /* Run key bindings after we've updated the state. */
> > -       wl_array_for_each(k, &keyboard->keys) {
> > -               weston_compositor_run_key_binding(compositor, seat, 0, *k,
> > -
> >  WL_KEYBOARD_KEY_STATE_PRESSED);
> > -       }
> > -
> >         surface = seat->saved_kbd_focus;
> >
> >         if (surface) {
> > --

Pushed!

Thanks,
pq