author | francesco-ST <francesco.abbate@st.com> | 2011年01月04日 15:07:31 +0100 |
---|---|---|
committer | francesco-ST <francesco.abbate@st.com> | 2011年01月04日 15:07:31 +0100 |
commit | ade1149bcc9edea4a83f47f0ca4cd37ca4424719 (patch) | |
tree | d05f801854dd25448a2c49c1a1b96049ef4c2eee | |
parent | e1075953dc2b86704dc3204d4523caa85cb71a56 (diff) | |
download | gsl-shell-ade1149bcc9edea4a83f47f0ca4cd37ca4424719.tar.gz |
-rw-r--r-- | agg-plot/agg_platform_support_x11.cpp | 28 |
diff --git a/agg-plot/agg_platform_support_x11.cpp b/agg-plot/agg_platform_support_x11.cpp index b0bd5cc3..65a7c601 100644 --- a/agg-plot/agg_platform_support_x11.cpp +++ b/agg-plot/agg_platform_support_x11.cpp @@ -78,7 +78,6 @@ void x_connection::close() { if (display && !m_busy) { - XSync(display, True); XCloseDisplay(display); display = 0; } @@ -729,15 +728,6 @@ namespace agg xc->busy(true); - if(!m_wait_mode) - { - if(XPending(xc->display) == 0) - { - on_idle(); - continue; - } - } - XEvent x_event; if (ps->m_is_mapped) { @@ -749,19 +739,6 @@ namespace agg { XNextEvent(xc->display, &x_event); } - - // In the Idle mode discard all intermediate MotionNotify events - if(!m_wait_mode && x_event.type == MotionNotify) - { - XEvent te = x_event; - for(;;) - { - if(XPending(xc->display) == 0) break; - XNextEvent(xc->display, &te); - if(te.type != MotionNotify) break; - } - x_event = te; - } xc->busy(false); @@ -792,6 +769,8 @@ namespace agg if (ps->m_main_img == 0 || ps->m_draw_img == 0) { + if (ps->m_main_img) delete ps->m_main_img; + if (ps->m_draw_img) delete ps->m_draw_img; quit = true; ret = 1; break; @@ -1129,8 +1108,7 @@ platform_support_ext::update_region (const agg::rect_base<int>& r) // the X server does not accumulate mouse motion events. // When m_wait_mode is false, i.e. we have some idle drawing // we cannot afford to miss any events - // XSync(xd->display, wait_mode()); - XFlush(xd->display); + XSync(xd->display, wait_mode()); } void |