Path: utzoo!utgpu!news-server.csri.toronto.edu!rpi!think.com!zaphod.mps.ohio-state.edu!wuarchive!uunet!imp!diablery.10A.com!devil From: devil@diablery.10A.com (Gil Tene) Newsgroups: comp.windows.x Subject: Xlib: grabbing events by another program ? Message-ID: <344@imp.UUCP> Date: 27 May 91 20:08:18 GMT Sender: devil@imp.UUCP Organization: Diablery, cloud seven, Hell. (also 10A Inc.) Lines: 33 Nntp-Posting-Host: imp Hello Xfolk, I am trying to grab button events on an already opened window by a seperate program. The "already opened window" is run under some closed application that I cannot play around with too much, and the "seperate program" needs to know the x,y of clicks on the window. The way I find the proper window XID is by searching the window list for the proper window name. using : XSelectInput(d, w, ButtonPressMask|ButtonReleaseMask); seems to work only on windows for which no other program has grabbed the button events yet. If I run this program once on such windows all works well, but if I two copies of it at the same time, on the same window, it breaks down, denying access to "private resource". I assume this is because two programs cannot "subscribe" to the same button events (right?). The problem is that the closed application seems to be "subscribed" to these events, even though it doesn't need them... Is there any way for me to delete the existing program's "subscription" to these events, and replace them with my own? AdvThanks, -- Gil. -- -------------------------------------------------------------------- -- Gil Tene "Some days it just dosn't pay - -- devil@imp.HellNet.org to go to sleep in the morning." - -- devil@diablery.10A.com - --------------------------------------------------------------------