|
From: Petr M. <mi...@ph...> - 2007-05-17 13:39:13
|
> Feature Request 1719259 asks for a mechanism to notify the
> user or scripting environment that the plot window has been
> closed.
>
> In x11 this is easy, because we already receive an event from
> the window manager when the window closes and can use it as a
> trigger to call event_reset(). I am wondering how easy this
> would be from the other interactive terminals.
>
> How could one detect that the wxt plot window has been closed?
> Windows?
Here is the patch for src/win/wgraph.c:
--- wgraph-orig.c 2006-11-13 00:43:46.000000000 +0100
+++ wgraph.c 2007-05-17 15:32:35.000000000 +0200
@@ -406,6 +406,8 @@
void WDPROC
GraphClose(LPGW lpgw)
{
+//Wnd_exec_event(lpgw, (LPARAM)0, GE_keypress, GP_Cancel);//Why not?
+ Wnd_exec_event(lpgw, (LPARAM)0, GE_reset, 0);
/* close window */
if (lpgw->hWndGraph)
DestroyWindow(lpgw->hWndGraph);
I first tried with the GE_keypress+GP_Cancel event (like in x11), it did not
work, then I tried GE_reset (like in wxt), it works. Why?
Petr
|