Remove unused function ScrollView::AwaitEventAnyWindow

Signed-off-by: Stefan Weil <sw@weilnetz.de>
This commit is contained in:
Stefan Weil 2021-11-14 12:09:53 +01:00
parent 37b33749da
commit e5011c545a
2 changed files with 0 additions and 23 deletions

View File

@ -461,26 +461,6 @@ SVEvent *ScrollView::AwaitEvent(SVEventType type) {
return ret; return ret;
} }
// Block until any event on any window is received.
// No event is returned here!
SVEvent *ScrollView::AwaitEventAnyWindow() {
// Initialize the waiting semaphore.
auto *sem = new SVSemaphore();
std::pair<ScrollView *, SVEventType> ea((ScrollView *)nullptr, SVET_ANY);
waiting_for_events_mu->lock();
waiting_for_events[ea] = std::pair<SVSemaphore *, SVEvent *>(sem, (SVEvent *)nullptr);
waiting_for_events_mu->unlock();
// Wait on it.
stream_->Flush();
sem->Wait();
// Process the event we got woken up for (its in waiting_for_events pair).
waiting_for_events_mu->lock();
SVEvent *ret = waiting_for_events[ea].second;
waiting_for_events.erase(ea);
waiting_for_events_mu->unlock();
return ret;
}
// Send the current buffered polygon (if any) and clear it. // Send the current buffered polygon (if any) and clear it.
void ScrollView::SendPolygon() { void ScrollView::SendPolygon() {
if (!points_->empty) { if (!points_->empty) {

View File

@ -188,9 +188,6 @@ public:
// Block until an event of the given type is received. // Block until an event of the given type is received.
SVEvent *AwaitEvent(SVEventType type); SVEvent *AwaitEvent(SVEventType type);
// Block until any event on any window is received.
SVEvent *AwaitEventAnyWindow();
/******************************************************************************* /*******************************************************************************
* Getters and Setters * Getters and Setters
*******************************************************************************/ *******************************************************************************/