X-Git-Url: https://git.cinelerra-gg.org/git/?a=blobdiff_plain;f=cinelerra-5.1%2Fguicast%2Fbcwindowevents.C;h=f05665f076312b5582a440230e362f0fca2ddb92;hb=1b764a9134043e08d4ca6161a6ac58b105cc6b2b;hp=fa79458aab5d3a86a8c7b7857625cfa640fe0dbe;hpb=7fd85fb66168f6b518c5f2d73e04036e87faa0e1;p=goodguy%2Fcinelerra.git diff --git a/cinelerra-5.1/guicast/bcwindowevents.C b/cinelerra-5.1/guicast/bcwindowevents.C index fa79458a..f05665f0 100644 --- a/cinelerra-5.1/guicast/bcwindowevents.C +++ b/cinelerra-5.1/guicast/bcwindowevents.C @@ -74,7 +74,9 @@ void BC_WindowEvents::run() // listening anymore and XCloseDisplay locks up. XEvent *event; #ifndef SINGLE_THREAD +#ifndef NO_XSELECT int x_fd = ConnectionNumber(window->display); +#endif #endif while(!done) @@ -89,6 +91,7 @@ void BC_WindowEvents::run() // This came from a linuxquestions post. // We can get a file descriptor for the X display & use select instead of XNextEvent. // The newest X11 library requires locking the display to use XNextEvent. +#ifndef NO_XSELECT fd_set x_fds; FD_ZERO(&x_fds); FD_SET(x_fd, &x_fds); @@ -96,6 +99,9 @@ void BC_WindowEvents::run() tv.tv_sec = 0; tv.tv_usec = 200000; //printf("BC_WindowEvents::run %d %s\n", __LINE__, window->title); select(x_fd + 1, &x_fds, 0, 0, &tv); +#else + usleep(100000); +#endif XLockDisplay(window->display); while(!done && XPending(window->display)) {