[Search for users] [Overall Top Noters] [List of all Conferences] [Download this site]

Conference bulova::decw_jan-89_to_nov-90

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

1124.0. "XResetScreenSaver Usage/Functionality" by GIDDAY::OMELEY (Rob O'Meley, CSC Sydney) Mon Jul 17 1989 21:42

    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.RTitleUserPersonal
Name
DateLines
1124.1Don't ask me why if it works.HSOMAI::CHANGTue Jul 18 1989 12:1810
    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.2GIDDAY::OMELEYRob O&#039;Meley, CSC SydneyWed Jul 19 1989 03:3612
    
    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.3This works for meCOOKIE::KITTELLRichard - Architected Info MgmtTue Jul 25 1989 17:4213


/* 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.4Still not working on VMS DECWGIDDAY::OMELEYRob O&#039;Meley, CSC SydneyWed Aug 09 1989 04:0066
    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.5Should I submit an SPR?THAV07::NAKAJIMALet&#039;s Do The Time Warp Again.Fri Oct 27 1989 08:2813
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