From 4f7fff260d15b6b6c2b069644eb3875cba8e859d Mon Sep 17 00:00:00 2001 From: Alan Coopersmith Date: Thu, 8 Dec 2022 10:38:27 -0800 Subject: unifdef -UNOTDEF b4light.c Signed-off-by: Alan Coopersmith --- b4light.c | 49 ------------------------------------------------- 1 file changed, 49 deletions(-) (limited to 'b4light.c') diff --git a/b4light.c b/b4light.c index 24d4924..c867665 100644 --- a/b4light.c +++ b/b4light.c @@ -32,10 +32,6 @@ in this Software without prior written authorization from the X Consortium. #include #include #include -#ifdef NOTDEF -#include -#include -#endif #include #include #include @@ -45,16 +41,6 @@ in this Software without prior written authorization from the X Consortium. # define ZERO ((Cardinal)0) #endif -#ifdef NOTDEF -static void quit (Widget w, XEvent *event, - String *params, Cardinal *num_params); - -static XtActionsRec beforedark_actions[] = { - { "quit", quit }, -}; - -static Atom wm_delete_window; -#endif static int ss_event, ss_error; @@ -316,24 +302,6 @@ main(int argc, char *argv[]) scr_hei = DisplayHeight (display, screen); if (!XScreenSaverQueryExtension (display, &ss_event, &ss_error)) exit (1); -#ifdef NOTDEF - XtAppAddActions (app_con, beforedark_actions, XtNumber(beforedark_actions)); - - /* - * This is a hack so that f.delete will do something useful in this - * single-window application. - */ - XtOverrideTranslations(toplevel, - XtParseTranslationTable ("WM_PROTOCOLS: quit()")); - - XtCreateManagedWidget ("label", labelWidgetClass, toplevel, NULL, ZERO); - XtRealizeWidget (toplevel); - wm_delete_window = XInternAtom (XtDisplay(toplevel), "WM_DELETE_WINDOW", - False); - (void) XSetWMProtocols (XtDisplay(toplevel), XtWindow(toplevel), - &wm_delete_window, 1); - -#endif oldHandler = XSetErrorHandler (ignoreError); if (XScreenSaverGetRegistered (display, screen, &kill_id, &kill_type)) { s = XGetGeometry(display, kill_id, &r, &x, &y, &w, &h, &b, &d); @@ -346,11 +314,7 @@ main(int argc, char *argv[]) XSync(display, FALSE); XSetErrorHandler(oldHandler); XScreenSaverSelectInput (display, root, ScreenSaverNotifyMask); -#ifdef NOTDEF - cmap = XCreateColormap (display, root, DefaultVisual (display, screen), AllocNone); -#else cmap = DefaultColormap (display, screen); -#endif AllocateColors(); blank_pix = XCreatePixmap (display, root, 1, 1, 1); XScreenSaverRegister (display, screen, (XID) blank_pix, XA_PIXMAP); @@ -416,16 +380,3 @@ main(int argc, char *argv[]) } } -#ifdef NOTDEF -static void -quit (Widget w, XEvent *event, String *params, Cardinal *num_params) -{ - if (event->type == ClientMessage && - event->xclient.data.l[0] != wm_delete_window) { - XBell (XtDisplay(w), 0); - return; - } - XCloseDisplay (XtDisplay(w)); - exit (0); -} -#endif -- cgit v1.2.3