home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #20 / NN_1992_20.iso / spool / comp / windows / x / 16281 < prev    next >
Encoding:
Text File  |  1992-09-08  |  1.8 KB  |  38 lines

  1. Newsgroups: comp.windows.x
  2. Path: sparky!uunet!usc!snorkelwacker.mit.edu!thunder.mcrcim.mcgill.edu!mouse
  3. From: mouse@thunder.mcrcim.mcgill.edu (der Mouse)
  4. Subject: Re: HELP! XSetWindowAttributes and XSetWMHints
  5. Message-ID: <1992Sep7.173629.13755@thunder.mcrcim.mcgill.edu>
  6. Organization: McGill Research Centre for Intelligent Machines
  7. References: <1992Sep4.015632.947@mailhost.ocs.mq.edu.au> <1992Sep4.084114.2596@mailhost.ocs.mq.edu.au>
  8. Date: Mon, 7 Sep 92 17:36:29 GMT
  9. Lines: 28
  10.  
  11. In article <1992Sep4.084114.2596@mailhost.ocs.mq.edu.au>, s8923098@macnab.mqcs.mq.oz.au (Josef WIDJAJA) writes:
  12. > In article <1992Sep4.015632.947@mailhost.ocs.mq.edu.au> s8923098@macnab.mqcs.mq.oz.au (Josef WIDJAJA) writes:
  13. >> [drawing works when, and only when, window is set override-redirect.]
  14. > I think I now know why.  When the override_redirect is set to False,
  15. > the Window Manager redraws the window generating an Expose event.
  16. > Upon receving this event, the image has to be redrawn.
  17.  
  18. Yes and no.
  19.  
  20. The window manager never redraws the window.  Redrawing your window is
  21. entirely up to you.  The Expose event always happens, and it is
  22. generated by the server when the window is first displayed.  It's just
  23. that when your window is override-redirect, this happens immediately
  24. upon the window being mapped; when not, the WM makes the user position
  25. it, delaying the actual mapping and thus the Expose.  You didn't
  26. include enough of your program to be sure, but I suspect that you were
  27. blindly charging ahead and drawing without waiting for the Expose.
  28. This worked when, and only when, the window was actually mapped
  29. immediately after your program requested that it be mapped.
  30.  
  31. That's the no part.  The yes part is that yes, you have to redraw upon
  32. receiving Expose events, so even if the reasoning is wrong, the
  33. conclusion is right.
  34.  
  35.                     der Mouse
  36.  
  37.                 mouse@larry.mcrcim.mcgill.edu
  38.