r941: Fixes bug 340
commitfba5d0875e7b6ac2b0c2574d6343b2d2a40d5b32
authorAndraz Tori <Andraz.tori1@guest.arnes.si>
Wed, 18 Oct 2006 12:04:59 +0000 (18 12:04 +0000)
committerAndraz Tori <Andraz.tori1@guest.arnes.si>
Wed, 18 Oct 2006 12:04:59 +0000 (18 12:04 +0000)
tree6427feb1fcdaa1322c853546024ad0ee6d481681
parentd53aba08b3f037979232a005b63ba5dc489e02b3
r941: Fixes bug 340
http://bugs.cinelerra.org/show_bug.cgi?id=340

The solution is highly suboptimal and might bring performance degradation

// The proper solution is HARD because of :
// 1. idiotic xlib does not have XTryLockDisplay - we will need to _completely_ implement XLockDisplay by ourselves (including cascaded locking - it is not the same as mutex!)
// 2. the locking shemantic inside new lock_window and here will be really tricky, we should:
//      in lock_window check wheather BC_WindowEvents is in XNextEvent and it is send custom xevent to break out of the loop and make sure lock is not taken again if locck_window is waiting for it
// 3. Send custom events from previous point through _separate_ xwindows display connection since XSendEvent would need to be protected by XLockDisplay which obviously can't be done inside the same thread!
guicast/bcwindowevents.C