From 77e93e35e4057f5ce08d352f56762be271dcd482 Mon Sep 17 00:00:00 2001 From: ed Date: Wed, 3 Jul 2019 16:36:48 +0100 Subject: [PATCH] Linux: Set POLLOUT flag for fds to receive XShm completion events --- modules/juce_events/native/juce_linux_Messaging.cpp | 2 +- .../native/juce_linux_X11_Windowing.cpp | 10 ---------- 2 files changed, 1 insertion(+), 11 deletions(-) diff --git a/modules/juce_events/native/juce_linux_Messaging.cpp b/modules/juce_events/native/juce_linux_Messaging.cpp index c9207fb64d..a13a017158 100644 --- a/modules/juce_events/native/juce_linux_Messaging.cpp +++ b/modules/juce_events/native/juce_linux_Messaging.cpp @@ -111,7 +111,7 @@ public: const ScopedLock sl (lock); fdReadCallbacks.push_back ({ fd, std::move (cb) }); - pfds.push_back ({ fd, POLLIN, 0 }); + pfds.push_back ({ fd, POLLIN | POLLOUT, 0 }); } void unregisterFdCallback (int fd) diff --git a/modules/juce_gui_basics/native/juce_linux_X11_Windowing.cpp b/modules/juce_gui_basics/native/juce_linux_X11_Windowing.cpp index ba562dd8bd..4cc3cf2696 100644 --- a/modules/juce_gui_basics/native/juce_linux_X11_Windowing.cpp +++ b/modules/juce_gui_basics/native/juce_linux_X11_Windowing.cpp @@ -2265,16 +2265,6 @@ private: void timerCallback() override { #if JUCE_USE_XSHM - if (XPending (display)) - { - XEvent e; - - ScopedXLock l (display); - - while (XCheckTypedWindowEvent (display, peer.windowH, XShmGetEventBase (display), &e)) - --shmPaintsPending; - } - if (shmPaintsPending != 0) return; #endif