diff options
author | Alan Coopersmith <alan.coopersmith@oracle.com> | 2022-12-08 10:38:27 -0800 |
---|---|---|
committer | Alan Coopersmith <alan.coopersmith@oracle.com> | 2022-12-08 10:38:27 -0800 |
commit | 4f7fff260d15b6b6c2b069644eb3875cba8e859d (patch) | |
tree | 4a8061f744f5858e9d01bcdb0425b4e7459f72c8 /b4light.c | |
parent | 141220bae2bc0d9ba9f6ed185d10bfe31cd5145e (diff) |
unifdef -UNOTDEF b4light.c
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
Diffstat (limited to 'b4light.c')
-rw-r--r-- | b4light.c | 49 |
1 files changed, 0 insertions, 49 deletions
@@ -32,10 +32,6 @@ in this Software without prior written authorization from the X Consortium. #include <X11/Intrinsic.h> #include <X11/StringDefs.h> #include <X11/Shell.h> -#ifdef NOTDEF -#include <X11/Xaw/Label.h> -#include <X11/Xaw/Cardinals.h> -#endif #include <X11/extensions/scrnsaver.h> #include <X11/Xcms.h> #include <stdlib.h> @@ -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 ("<Message>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 |