r877: Fix files that were missing from a make dist tarball.
[cinelerra_cv.git] / guicast / bcwindowevents.C
bloba04e1f809785db71c02b894996aa6e7e86254778
1 #include "bcwindowbase.h"
2 #include "bcwindowevents.h"
4 BC_WindowEvents::BC_WindowEvents(BC_WindowBase *window)
5  : Thread(1, 0, 0)
7         this->window = window;
8         done = 0;
11 BC_WindowEvents::~BC_WindowEvents()
13         done = 1;
14         Thread::join();
17 void BC_WindowEvents::start()
19         done = 0;
20         Thread::start();
24 void BC_WindowEvents::run()
26         XEvent *event;
27         while(!done)
28         {
29                 event = new XEvent;
30 // Can't cancel in XNextEvent because X server never figures out it's not
31 // listening anymore and XCloseDisplay locks up.
32                 XNextEvent(window->display, event);
33                 window->put_event(event);
34         }