Reliably trigger onidle event.
authorGuo Rui <firemeteor@Adam.(none)>
Mon, 13 Jul 2009 16:05:38 +0000 (14 00:05 +0800)
committerGuo Rui <firemeteor@Adam.(none)>
Mon, 13 Jul 2009 16:05:38 +0000 (14 00:05 +0800)
By pass internal processing on successful triggering.

src/display.c

index 623b591..b00b2a9 100644 (file)
@@ -4192,15 +4192,16 @@ char *data;
 {
   struct display *olddisplay;
   display = (struct display *)data;
+#ifdef SCRIPT
+  if (trigger_sevent(&display->d_sev.onidle, display))
+    return;
+#endif
   debug("idle timeout\n");
   if (idletimo <= 0 || idleaction.nr == RC_ILLEGAL)
     return;
   olddisplay = display;
   flayer = D_forecv->c_layer;
   fore = D_fore;
-#ifdef SCRIPT
-  trigger_sevent(&display->d_sev.onidle, display);
-#endif
   DoAction(&idleaction, -1);
   if (idleaction.nr == RC_BLANKER)
     return;