|
From: Ethan A M. <merritt@u.washington.edu> - 2009-03-19 06:40:37
|
On Wednesday 18 March 2009, Petr Mikulik wrote:
> Can somebody else on Windows reproduce the bug below? I would like this gets
> fixed before 4.2.5 is released.
>
> In Windows, there is only one open and active graph window.
> I think this could be the reason while mouse.c:event_keypress() reports
> "protocol error" if you try e.g.:
>
> bind 's' 'print "Hello";'
> bind 'd' 'set grid;'
> bind 'f' 'set time'
> bind 'g' 'plot x;'
> bind 'x' 'test;'
> plot x*x
>
> and then press "s" hotkey (or the others) several times.
>
> The code in mouse.c after
> if (ptr->allwindows && ptr->command) {
>
> is testing "allwindows" and "active" windows but it could somehow miss the
> case of a single-window graph. I'm not sure what should be the correct fix
> among these several if .. else if ... This well handles case of multiple
> windows (x11, wxt), but what should it do for single-window cases such as
> windows or pm terminals?
It must recognize the current window correctly, or it would have exited the
loop before reaching that protocol error message.
1387: } else if (!current) break;
I think it is more likely that some spurious event is being generated
in addition to the desired keypress event, and we should just ignore it.
Is the behaviour acceptable if you change the fprintf() to FPRINTF(())?
--
Ethan A Merritt
|