On Mon, Mar 03, 2008 at 03:49:30PM +0100, Frederik Deweerdt wrote: >> I feel that this may not be the proper fix. I suppose that the event >> loop should call rxvt_refresh_vtscr_if_needed more often than it does >> right now. >> >> Adding an Xevent counter shown that with the regular 10ms quick >> timeout, and doing a text selection, it can process more than 50 X >> mouse events before doing any refresh... Breaking the loop for 5 X >> events in a row, also eliminates the issue... > > That sounds good. Just to be sure I got it right, it boils down to the > following, isn't it? > > (with 10 events instead of 5, but that was enough according to my > quick test). > > Index: src/command.c > =================================================================== > --- src/command.c (revision 259) > +++ src/command.c (working copy) > @@ -2355,7 +2355,7 @@ > if( select_res > 0 ) > { > /* Select succeeded. Check if we have new Xevents first. */ > - if( selpage == -1 && XPending( r->Xdisplay ) ) > + if( selpage == -1 && XPending( r->Xdisplay ) > 10) > continue; > > /* Read whatever input we can from child fd's*/
Erm. Ok. I guess I don't understand why this patch works! I tired it on my system and it works fine, but I still don't get the logic. So I tried doing Index: src/command.c =================================================================== --- src/command.c (revision 259) +++ src/command.c (working copy) @@ -2355,7 +2355,7 @@ if( select_res > 0 ) { /* Select succeeded. Check if we have new Xevents first. */ - if( selpage == -1 && XPending( r->Xdisplay ) ) + if( selpage == -1 && XPending( r->Xdisplay ) > 10) + { + printf( "%d xevents", XPending( r->Xdisplay ) ); continue; + } /* Read whatever input we can from child fd's*/ Then running mrxvt (with +bc) produces almost no output! Even when I move the mouse rapidly. Then I recompiled with Index: src/command.c =================================================================== --- src/command.c (revision 259) +++ src/command.c (working copy) @@ -2355,7 +2355,7 @@ if( select_res > 0 ) { - /* Select succeeded. Check if we have new Xevents first. */ - if( selpage == -1 && XPending( r->Xdisplay ) ) - continue; /* Read whatever input we can from child fd's*/ And the original problem seems to go away. Moving the mouse gives smooth highlighting. I'll look into this further, (especially because there's the other problem I mentioned -- short delay before mrxvt responds to user input when a tab is producing a lot of data). GI -- 100 THINGS I'D DO IF I EVER BECAME AN EVIL OVERLORD 85. I will not use any plan in which the final step is horribly complicated, e.g. "Align the 12 Stones of Power on the sacred altar then activate the medallion at the moment of total eclipse." Instead it will be more along the lines of "Push the button." ------------------------------------------------------------------------- This SF.net email is sponsored by: Microsoft Defy all challenges. Microsoft(R) Visual Studio 2008. http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/ _______________________________________________ Materm-devel mailing list Materm-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/materm-devel mrxvt home page: http://materm.sourceforge.net