* Drawn as "inverse video" for now.
* Should use VTerm state to get the cursor shape (rect, underline or
left line)
* Should also handle blinking if enabled, and visibility.
As pointed by Ingo, using a float here is useless because we want each
line to be the same integer number of pixels. Now thigs are drawn
properly and the view has the exact same size as Terminal's one (tested
with font sizes 10 and 18, so different leading values don't seem to be
a problem).
Thanks for reviewing!
Also use finddir instead of hardcoded paths for drivers and locale
catalog helper rules.
Fixes#11115. Thanks to Waddlesplash and Puckipedia for investigating
the issue.
* Set the background color in AttachedToWindow to avoid white lines in
initial drawing,
* Fix computation of font size again so lines don't overlap.
Note: lines are apparently spaced 1px less than in Terminal. But they
don't seem to touch or overlap each other in SerialConnect.
A lookup in a splay tree does move the looked up entry to the root of
the tree. This means the tree structure is modified on lookup alone.
Obviously the tree structure is also modified when inserting new nodes.
For both of these reasons access to the f{Node|Ino}Tree needs to be
locked on lookup and insert.
Fixes crashes when the tree is concurrently modified by multiple threads
accessing the same exfat volume.
In addition this protects the fNextId field that hands out new inode
ids.
... in situations where a NULL pointer dereference was vital to the
functioning of the method we use a stronger assert that throws an
exception on failure. This is accomplished by a new method in
Utilities.cpp, ThrowOnAssert().
None of these conditions should ever be true, if they are it means that
the code is written improperly and would have resulted in a NULL
dereference and undefined behavior (most likely a crash) before.
Most instances of ThrowOnAssert() either replace an ASSERT followed
by a dereference or an early return that covered the error.
Also remove _ThrowOnErrorWithMessage() which wasn't being used.
To prevent recoverable NULL pointer dereferences. Dereferencing a
NULL pointer is undefined behavior and should be avoided.
Unrecoverable NULL checks will be dealt with in the next commit.
By using a BString we can keep track of the string length instead of
calculating the length after hoping that sprintf() works or doing a
bunch more work to check the return values using either snprintf()
or asprintf(). sprintf() was not bounds checked either. As an added
bonus we no longer have to use an arbitrary 1024 bytes size buffer.
CID 991605
Instead of passing the box in we can just use FindView to get it,
that's what other methods do. Also, check if removeButton exists
in AddAttrRow() first instead of doing it in this method.