bmc@mayo.EDU (Bruce Cameron) (05/03/91)
In an application I am trying to develop, requires a pointer grab through a portion of it. While XGrabPointer works when the display is the same as the host, it does not work if I run it with an x terminal as the display. I am using: status = XGrabPointer(dsp, w, True, KeyPressMask | ButtonPressMask, GrabModeAsync, GrabModeAsync, None, mycursor, CurrentTime); Now: if app runs on panterra & displays on panterra:0 this works. if app runs on panterra & displays on gremlin:0 it exits with: X Error: BadValue Request Major code 26 () Request Minor code 0 ResourceID 0x5 Error Serial #53 Current Serial #53 (systems: panterra - SPARCstation 1+, gremlin - Sun3/50 running XKernel all systems running X11R4 & SunOS 4.1) In a related aside, is it possible to use XListHosts(), XRemoveHosts() and XAddHosts() in a similar fashion? Any and all suggestions appreciated. Many thanks in advance. -Bruce ---------------------------------------------------- Bruce M. Cameron bmc@bru.mayo.edu Medical Sciences 1-14 voice: (507) 284-3288 Mayo Foundation fax: (507) 284-9623 200 1st ST SW Rochester, MN 55905 ARS -- WD9CKW ----------------------------------------------------
doug@genmri.UUCP (Doug Becker) (05/03/91)
status = XGrabPointer(dsp, w, True, KeyPressMask | ButtonPressMask, GrabModeAsync, GrabModeAsync, None, mycursor, CurrentTime); It is not legal to pass KeyPressMask as part of the event mask to XGrabPointer. See Xlib, sections 7.4 and 8.1. Now: if app runs on panterra & displays on panterra:0 this works. You probably have bug compatibility mode set on panterra (i.e. via 'xset bc'). In a related aside, is it possible to use XListHosts(), XRemoveHosts() and XAddHosts() in a similar fashion? XListHosts should work just fine. XRemoveHost[s] and XAddHost[s] require that the server be on the same host as the client process. -- Doug Becker doug@nmri.ge.com crdgw1!sane!doug