]> granicus.if.org Git - graphviz/commitdiff
fix broken X11 key event handling
authorJohn Ellson <ellson@research.att.com>
Tue, 22 Oct 2013 16:04:01 +0000 (12:04 -0400)
committerJohn Ellson <ellson@research.att.com>
Tue, 22 Oct 2013 16:04:01 +0000 (12:04 -0400)
lib/common/emit.c
lib/gvc/gvcint.h
plugin/xlib/gvdevice_xlib.c

index 01f90fba4769b4e35d9307339f2e90adc0ac95a5..3a5bd2c835bfa310d28e8d17aac2dfb9c3379e15 100644 (file)
@@ -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);
index e5632971de587f9269af3720fd9191ac6ebd58d3..340dd483cdbaf9b4c64db5c94a674db4e16c1c6c 100644 (file)
@@ -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);
 
index bd093d58ec466a94c8c9f63d1ce84d49c3e82241..42c4c86dbb568f6eb15c5e20789a2e0f36cf0a51 100644 (file)
@@ -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);