|
From: Ethan A M. <merritt@u.washington.edu> - 2007-05-17 20:06:43
|
On Thursday 17 May 2007 06:39, Petr Mikulik wrote:
> > Feature Request 1719259 asks for a mechanism to notify the
> > user or scripting environment that the plot window has been
> > closed.
>
> 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);
>
>
Thanks.
> 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?
I'm not sure.
Maybe because going through event_reset clears the keystroke modifier flags?
Maybe the event is not recognized as coming from the "current" plot window?
The dummy keystroke event created by event_reset() in this new path forces
current = TRUE.
--
Ethan A Merritt
Biomolecular Structure Center
University of Washington, Seattle 98195-7742
|