[comp.windows.x] XCheckMaskEvent

tomv@S1.MSI.UMN.EDU (Tom Vargese) (07/06/89)

	I seem to be having a problem getting XCheckMaskEvent to receive
SelectionRequest events. Since these events cannot be masked (I tried setting
the mask to "0xFFFFFFFF" to no avail) it shouldn't be a masking problem.

	I tried substituting XNextEvent and that seems to find the Selection-
Request events just fine. Here is a part of the code:

 do
  XSetSelectionOwner(my_display.display,XA_PRIMARY,Page[0].window,CurrentTime);
 while (Page[0].window != XGetSelectionOwner(my_display.display, XA_PRIMARY));
    
 while (1) {
   if (XCheckMaskEvent(my_display.display, 0xFFFFFFFF, &report[1]) == True){ 
     eventstat(my_display.display,&report[1]);

     .. do various things


 }

 There is another program in a infinite loop doing an XConvertSelection for
XA_PRIMARY.  eventstat is program that prints out the type of event, if it
is a SelectionRequest, SelectionNotify it outputs more detailed info. 

Page[0].window is the window ID of a window of type Window
report[] is an array of type XEvent


If I made a very obviously stupid error or if this has been discussed previously
my humble apologies for wasting your precious time and net-bandwidth.

rws@EXPO.LCS.MIT.EDU (07/06/89)

    I seem to be having a problem getting XCheckMaskEvent to receive
    SelectionRequest events. Since these events cannot be masked (I tried
    setting the mask to "0xFFFFFFFF" to no avail) it shouldn't be a masking
    problem.

Wake up.  These events cannot be selected for, so there is no mask, so why
do you think you can specify a mask for them?  Use XCheckTypedEvent instead.