Path: utzoo!news-server.csri.toronto.edu!cs.utexas.edu!samsung!spool.mu.edu!snorkelwacker.mit.edu!bloom-picayune.mit.edu!athena.mit.edu!shakes From: shakes@athena.mit.edu (Sue Downing) Newsgroups: comp.windows.x Subject: Double Mouseclicks and XImage buffer size Message-ID: <1991Mar9.230605.21162@athena.mit.edu> Date: 9 Mar 91 23:06:05 GMT Sender: news@athena.mit.edu (News system) Organization: MIT Lines: 26 I am repeating these questions for a friend of mine who doesn't have access to netnews. Could you please forward your answers to: bj@oak.com (uunet!oak!bj) Thanks. ------- I have two questions: 1) How can I detect double mouse clicks in a portable way? I have written a loop that sleeps for a small period of time and then checks the event queue. After the double-mouse-click interval has passed (and no events are detected) I note a single mouse click. Is there a readevent with timeout? Or is there a way to ask the server to send a "timer" event at a future time? 2) What is the best way to determine the size of the image data that needs to be allocated for an XImage? XCreateImage notes that it does not allocate space for the image itself. Is there a portable method to determine the number of bytes needed? XGetImage knows how to do this. Thanks a bunch. --Bjoren Davis (bj@oak.com or uunet!oak!bj)