[GRASS5] Driver Update

Markus Neteler neteler at geog.uni-hannover.de
Mon Jun 11 09:05:50 EDT 2001


Hi Glynn,

sorry for the delay, was abroad.

On Mon, Jun 04, 2001 at 11:09:14AM +0100, Glynn Clements wrote:
> 
> Glynn Clements wrote:
> 
> > > while working with the current Xdriver I found a side effect
> > > on KDE: If you are displaying a larger raster map and try to
> > > resize, the Xdriver redraws immediately, even if the mouse
> > > button is not released yet. This leads to a sort
> > > of impossibility to resize (sorry, in the past I was always
> > > voting for the immediate redraw...).
> > > 
> > > As I remember you cannot find out if the mouse button is released
> > > or not. So the only solution might be a little sleep before
> > > redrawing to catch the full ongoing resize event. At time on
> > > KDE the resize event is interrupted by the redraw.
> > 
> > Two possible solutions, either or both of which could be implemented:
> > 
> > 1. Delay the resize until after a given interval has elapsed with no
> > further redraw events being received (I presume that this is what you
> > are proposing). How long should the interval be?
> > 
> > 2. Don't disable resize while a redraw is in progress. Redraw commands
> > shouldn't be interactive (or, put another way, interactive commands
> > shouldn't be passed to D_add_to_list()).
> > 
> > Option 2 may make option 1 unnecessary. Option 1 has the drawback that
> > there will always be a delay before redraw occurs; I'm reluctant to
> > make non-KDE users suffer for KDE's flaws.
> 
> I've implemented option 2; let me know if you have any problems with
> it.

now the monitor resize seems to work perfect on KDE.

> I also added an explicit check to the Get_location_with_* functions
> just in case they are called during a redraw. However, this won't help
> if a program which waits for keyboard input gets added to the list. 
> 
> Ideally we should check any programs which call D_add_to_list() to
> ensure that they never add themselves to the redraw list if they are
> run in a way which will require user interaction.

I will continue to test and report any problems. It seems your improvements
catch most (all?) cases. My students will find the others :-)

Thanks for the fix,

 Markus



More information about the grass-dev mailing list