Wrap detached event trigger in compiler directives.
authorRui Guo <firemeteor.guo@gmail.com>
Wed, 17 Jun 2009 15:11:37 +0000 (17 23:11 +0800)
committerRui Guo <firemeteor.guo@gmail.com>
Wed, 17 Jun 2009 15:11:37 +0000 (17 23:11 +0800)
src/screen.c

index 0506b6e..7d9b45d 100644 (file)
@@ -1904,7 +1904,9 @@ int mode;
     case D_DETACH:
       AddStrSock("detached");
       sign = SIG_BYE;
+#ifdef SCRIPT
       trigger_sevent(&globalevents.detached, display, 0x0);
+#endif
       break;
 #ifdef BSDJOBS
     case D_STOP:
@@ -1915,7 +1917,9 @@ int mode;
     case D_REMOTE:
       AddStrSock("remote detached");
       sign = SIG_BYE;
+#ifdef SCRIPT
       trigger_sevent(&globalevents.detached, display, 0x1);
+#endif
       break;
 #endif
 #ifdef POW_DETACH
@@ -1927,7 +1931,9 @@ int mode;
          AddStr("\r\n");
        }
       sign = SIG_POWER_BYE;
+#ifdef SCRIPT
       trigger_sevent(&globalevents.detached, display, 0x2);
+#endif
       break;
 #ifdef REMOTE_DETACH
     case D_REMOTE_POWER:
@@ -1938,7 +1944,9 @@ int mode;
          AddStr("\r\n");
        }
       sign = SIG_POWER_BYE;
+#ifdef SCRIPT
       trigger_sevent(&globalevents.detached, display, 0x1 | 0x2); /* Remote and power */
+#endif
       break;
 #endif
 #endif