restored the XSync in update_region and removed XSync on connection close - gsl-shell.git - gsl-shell

index : gsl-shell.git
gsl-shell
summary refs log tree commit diff
diff options
context:
space:
mode:
authorfrancesco-ST <francesco.abbate@st.com>2011年01月04日 15:07:31 +0100
committerfrancesco-ST <francesco.abbate@st.com>2011年01月04日 15:07:31 +0100
commitade1149bcc9edea4a83f47f0ca4cd37ca4424719 (patch)
treed05f801854dd25448a2c49c1a1b96049ef4c2eee
parente1075953dc2b86704dc3204d4523caa85cb71a56 (diff)
downloadgsl-shell-ade1149bcc9edea4a83f47f0ca4cd37ca4424719.tar.gz
restored the XSync in update_region and removed XSync on connection close
Removed also unused code for for m_wait_mode = false. Fixed also a potential memory leakage.
Diffstat
-rw-r--r--agg-plot/agg_platform_support_x11.cpp 28
1 files changed, 3 insertions, 25 deletions
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
generated by cgit v1.2.3 (git 2.39.1) at 2025年09月21日 02:35:53 +0000

AltStyle によって変換されたページ (->オリジナル) /