X-Git-Url: http://git.hungrycats.org/cgi-bin/gitweb.cgi?p=xscreensaver;a=blobdiff_plain;f=hacks%2Fglx%2Fhypertorus.c;h=57cd1896e0f3dc0273797f80c2633999fcbf30de;hp=a7d3ed950a77673a62de69bbdd29e910a3f8cd4c;hb=f8cf5ac7b2f53510f80a0eaf286a25298be17bfe;hpb=ec8d2b32b63649e6d32bdfb306eda062769af823 diff --git a/hacks/glx/hypertorus.c b/hacks/glx/hypertorus.c index a7d3ed95..57cd1896 100644 --- a/hacks/glx/hypertorus.c +++ b/hacks/glx/hypertorus.c @@ -95,8 +95,9 @@ static const char sccsid[] = "@(#)hypertorus.c 1.2 05/09/28 xlockmore"; #endif /* !STANDALONE */ #ifdef USE_GL - -#include +# ifndef HAVE_JWZGLES +# include +# endif #include "gltrackball.h" @@ -747,9 +748,12 @@ ENTRYPOINT void reshape_hypertorus(ModeInfo *mi, int width, int height) ENTRYPOINT Bool hypertorus_handle_event(ModeInfo *mi, XEvent *event) { - Display *display = MI_DISPLAY(mi); hypertorusstruct *hp = &hyper[MI_SCREEN(mi)]; - KeySym sym; + KeySym sym = 0; + char c = 0; + + if (event->xany.type == KeyPress || event->xany.type == KeyRelease) + XLookupString (&event->xkey, &c, 1, &sym, 0); if (event->xany.type == ButtonPress && event->xbutton.button == Button1) @@ -768,7 +772,6 @@ ENTRYPOINT Bool hypertorus_handle_event(ModeInfo *mi, XEvent *event) } else if (event->xany.type == KeyPress) { - sym = XKeycodeToKeysym(display,event->xkey.keycode,0); if (sym == XK_Shift_L || sym == XK_Shift_R) { hp->current_trackball = 1; @@ -781,7 +784,6 @@ ENTRYPOINT Bool hypertorus_handle_event(ModeInfo *mi, XEvent *event) } else if (event->xany.type == KeyRelease) { - sym = XKeycodeToKeysym(display,event->xkey.keycode,0); if (sym == XK_Shift_L || sym == XK_Shift_R) { hp->current_trackball = 0;