Main Page | Class Hierarchy | Alphabetical List | Class List | Directories | File List | Class Members | File Members

bcwindowevents.C

Go to the documentation of this file.
00001 #include "bcwindowbase.h"
00002 #include "bcwindowevents.h"
00003 
00004 BC_WindowEvents::BC_WindowEvents(BC_WindowBase *window)
00005  : Thread(1, 0, 0)
00006 {
00007         this->window = window;
00008         done = 0;
00009 }
00010 
00011 BC_WindowEvents::~BC_WindowEvents()
00012 {
00013         done = 1;
00014         Thread::join();
00015 }
00016 
00017 void BC_WindowEvents::start()
00018 {
00019         done = 0;
00020         Thread::start();
00021 }
00022 
00023 
00024 void BC_WindowEvents::run()
00025 {
00026         XEvent *event;
00027         while(!done)
00028         {
00029                 event = new XEvent;
00030 // Can't cancel in XNextEvent because X server never figures out it's not
00031 // listening anymore and XCloseDisplay locks up.
00032                 XNextEvent(window->display, event);
00033                 window->put_event(event);
00034         }
00035 }
00036 
00037 
00038 

Generated on Sun Jan 8 13:26:34 2006 for Guicast-svn by  doxygen 1.4.4