X-Git-Url: http://git.hungrycats.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=hacks%2Fxmatrix.c;h=adccb0c66dd091a696bcd9a2e903c5fca6fa81a5;hb=aa75c7476aeaa84cf3abc192b376a8b03c325213;hp=4f88d8d895ef4e95407ff2a765e1a3b3dc73b225;hpb=8afc01a67be4fbf3f1cc0fce9adf01b5289a21c6;p=xscreensaver diff --git a/hacks/xmatrix.c b/hacks/xmatrix.c index 4f88d8d8..adccb0c6 100644 --- a/hacks/xmatrix.c +++ b/hacks/xmatrix.c @@ -1,4 +1,4 @@ -/* xscreensaver, Copyright (c) 1999-2013 Jamie Zawinski +/* xscreensaver, Copyright (c) 1999-2015 Jamie Zawinski * * Permission to use, copy, modify, distribute, and sell this software and its * documentation for any purpose is hereby granted without fee, provided that @@ -59,13 +59,13 @@ #include #include -#ifdef HAVE_COCOA +#ifdef HAVE_JWXYZ # define HAVE_XPM #else # define DO_XBM /* only do mono bitmaps under real X11 */ #endif -#ifndef HAVE_COCOA +#ifndef HAVE_JWXYZ # include #endif @@ -342,6 +342,7 @@ fill_input (m_state *s) s->buf [s->buf_pos] = (char) c; } + if (n > 0) { s->do_fill_buff = False; @@ -460,25 +461,22 @@ static void init_trace (m_state *state) { char *s = get_string_resource (state->dpy, "tracePhone", "TracePhone"); - char *s2, *s3; - int i; + const char *s2; + signed char *s3; if (!s) goto FAIL; state->tracing = (signed char *) malloc (strlen (s) + 1); - s3 = (char *) state->tracing; + s3 = state->tracing; for (s2 = s; *s2; s2++) if (*s2 >= '0' && *s2 <= '9') - *s3++ = *s2; + *s3++ = -*s2; *s3 = 0; - if (s3 == (char *) state->tracing) + if (s3 == state->tracing) goto FAIL; - for (i = 0; i < strlen((char *) state->tracing); i++) - state->tracing[i] = -state->tracing[i]; - state->glyph_map = decimal_encoding; state->nglyphs = countof(decimal_encoding); @@ -1711,7 +1709,8 @@ xmatrix_reshape (Display *dpy, Window window, void *closure, state->xgwa.width, state->xgwa.height, state->grid_width - 2, - state->grid_height - 1); + state->grid_height - 1, + 0); } static Bool @@ -1781,10 +1780,16 @@ xmatrix_event (Display *dpy, Window window, void *closure, XEvent *event) return True; default: - return False; + break; } } + if (screenhack_event_helper (dpy, window, event)) + { + set_mode (state, DRAIN_MATRIX); + return True; + } + return False; } @@ -1817,8 +1822,8 @@ static const char *xmatrix_defaults [] = { "*knockKnock: True", "*usePipe: False", "*usePty: False", - "*program: xscreensaver-text", - "*geometry: 800x600", + "*program: xscreensaver-text --latin1", + "*geometry: 960x720", 0 };