Synedit on windows, SetTopline "paints", outside of "procedure paint". possible flicker, or unnecessary paint
Original Reporter info from Mantis: Martin @martin_frb
-
Reporter name: Martin Friebe
Original Reporter info from Mantis: Martin @martin_frb
- Reporter name: Martin Friebe
Description:
All painting (drawing/textout) for Synedit is done within the WM_PAINT event (triggered by invalidate).
The only exception is scrolling the window in SetTopline (windows only). This can lead to:
- flicker (see bug #11474 (closed))
- unnecessary repaints(moving up and down several times.
Also for better modularity, this could be moved into the SynTextDrawer (which should handle all Paint/canvas/draw operation => thinking of testcases, they could use a special textdrawer to capture output.
Additional information:
SetTopline should:
\- invalidate<br/>
- if possible an invisible part of the window, just to triger the WM_PAINT
- otherwise the minimum possible (1 pixel)
- set a flag => scroll_or_redraw_all
- if anything else gets invalidated (before or after), then all lines should be redrawn (Invalidate removes possible_scroll flag, and invalidates the full rect)
in PAINT
- if scrolling is not available (non windows, not implemented) all lines are repainted ( same if the Y delta is to big)
- if posible scrolling is done
=> this will trigger a 2nd WM_PAINT (windows does this from inside scroll), so the new lines will be painted then
* I am sure there are a few more cases to take care off, but the outline should be good to serve as reminder
Mantis conversion info:
- Mantis ID: 11715
- Version: 0.9.25 (SVN)
- Fixed in version: 0.9.27 (SVN)
- Fixed in revision: 20975 (#ee46b068)
- Monitored by: » etrusco (Flávio Etrusco)
- Target version: 1.0.0
- LazTarget: 1.0