improve wait of x11 event to avoid blocking

This commit is contained in:
Jinhao
2019-09-11 00:10:11 +08:00
parent 02676e9c75
commit 0f66b0cb26
3 changed files with 117 additions and 19 deletions

View File

@@ -21,6 +21,10 @@
#include <map>
#ifdef NANA_X11
# include <atomic>
#endif
namespace nana{
namespace detail
{
@@ -75,6 +79,15 @@ namespace nana{
root_misc(root_misc&&);
root_misc(basic_window * wd, unsigned width, unsigned height);
~root_misc();
#ifdef NANA_X11
struct x11msg_confirm
{
std::atomic<std::size_t> config{ 0 };
std::atomic<std::size_t> map{ 0 };
std::atomic<std::size_t> unmap{ 0 };
}x11msg;
#endif
private:
root_misc(const root_misc&) = delete;
root_misc& operator=(const root_misc&) = delete;