gsl-shell.git - gsl-shell

index : gsl-shell.git
gsl-shell
summary refs log tree commit diff
path: root/agg-plot
diff options
context:
space:
mode:
Diffstat (limited to 'agg-plot')
-rw-r--r--agg-plot/agg_platform_support_win32.cpp 2
-rw-r--r--agg-plot/agg_platform_support_x11.cpp 2
-rw-r--r--agg-plot/plot-window.cpp 13
-rw-r--r--agg-plot/xwin-show.cpp 2
4 files changed, 13 insertions, 6 deletions
diff --git a/agg-plot/agg_platform_support_win32.cpp b/agg-plot/agg_platform_support_win32.cpp
index 964ce7f9..3a8f52a9 100644
--- a/agg-plot/agg_platform_support_win32.cpp
+++ b/agg-plot/agg_platform_support_win32.cpp
@@ -1091,8 +1091,6 @@ namespace agg
}
}
- pthread_mutex_unlock (m_specific->m_mutex);
-
return (int)msg.wParam;
}
diff --git a/agg-plot/agg_platform_support_x11.cpp b/agg-plot/agg_platform_support_x11.cpp
index 0ea06846..8e9152a7 100644
--- a/agg-plot/agg_platform_support_x11.cpp
+++ b/agg-plot/agg_platform_support_x11.cpp
@@ -947,8 +947,6 @@ namespace agg
XFreeGC(m_specific->m_display, m_specific->m_gc);
XDestroyWindow(m_specific->m_display, m_specific->m_window);
XCloseDisplay(m_specific->m_display);
-
- pthread_mutex_unlock (m_specific->m_mutex);
return 0;
}
diff --git a/agg-plot/plot-window.cpp b/agg-plot/plot-window.cpp
index defda309..8d747046 100644
--- a/agg-plot/plot-window.cpp
+++ b/agg-plot/plot-window.cpp
@@ -158,6 +158,8 @@ plot_window::start()
gsl_shell_unref_plot (this->id);
GSL_SHELL_UNLOCK();
}
+
+ platform_support_unlock (this);
}
void *
@@ -223,7 +225,7 @@ int
plot_window_free (lua_State *L)
{
plot_window *win = plot_window::check (L, 1);
- printf("freying plot window\n");
+ printf("freeing plot window\n");
win->~plot_window();
return 0;
}
@@ -283,12 +285,19 @@ plot_window_index_protected (lua_State *L)
{
plot_window *win = plot_window::check(L, lua_upvalueindex(2));
+ platform_support_lock (win);
+
+ if (win->status != plot_window::running)
+ {
+ platform_support_unlock (win);
+ return luaL_error (L, "window is not active");
+ }
+
int narg = lua_gettop (L);
lua_pushvalue (L, lua_upvalueindex(1));
lua_insert (L, 1);
- platform_support_lock (win);
if (lua_pcall (L, narg, LUA_MULTRET, 0) != 0)
{
platform_support_unlock (win);
diff --git a/agg-plot/xwin-show.cpp b/agg-plot/xwin-show.cpp
index 72a2fea4..f96c401c 100644
--- a/agg-plot/xwin-show.cpp
+++ b/agg-plot/xwin-show.cpp
@@ -97,5 +97,7 @@ xwin_thread_function (void *_plot)
GSL_SHELL_UNLOCK();
}
+ platform_support_unlock (&app);
+
return NULL;
}
generated by cgit v1.2.3 (git 2.39.1) at 2025年09月28日 05:42:01 +0000

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