Dragging a control bar does not draw a frame in some programs.
Borland's Object Windows Library for the modern age
Brought to you by:
jogybl,
sebas_ledesma
Note: in 6.30 this appears to work correctly. It is broken in both 6.44 and trunk.
Last edit: Ognyan Chernokozhev 2020-09-21
The drag frame is drawn with a hatch brush, which is created as a static singleton object.
I found out that if I comment out the static initializer in these lines
then the frame is drawn correctly in the RichEditor example.
On a side note, there is a
LOCKBRUSHmacro which is always empty - it should be removed from code.Hi Jogy, good catch.
It seems the attempt to create the TDitherBrush at startup fails for some reason. Do you know why?
Anyway, this is one of my regressions, as part of the multi-threading review. The statically initialised InitDitherBrush was added to prevent race conditions on the initialisation of ditherBrush, the static variable within GetDitherBrush. However, OWLNext isn't thread-safe anyway, so it was somewhat pointless. Also, with C++11 compliant compilers, the initialisation of static variables at function scope is now guaranteed to be thread-safe, so the workaround is not needed on the trunk.
Related
Wiki: Multi-threading_and_OWLNext
Fixed in [r5283] in trunk, in [r5284] in 6.44 and in [r5285] in 7.0.
Related
Commit: [r5283]
Commit: [r5284]
Commit: [r5285]
Last edit: Ognyan Chernokozhev 2020-09-24