home *** CD-ROM | disk | FTP | other *** search
- Path: sparky!uunet!mcsun!sun4nl!orcenl!rgasch
- From: rgasch@nl.oracle.com (Robert Gasch)
- Newsgroups: comp.windows.x
- Subject: Strange Event Processing Problem
- Message-ID: <3201@nlsun1.oracle.nl>
- Date: 9 Nov 92 10:08:22 GMT
- Organization: Oracle Europe
- Lines: 28
-
- I have a program which in repsonse to a buttonpress has to repeat
- a certain action until an event occours (ButtonPressMask |
- ButtonReleaseMask | ExposureMask | KeypressMask | EnterWindowMask |
- LeaveWindowMask). The code I'm using to do this once the button has
- been pressed looks as follows:
-
- while (XEventsQueued(mydisplay, QueuedAlready)==0)
- {
- msleep (100000); /* sleep for about 1 second */
- if (operation == SELLING)
- {
- do_this ();
- }
- else
- if (operation == BUYING)
- {
- do_that ();
- }
- }
-
- The problem I have is that the program pauses about 1 second (which it
- should) and then processes several events right in succession without pausing
- in between them (I have no clue how). If anybody an see anything obvious
- wrong with this, please let me know.
-
- Thanks a lot
- --> Robert
- rgasch@nl.oracle.com
-