Helge Hafting wrote:
> Peter Kümmel wrote:
>> Helge Hafting wrote:
>>  
>>> Lars Gullik Bjønnes wrote:
>>>    
>>>> | What is the problem that you are trying to solve here?
>>>>
>>>> Is it my old pet? "Countinued scorrling after key-release"?
>>>>
>>>> What was wrong with my patch from months back?
>>>>         
>>> I tried this with todays svn.
>>> The patch will indeed prevent scrolling after key-release,
>>> so it fixes the pageup/pagedown case.
>>>
>>>     
>>
>> My patch eats the pageup/pagedown key events, but I don't
>> know what Lars' patch does.
>>
>>  
>>> It does not help for jumpscrolling using the scrollbar - LyX will
>>> then overshoot a lot, if the scrolling work needs more than 100% cpu.
>>>     
>>
>>
>> Attached a patch which is not mentioned to go in, but does it
>> at least fix the overshooting when scrolling by clicking in
>> the scrollbar?
>>
>>
>> Index: src/frontends/qt4/GuiWorkArea.cpp
>> ===================================================================
>> --- src/frontends/qt4/GuiWorkArea.cpp   (revision 18599)
>> +++ src/frontends/qt4/GuiWorkArea.cpp   (working copy)
>> @@ -234,6 +234,7 @@
>>  void GuiWorkArea::adjustViewWithScrollBar(int)
>>  {
>>         scrollBufferView(verticalScrollBar()->sliderPosition());
>> +       QApplication::syncX();
>>  }
>>   
> This fixed it perfectly!

Great to hear!

But you still need a patch for the key scrolling.

> No more overshooting.  Performance was unchanged, not better, no worse.
> 
> I have the impression that "syncX" isn't too popular, but I wonder:
> Will it really be a problem? The vast majority of fast machines
> out there don't need 100% cpu to scroll.  That means they
> are idle between the scrollbar autorepeats.  syncX is
> probably not a problem for those?

We will never know, if we not test, so I apply the change.

> 
> A slow-display machine will scroll less (not slower - it was already
> using 100% cpu, scrolling slower than the autorepeat anyway.)
> So it will scroll less, because it don't overshoot.
> 
> I also tested "syncX" performance over the network.  I used ssh
> to get to a machine 20kM from here, and then ssh back to
> this machine again where I ran the patched LyX.  This sends the
> graphics on a roundtrip 20kM back and forth - twice as bad as
> just using a remote LyX.  The scrolling was a little slower, but
> it still stops perfectly.  And the slowness wasn't too bad, not
> something I mind when working remotely. ADSL has its limitations
> anyway.
> 
> Please - if you can't come up with something better for 1.5.0, just
> apply this.
> It is simple, it works perfectly, and don't seem to  kill performance.
> Unless it has some other horrible drawback that didn't show up
> in my tests. The overshooting certainly was horrible.
> 
> Helge Hafting
> 
> 
> 
> 
> 
> 
> 


-- 
Peter Kümmel

Reply via email to