-/* xscreensaver, Copyright (c) 1993 Jamie Zawinski <jwz@lucid.com>
+/* xscreensaver, Copyright (c) 1993 Jamie Zawinski <jwz@mcom.com>
*
* Permission to use, copy, modify, distribute, and sell this software and its
* documentation for any purpose is hereby granted without fee, provided that
#include "xscreensaver.h"
#include <stdio.h>
-extern Time timeout, cycle, lock_timeout, passwd_timeout;
+extern Time timeout, cycle, lock_timeout;
+#ifndef NO_LOCKING
+extern Time passwd_timeout;
+#endif
extern int fade_seconds, fade_ticks;
extern Bool verbose_p, install_cmap_p, fade_p, unfade_p;
extern Bool lock_p, locking_disabled_p;
static void demo_mode_hack P((char *));
static void demo_mode_done P((void));
+static void focus_fuckus P((Widget dialog));
+static void text_cb P((Widget button, XtPointer, XtPointer));
+
extern void demo_mode_restart_process ();
extern Widget demo_dialog;
It's important that the screensaver dialogs not get decorated or
otherwise reparented by the window manager, because they need to be
children of the *real* root window, not the WM's virtual root, in
- order for us to guarentee tha they are visible above the screensaver
+ order for us to guarentee that they are visible above the screensaver
window itself.
*/
Arg av [100];
XtSetArg (av [ac], XtNoverrideRedirect, True); ac++;
XtSetArg (av [ac], XmNdefaultPosition, False); ac++;
/* I wonder whether this does anything useful? */
-/* XtSetArg (av [ac], XmNdialogStyle, XmDIALOG_SYSTEM_MODAL); ac++; */
+ /* XtSetArg (av [ac], XmNdialogStyle, XmDIALOG_SYSTEM_MODAL); ac++; */
XtSetValues (dialog, av, ac);
XtSetValues (form, av, ac);
XtManageChild (form);
Arg av[10];
int ac;
char *label;
- Dimension max_w = 0;
XmString xm_label = 0;
XmString new_xm_label;
XtFree (label);
XtAddCallback (demo_list, XmNbrowseSelectionCallback, select_cb,
- hacks);
+ (XtPointer) hacks);
XtAddCallback (demo_list, XmNdefaultActionCallback, select_cb,
- hacks);
+ (XtPointer) hacks);
XtAddCallback (text_line, XmNactivateCallback, text_cb, 0);
XtAddCallback (next, XmNactivateCallback, next_cb, 0);
XtAddCallback (prev, XmNactivateCallback, prev_cb, 0);
XtAddCallback (done, XmNactivateCallback, done_cb, 0);
XtAddCallback (restart, XmNactivateCallback, restart_cb, 0);
- XtAddCallback (edit, XmNactivateCallback, edit_cb, parent);
+ XtAddCallback (edit, XmNactivateCallback, edit_cb, (XtPointer) parent);
for (; *hacks; hacks++)
{
timeout = res.timeout * 1000;
cycle = res.cycle * 1000;
lock_timeout = res.lock_time * 1000;
+#ifndef NO_LOCKING
passwd_timeout = res.passwd_time * 1000;
+#endif
fade_seconds = res.secs;
fade_ticks = res.ticks;
verbose_p = res.verb;
XtAddCallback (res_cancel, XmNactivateCallback, res_cancel_cb, 0);
#define CB(widget,type,slot) \
- XtAddCallback ((widget), XmNvalueChangedCallback, (type), (slot))
+ XtAddCallback ((widget), XmNvalueChangedCallback, (type), \
+ (XtPointer) (slot))
CB (timeout_text, res_min_cb, &res.timeout);
CB (cycle_text, res_min_cb, &res.cycle);
CB (fade_text, res_sec_cb, &res.secs);
res.timeout = timeout / 1000;
res.cycle = cycle / 1000;
res.lock_time = lock_timeout / 1000;
+#ifndef NO_LOCKING
res.passwd_time = passwd_timeout / 1000;
+#endif
res.secs = fade_seconds;
res.ticks = fade_ticks;
res.verb = verbose_p;