home *** CD-ROM | disk | FTP | other *** search
- Xref: sparky comp.os.vms:17903 vmsnet.misc:1004
- Newsgroups: comp.os.vms,vmsnet.misc
- Path: sparky!uunet!mcsun!sunic!lth.se!styx!mats
- From: mats@efd.lth.se (Mats Akerberg)
- Subject: Re: Changing DECW PauseScreen background?
- In-Reply-To: jhautala@nyx.cs.du.edu's message of Thu, 12 Nov 92 19:10:05 GMT
- Message-ID: <MATS.92Nov13100412@styx.efd.lth.se>
- Lines: 67
- Sender: newsuser@lth.se (LTH network news server)
- Organization: EFD, Lund Inst. of Technology, Lund, Sweden
- References: <1992Nov12.191005.5083@mnemosyne.cs.du.edu>
- Date: 13 Nov 92 09:04:12 GMT
- Lines: 67
-
- In article <1992Nov12.191005.5083@mnemosyne.cs.du.edu> jhautala@nyx.cs.du.edu (Jim Hautala) writes:
- > I was wondering if anyone knows of a way to change the DECwindows
- > Pausescreen background? Is it similar to the way you change the login
- > screen??
- No it isn't!
-
- I got The following from Paul Winalski (@ DEC) Thanks Paul!
-
- >This code is public domain--feel free to use it or modify it to your heart's
- >content.
-
-
- /* SMPAUSEWINDOW.C - Routine to find the Session Manager pause window for */
- /* DECwindows MOTIF on VMS. */
-
- #include <decw$include/Xatom.h>
- #include <decw$include/Xlib.h>
-
- static int SmPauseHandler(dpy, e)
- Display *dpy;
- XErrorEvent *e;
- {
- /* ignore errors from GetWindowProperty */
-
- return 0;
- }
-
-
- Window SmPauseWindow(dpy, root)
- Display *dpy;
- Window root;
- {
- char *pause_window = "_DEC_SM_PAUSE_WINDOW";
- Atom pause_window_atom;
- Window *wid;
- Window retval;
- Atom type_returned;
- int format_returned, status;
- unsigned long num_items_returned, bytes_remaining;
-
- /* enable handler to trap errors (especially BadAtom) */
-
- XSetErrorHandler(&SmPauseHandler);
-
- pause_window_atom = XInternAtom (dpy, pause_window, True);
-
- status = XGetWindowProperty (dpy, root, pause_window_atom, 0, 1, False,
- XA_WINDOW, &type_returned, &format_returned,
- &num_items_returned, &bytes_remaining, &wid);
-
- /* disable the handler */
-
- XSetErrorHandler(0);
-
- if ((status != 0) || (type_returned == None))
- return 0; /* XGetWindowProperty failed */
-
- retval = *wid;
- XFree(wid);
- return retval; /* Success */
- }
-
- --
- Mats Akerberg, System Manager (mats@efd.lth.se),(MATS@SELDC52) on Earn/Bitnet
- Lund Institute of Technology ,School of Electrical Engineering and
- Computer Sciences. Snail: Box 118 S-221 00 Lund Sweden
- Phone: + 46 46-109847 FAX: + 46 46-104013
-