On Sat, May 28, 2005 at 12:12:07AM +0200, Lars Gullik Bjønnes wrote: > | Actually I have now had time to think about this for two weeks, and my > | considered opinion is a bit different... > > What you write belowe seems very sane. But I think that my keyevent > queue is still needed? (but to fix a different problem)
Which problem? I have the feeling that pruning repeat key events is not wrong in principle, but at best not needed. Without it, you know precisely (under my scheme) that keeping the PgDown key down for 0.5 secs will get you 10 screens lower, only a few of which will actually be displayed due to the X coalescing behaviour. (More precisely: if a screen refresh takes 0.4 s and key repeat is 20/s, every 8th screen will be rendered, plus-minus, including the final one when you lift your finger.) Under your scheme, scrolling will be equally regular (right?) but slower. (BTW is there an X way to set the key repeat rate programmatically?) > | +inline flags operator|(flags const f, flags const g) > | +{ > | + int const intf(static_cast<int>(f)); > | + int const intg(static_cast<int>(g)); > | + return static_cast<flags>(intf | intg); > | +}e > > Is the temporary insts needed? > > > inline flags operator|(flags const f, flags const g) > { > return static_cast<flags>(f | g); > } > > should be enough. Yes, of course. Silly of me. - Martin
pgp4ZutGToaSi.pgp
Description: PGP signature