ftp://ftp.linux.ncsu.edu/mirror/ftp.redhat.com/pub/redhat/linux/enterprise/4/en/os...
[xscreensaver] / hacks / xlockmore.c
index 64907a7b5b9d186fd6717f83a65fa89d0926b02f..7624b4875c904a16b5c97a1ac554365f9959f9d4 100644 (file)
@@ -1,5 +1,5 @@
 /* xlockmore.c --- xscreensaver compatibility layer for xlockmore modules.
- * xscreensaver, Copyright (c) 1997, 1998, 2001, 2002
+ * xscreensaver, Copyright (c) 1997, 1998, 2001, 2002, 2004
  *  Jamie Zawinski <jwz@jwz.org>
  *
  * Permission to use, copy, modify, distribute, and sell this software and its
 #include <sys/time.h>
 #include "screenhack.h"
 #include "xlockmoreI.h"
+#include <X11/Intrinsic.h>
 
 #define countof(x) (sizeof((x))/sizeof(*(x)))
 
 #define MAX_COLORS (1L<<13)
 
+extern XtAppContext app;
 extern ModeSpecOpt xlockmore_opts[];
 extern const char *app_defaults;
 
@@ -217,6 +219,9 @@ xlockmore_handle_events (ModeInfo *mi,
                          void (*reshape) (ModeInfo *, int, int),
                          Bool (*hook) (ModeInfo *, XEvent *))
 {
+  if (XtAppPending (app) & (XtIMTimer|XtIMAlternateInput))
+    XtAppProcessEvent (app, XtIMTimer|XtIMAlternateInput);
+
   while (XPending (mi->dpy))
     {
       XEvent event;