+ if (last_key_released == last_key_pressed
+ && last_state_released == last_state_pressed
+ && last_time_released == last_time_pressed) {
+ // When the diff between last_time_released and
+ // last_time_pressed is 0, that sinifies an autoreapeat
+ // at least on my system. It like some feedback from
+ // others, especially from user running LyX remote.
+ //lyxerr << "Syncing - purging X events." << endl;
+ XSync(fl_get_display(), 1);
+ // This purge make f.ex. scrolling stop imidiatly when
+ // releaseing the PageDown button. The question is if this
+ // purging of XEvents can cause any harm...after some testing
+ // I can see no problems, but I'd like other reports too.
+ }