From d03db620cbc364beb7203321c25859472e0c156b Mon Sep 17 00:00:00 2001 From: John Ellson Date: Tue, 22 Oct 2013 12:04:01 -0400 Subject: [PATCH] fix broken X11 key event handling --- lib/common/emit.c | 4 ++-- lib/gvc/gvcint.h | 5 ----- plugin/xlib/gvdevice_xlib.c | 1 + 3 files changed, 3 insertions(+), 7 deletions(-) diff --git a/lib/common/emit.c b/lib/common/emit.c index 01f90fba4..3a5bd2c83 100644 --- a/lib/common/emit.c +++ b/lib/common/emit.c @@ -4005,8 +4005,6 @@ int gvRenderJobs (GVC_t * gvc, graph_t * g) init_gvc(gvc, g); init_layering(gvc, g); - gvc->keybindings = gvevent_key_binding; - gvc->numkeys = gvevent_key_binding_size; gv_fixLocale (1); for (job = gvjobs_first(gvc); job; job = gvjobs_next(gvc)) { if (gvc->gvg) { @@ -4019,6 +4017,8 @@ int gvRenderJobs (GVC_t * gvc, graph_t * g) } job->common = &(gvc->common); job->layout_type = gvc->layout.type; + job->keybindings = gvevent_key_binding; + job->numkeys = gvevent_key_binding_size; if (!GD_drawing(g)) { agerr (AGERR, "layout was not done\n"); gv_fixLocale (0); diff --git a/lib/gvc/gvcint.h b/lib/gvc/gvcint.h index e5632971d..340dd483c 100644 --- a/lib/gvc/gvcint.h +++ b/lib/gvc/gvcint.h @@ -89,11 +89,6 @@ extern "C" { #undef ELEM gvplugin_package_t *packages; /* list of available packages */ - /* keybindings for keyboard events */ - gvevent_key_binding_t *keybindings; - int numkeys; - void *keycodes; - /* externally provided write() displine */ size_t (*write_fn) (GVJ_t *job, const char *s, size_t len); diff --git a/plugin/xlib/gvdevice_xlib.c b/plugin/xlib/gvdevice_xlib.c index bd093d58e..42c4c86db 100644 --- a/plugin/xlib/gvdevice_xlib.c +++ b/plugin/xlib/gvdevice_xlib.c @@ -214,6 +214,7 @@ static int handle_xlib_events (GVJ_t *firstjob, Display *dpy) case KeyPress: if (handle_keypress(job, &xev.xkey)) return -1; /* exit code */ + rc++; break; case ConfigureNotify: handle_configure_notify(job, &xev.xconfigure); -- 2.40.0