kall@mayo.EDU (Bruce Kall) (04/02/91)
I am having a problem receiving Expose/VisibilityNotify events until (it seems) I perform the next CreateSimpleWindow call (I'm not sure if its the call to XCreateSimpleWindow or the XMapraised that causes the Expose/VisibilityNotify events to eventually come out). My main window fills the entire screen. I have three sibing windows, one on the left, one in the middle and one on the right. The middle and right windows area created with XCreateSimpleWindow. The left window is created with XCreateWindow with the following arguments: attributes.background_pixmap = None; attributes.border_pixmap = None; attributes.border_pixel = CopyFromParent; attributes.bit_gravity = NorthWestGravity; attributes.win_gravity = NotUseful; attributes.backing_store = NotUseful; attributes.backing_pixel = 0; attributes.save_under = False; attributes.event_mask = ExposureMask | VisibilityChangeMask; attributes.do_not_propagate_mask = 0; attributes.override_redirect = False; attributes.colormap = CopyFromParent; attributes.cursor = None; value_mask = CWBackPixmap | CWBorderPixmap; *window_ptr = XCreateWindow(the_display,main_window,window_x,window_y, window_width,window_height,0, XDefaultDepth(the_display, myscreen), InputOutput,DefaultVisual(the_display, myscreen),value_mask, &attributes); XSelectInput(the_display,*window_ptr, ButtonPressMask | ButtonReleaseMask | OwnerGrabButtonMask | EnterWindowMask | LeaveWindowMask | ExposureMask); If the left window partially covers the left window and I then XDestroyWindow it, I don't receive the Expose/VisibilityNotify event on the middle window until the next time I create and map a window. I have tried: XFlush and XSync right after I XDestroy the left window to no avail. If I run my program that makes the left window partially obscure the middle window and XDestroy the left window and then exit the program before ever creating another window, I NEVER get the Expose/VisibilityNotify events at all! I also have a similar problem with another window that I create that partially obscures both the middle and right windows (this window is created with XCreateSimpleWindow -- so this causes me to think the problem is not with the use of XCreateWindow). When I XDestroy this window I only get an Expose on the right window, but not on the left (until I XCreate the next one). Any suggestions?? (Note: I do eventually receive the correct Expose events.) \------------------------------------------------------------\ \ Bruce Kall \ Internet: Kall@Mayo.edu \ \ Mayo Clinic (Foundation) \ Phone: (507)-255-4768 \ \ Rochester, MN 55905 \ \ \------------------------------------------------------------\