home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #16 / NN_1992_16.iso / spool / comp / windows / x / 14377 < prev    next >
Encoding:
Internet Message Format  |  1992-07-25  |  1.1 KB

  1. From: stroyan@hpfcso.FC.HP.COM (Mike Stroyan)
  2. Date: Fri, 24 Jul 1992 16:23:20 GMT
  3. Subject: Re: Can you hide or lock your original xterm???
  4. Message-ID: <7320044@hpfcso.FC.HP.COM>
  5. Organization: Hewlett-Packard, Fort Collins, CO, USA
  6. Path: sparky!uunet!darwin.sura.net!mips!sdd.hp.com!hpscdc!hplextra!hpfcso!stroyan
  7. Newsgroups: comp.windows.x
  8. References: <1992Jul21.152726.16016@porthos.cc.bellcore.com>
  9. Lines: 23
  10.  
  11. > I am writting a Motif program to be run on a touch screen terminal.
  12. > Unfortunately, even though I can keep the user from exiting the program,
  13. > I cannot keep him or her from grabbing the original xterm and selecting
  14. > close (which logs the terminal completely off).  Is there a way to hide this
  15. > icon or lock it without stopping the application?
  16. > Thank you in advance ;-)
  17. > Robert Buccigrossi
  18.  
  19. You could try something like this.
  20.  
  21. #include <X11/Xlib.h>
  22. main()
  23. {
  24.     Display *display = XOpenDisplay("");
  25.     XUnmapWindow(display, (Window) atoi(getenv("WINDOWID")));
  26.     XSync(display, 0);
  27.     sleep(5);
  28.     XCloseDisplay(display);
  29. }
  30.  
  31. Mike Stroyan, mike_stroyan@fc.hp.com
  32.