WaitPrimitive different from root5.10 to root5.13/06

Here is a small macro that behaves differently when running it with two different versions of root (5.10 and 5.13/06 on Linux SL4). to run it, Show() in a root session.

With root5.10 if a keyboard is pressed, the loop is executed without any actions. The mouse
interrupts it (click or move) and with another key pressed it kept on going. CRTL/C stops the macro.
With root5.13 a keyboard pressed executs the loop just once.

Is there something wrong with my root versions ? if not,
what is the ‘normal’ behavior and what can I do to always have the first behavior.



here is the function because for some reasons (I don’t know why) the ‘add an Attachment’ button does not work in my firefox2 …

void Show()
TLine line; line.SetLineWidth(2); TMarker mark; mark.SetMarkerStyle(23);
TCanvas *c = new TCanvas();

Int_t refresh = 0;
while( 1 ) { // loop on events 	
	if ( refresh % 100 == 0 ) 
		{ refresh = 0 ; gPad->Clear(); }
	gPad->Update(); TObject *obj = gPad->WaitPrimitive(); 
	if ( gROOT->IsInterrupted() ) { cout << "loop stopped " << endl; break; }


I cannot reproduce this problem (tested with 5.13/06 or 5.14).
When I press a key button or mouse double click, I see a new line drawn in the pad.


With root5.10 a key pressed displays all the consecutive new lines without any other actions
(apparently gPad->WaitPrimitive has no blocking effect and the loop runs by itself …). A mouse event suspends the loop. A double click executes it step by step as it is the case with more recent versions of root. The only difference is the most recent versions have the same behavior for both events (key button and double click) which is a step by step execution.
It is probably the expected behavior, but I found very attractive the way it is working on my root5.10 version and I was wondering how to have it again …