| Title: | DECWINDOWS 26-JAN-89 to 29-NOV-90 |
| Notice: | See 1639.0 for VMS V5.3 kit; 2043.0 for 5.4 IFT kit |
| Moderator: | STAR::VATNE |
| Created: | Mon Oct 30 1989 |
| Last Modified: | Mon Dec 31 1990 |
| Last Successful Update: | Fri Jun 06 1997 |
| Number of topics: | 3726 |
| Total number of notes: | 19516 |
Hi all,
the XLib routine XResetScreenSaver appears to only work if another
of the screen saver update routines has been invoked (ie:
XActivateScreenSaver). From the documentation it would appear that you
should be able to use XResetScreenSaver from a program (running
detached or logged in via DECNet, say) and the screen (if blanked out)
should become visable, just as if someone pressed a key/mouse button.
I have a customer that is wanting to unblank a screen when their
program reports an alarm (it is some sort of facility monitoring
system for electricity distribution), the have tried XResetScreenSaver
(below is a test program.. just let the screen go blank, log in over
DECNet and run it) but have not been able to produce what they assumed
to be the documented behaviour. Could someone clarify whether
XResetScreenSaver is working as designed ?
Thank's in advance
Rob
#include "Xlib.h"
#include "Xatom.h"
#include "Keysym.h"
#include <stdio.h>
int main(){
char *display1;
Display *disp;
Window window1;
int timeout_ret, interval_ret, blanking_ret, exposures_ret;
XSetErrorHandler(error_handler);
display1 = "0::0";
disp = XOpenDisplay(display1);
XGetScreenSaver(disp, &timeout_ret, &interval_ret, &blanking_ret,
&exposures_ret);
printf("Timeout %d ; Interval %d ; Blanking %d ; Exposure %d ",
timeout_ret, interval_ret, blanking_ret,
exposures_ret);
/* XActivateScreenSaver(disp); *** Need this to get anything to happen*/
XResetScreenSaver(disp);
XFlush(disp);
exit(1);
}
| T.R | Title | User | Personal Name | Date | Lines |
|---|---|---|---|---|---|
| 1124.1 | Don't ask me why if it works. | HSOMAI::CHANG | Tue Jul 18 1989 11:18 | 10 | |
Add the following statement before XResetScreenSaver. I had the same
problem and this works for my program.
XSetScreenSaver (disp, DisableScreenSaver, 600, PreferBlanking,
AllowExposures);
Wayne
| |||||
| 1124.2 | GIDDAY::OMELEY | Rob O'Meley, CSC Sydney | Wed Jul 19 1989 02:36 | 12 | |
Thank's for the quick reply, I haven't been able to get it to work
(yet). But it looks like the XResetScreenSaver cannot reset the screen
server unless there is a prior routine that either Sets, Activates or
Forces the screen saver. Surely XResetScreenSaver should unblank the
screen by itself... ?
Can anyone on the DECW development side clarify ?
Thank's
Rob
| |||||
| 1124.3 | This works for me | COOKIE::KITTELL | Richard - Architected Info Mgmt | Tue Jul 25 1989 16:42 | 13 |
/* Save current settings */ XGetScreenSaver (dpy, &timeout, &interval, &blanking, &exposures); /* Disable saver (keep screen from blanking) */ XSetScreenSaver (dpy, 0, interval, blanking, exposures); XResetScreenSaver (dpy); /* Enable saver (allow screen to blank after timeout) */ XSetScreenSaver (dpy, timeout, interval, blanking, exposures); | |||||
| 1124.4 | Still not working on VMS DECW | GIDDAY::OMELEY | Rob O'Meley, CSC Sydney | Wed Aug 09 1989 03:00 | 66 |
Hi,
Thank's for the reply, below is a copy of the routine I am using, it
will not do a thing with the screen (ie: wont redisplay a screen that
has blanked off) unless there is an call to XActivateScreenSaver
preceding the reset call, I have only observed this using VMS DECW, on
Ultrix (local) it works fine without the need for an
XActivateScreenSaver (ie: roughly .2).
I have tried it using local and remote (DECNET) transport and it
appears that the XActivate... is needed, unfortunately if you run the
routine with the screen being displayed it will blank out, but if blank
it will be displayed (as desired). Can anyone spot what I am doing
wrong... is this a manifestation of a problem with the VMS DECW ?
Many Thank's for any replies
Rob
This will display the screen if blanked... and will blank it if it is
displayed.
Have run on the workstation in a command routine
$ wait some_time_so_screen_can_blank
$ run reset_screen_program
$ exit
Have also run remotely:
$ set display/create/node=node_name
$ run reset_screen_program
#include "Xlib.h"
#include "Xatom.h"
#include "Keysym.h"
#include <stdio.h>
int main(){
char *display1;
Display *disp;
Window window1;
int timeout_ret, interval_ret, blanking_ret, exposures_ret;
char c;
disp = XOpenDisplay(0);
XGetScreenSaver(disp, &timeout_ret, &interval_ret, &blanking_ret,
&exposures_ret);
printf("Timeout %d ; Interval %d ; Blanking %d ; Exposure %d ",
timeout_ret, interval_ret, blanking_ret,
exposures_ret);
XSetScreenSaver (disp,0, interval_ret, blanking_ret, exposures_ret);
XActivateScreenSaver(disp); /* Need this for it to work... but why ? */
XResetScreenSaver(disp);
XSetScreenSaver (disp, timeout_ret, interval_ret, blanking_ret,
exposures_ret);
XFlush(disp);
exit(1);
}
| |||||
| 1124.5 | Should I submit an SPR? | THAV07::NAKAJIMA | Let's Do The Time Warp Again. | Fri Oct 27 1989 07:28 | 13 |
Re :.2
> Surely XResetScreenSaver should unblank the
> screen by itself... ?
> Can anyone on the DECW development side clarify ?
I have a same problem, and it seems to me it's a bug in Xserver.
Has anybody submitted an SPR?
Norihiko Nakajima SWS/TOKYO
| |||||