Re: Key press synthesis (for WebKitGTK)
- From: Pierre Neidhardt <mail ambrevar xyz>
- To: Gergely Polonkai <gergely polonkai eu>
- Cc: gtk-app-devel-list gnome org
- Subject: Re: Key press synthesis (for WebKitGTK)
- Date: Sat, 24 Nov 2018 09:59:00 +0100
Hi Gergely,
So if you change your handler’s return type from `void` to `gboolean`
and return `FALSE` if the lisp thingy doesn’t understand your key, it
will be automatically propagated to the next handler (which, hopefully,
will insert your "a" key.
Thanks for the tip. Indeed, I had missed that.
That said, the current situation is a little more complex because the call to
Lisp is _asynchronous_. Which means that I can only know the answer from the
callback of the Soup request, not within the key-press handler. In the Soup
callback, the key press event is gone, hence my need to synthesize a new one.
I have successfully managed to synthesize a key-press event in a dummy program.
In the above scenario, it fails seemingly because it happens from within a Soup
callback. Maybe Libsoup uses different threads, which causes threading issue
when manipulating GTK widgets?
I also tried to synthesize the key event from another callback started in a
g_idle_add() in the Soup callback, to no avail.
g_main_context_invoke() seems to make no difference.
Thoughts?
--
Pierre Neidhardt
https://ambrevar.xyz/
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]