/[libvob]/libvob/src/os/Os-GLX.cxx
ViewVC logotype

Diff of /libvob/src/os/Os-GLX.cxx

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.6 by jvk, Fri Jun 27 08:17:36 2003 UTC revision 1.7 by tjl, Tue Jul 22 12:01:51 2003 UTC
# Line 291  namespace Os { Line 291  namespace Os {
291    
292    
293          void interrupt();          void interrupt();
294          void eventLoop(bool wait);          bool eventLoop(bool wait);
295    
296          /*          /*
297          void addIdle(IdleTasks *task) {          void addIdle(IdleTasks *task) {
# Line 677  namespace Os { Line 677  namespace Os {
677          write(interruptPipe[1], &intr, 1);          write(interruptPipe[1], &intr, 1);
678      }      }
679    
680      void LXWindowSystem::eventLoop(bool wait) {      bool LXWindowSystem::eventLoop(bool wait) {
681          DBG(dbg) << "In C++ eventloop : "<<wait<<"\n";          DBG(dbg) << "In C++ eventloop : "<<wait<<"\n";
682            bool ret = false;
683          // We don't want to block;          // We don't want to block;
684          while(1) {          while(1) {
685              DBG(dbg) << "Start loop\n";              DBG(dbg) << "Start loop\n";
# Line 686  namespace Os { Line 687  namespace Os {
687              bool eventsWaiting = XEventsQueued(dpy, QueuedAfterFlush);              bool eventsWaiting = XEventsQueued(dpy, QueuedAfterFlush);
688    
689              // If we should not wait and there are no events, return now              // If we should not wait and there are no events, return now
690              if(!wait && !eventsWaiting) return;              if(!wait && !eventsWaiting) return ret;
691              // We only wait once: on the next iteration of the loop,              // We only wait once: on the next iteration of the loop,
692              // we'll return              // we'll return
693              wait = false;              wait = false;
# Line 710  namespace Os { Line 711  namespace Os {
711                              LXWindow *w = windowsByX[timeouts[i].window];                              LXWindow *w = windowsByX[timeouts[i].window];
712                              timeouts.erase(timeouts.begin()+i);                              timeouts.erase(timeouts.begin()+i);
713                              w->deliverTimeout(id);                              w->deliverTimeout(id);
714                              return;                              return ret;
715                          } else {                          } else {
716                              int ms = timeouts[i].time - t;                              int ms = timeouts[i].time - t;
717                              if(ms < timeout.tv_usec / 1000)                              if(ms < timeout.tv_usec / 1000)
# Line 734  namespace Os { Line 735  namespace Os {
735    
736              XEvent e;              XEvent e;
737              XNextEvent(dpy, &e);              XNextEvent(dpy, &e);
738                ret = true;
739              //cout << "getWindow\n";              //cout << "getWindow\n";
740              LXWindow *w = windowsByX[e.xkey.window];              LXWindow *w = windowsByX[e.xkey.window];
741              if(!w) {              if(!w) {

Legend:
Removed from v.1.6  
changed lines
  Added in v.1.7

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26