GNU bug report logs -
#19547
25.0.50; throw-on-input "fires" when switching workspace
Previous Next
Reported by: michael_heerdegen <at> web.de
Date: Fri, 9 Jan 2015 15:48:02 UTC
Severity: normal
Tags: fixed
Found in version 25.0.50
Fixed in version 26.1
Done: npostavs <at> users.sourceforge.net
Bug is archived. No further changes may be made.
Full log
View this message in rfc822 format
> From: Thierry Volpiatto <thierry.volpiatto <at> gmail.com>
> Cc: Reuben Thomas <rrt <at> sc3d.org>, 19547 <at> debbugs.gnu.org
> Date: Fri, 25 Nov 2016 18:10:15 +0100
>
> As no body is working on this, I started looking at this as I would like
> to have a fix for this for helm, however I have difficulties as my C
> level is 0.
> Could you please bear with me on some points ?
Sure, and thanks for working on this.
> > In some preloaded Lisp file, say subr.el, give that variable a value,
> > a list of symbols that name the events we currently don't consider
> > relevant for throw-on-input.
>
> Ok.
>
> > (Those symbols will have to be invented, e.g. 'focus-in' for
> > FOCUS_IN_EVENT, etc.)
>
> It is here I don't understand, how do I make the correspondance with e.g
> focus-in (the lisp symbol) and FOCUS_IN_EVENT ?
You can do that with a 'switch' in C, or, better, with a C array that
holds the symbols and their corresponding C event_kind values, like
this:
struct event_value {
Lisp_Object event_symbol;
enum event_kind event_kind;
};
static struct event_value symbol_to_kind[] = {
{ Qfocus_in, FOCUS_IN_EVENT },
{ Qhelp, HELP_EVENT },
{ Qiconify, ICONIFY_EVENT },
...
};
Then, for each symbol, you can find the corresponding event value by
walking the array until you find a match.
This bug report was last modified 8 years and 44 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.