X-Git-Url: https://git.distorted.org.uk/u/mdw/putty/blobdiff_plain/fd02b8c05f488843ebb7a4ff9c1ec494f740b6b9..2cb502506f9a85b821564075645daf778188d2f4:/unix/pterm.c diff --git a/unix/pterm.c b/unix/pterm.c index ebdc5a8e..e2830588 100644 --- a/unix/pterm.c +++ b/unix/pterm.c @@ -431,10 +431,11 @@ gint key_event(GtkWidget *widget, GdkEventKey *event, gpointer data) strncpy(output+1, event->string, 31); output[31] = '\0'; end = strlen(output); - if (event->state & GDK_MOD1_MASK) - start = end = 0; - else - start = end = 1; + if (event->state & GDK_MOD1_MASK) { + start = 0; + if (end == 1) end = 0; + } else + start = 1; /* Control-` is the same as Control-\ (unless gtk has a better idea) */ if (!event->string[0] && event->keyval == '`' && @@ -785,6 +786,7 @@ gint key_event(GtkWidget *widget, GdkEventKey *event, gpointer data) ldisc_send(output+start, end-start, 1); show_mouseptr(0); + term_seen_key_event(); term_out(); } @@ -1296,16 +1298,9 @@ void do_text_internal(Context ctx, int x, int y, char *text, int len, y*inst->font_height+cfg.window_border+inst->fonts[0]->ascent, text, len); - /* - * X fonts seem to be pretty consistent about leaving the - * _left_ pixel of the cell blank rather than the right. Hence - * I'm going to hard-code shadow bolding as displaying one - * pixel to the left rather than try to work out whether it - * should be left or right. - */ if (shadow) { gdk_draw_text(inst->pixmap, inst->fonts[fontid], gc, - x*inst->font_width+cfg.window_border - 1, + x*inst->font_width+cfg.window_border + cfg.shadowboldoffset, y*inst->font_height+cfg.window_border+inst->fonts[0]->ascent, text, len); } @@ -1738,6 +1733,9 @@ int do_cmdline(int argc, char **argv, int do_everything) EXPECTS_ARG; provide_xrm_string(val); + } else { + err = 1; + fprintf(stderr, "pterm: unrecognized option '%s'\n", p); } }