[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

1154.0. "How to determine when windows overlap?" by LARVAE::WOOD_J () Fri Jul 21 1989 08:32

    What's the best way of finding out when an object (window/widget)
    has been moved on top of another object (i.e. the opposite of an
    expose event) ?
    
    Thanks in anticipation,
    	John W.
    

T.RTitleUserPersonal
Name
DateLines
1154.1SDSVAX::SWEENEYHoney, I iconified the kidsFri Jul 21 1989 09:338
This is not the answer you expected, but you don't know without extra-ordinary 
efforts (XDrawPoint, XGetPixel),I think you don't know when a window is
invisible/ concealed/ obscured/ unmapped/ etc. by a resource that you don't
control.

So the answer is not impossible, but applications generally are not supposed to
care according to the X folklore.

1154.2how to tell if a window is obscuredKOBAL::SCAERFri Jul 21 1989 13:0924
	Re: .1
	This does not answer your question but it may help a little.
	This will tell you when a window is obscured:
        
 	int status;       
	XWindowAttributes attributes; 
	Window window_id;
        Display *display;
        
        status = XGetWindowAttributes(display, window_id, &attributes);

        if (status == 1)
           {
	   if (attributes.map_state == IsViewable)
               {
	        /* the window is not obscured */
               }
           else
	       {
                /* the window is obscured */
               }
            }